Rebuild everythyng on any file change in meteor - meteor

Is there any way to rerun complete rebuild of meteor app when any file is changed? Normally meteor rebuilds only the changed file and all others are chached. So maybe disable cache or any way to force rebuild during meteor is running so I wouldn't have to stop it and run again?
I've read something about caching https://guide.meteor.com/build-tool.html#caching-build-plugins but I have no idea how to implement something with that.
Thanks.

Related

firebase deploy not updating html file, not a cache issue

I'm doing a firebase deploy, but my local file does not match my served file. I have quadrupal checked the file that's in the deployed directory, I've disabled cache, I've hard reloaded, I've navigated directly to the file, I've made additional changes to the file, I've deployed from my local dev machine and from a clean CI server.
I navigate to http://localhost:3000/views/tasks.html and see one html result and then to https://[my-firebase-url]/views/tasks.html and see an older html result for the same file.
I've done firebase deploy --debug and everything is reported as successful and the file count is correct. Is there any additional information I can find out myself? Is there a way to look at the build that's uploaded to firebase mentioned in the debug file?
This has worked every time I've ever done it until now with the same project and file structure. Any way to troubleshoot this would be awesome. Thanks!
in my case I forgot to build(ng build --prod) the modified project to update the dist folder, which is uploaded on firebase server when deploy
As the comment by Frank van Puffelencheck mentioned, checking the Firebase status dashboard for the latest information is an additional step to take. If I had done that, I would have seen that the firebase deploy service was having issues at the time.
The issue for me was that I did not save the file. As i was working with bracket and seeing the modification, I forgot it.

Exclude files from auto-rebuilding meteor

I'm building an app in Meteor, and am a big fan the auto-rebuild action, that listens to any file change, rebuilds the app and refreshes my browser. However, I recently started to use flycheck with eslint and flycheck creates a temporary files called flycheck_my-module.js in the current directory whenever I make a change in a file (as opposed to only on save). Meteor sees these files being created and rebuilds and reloads. This causes a lot of action and is heavy for my browser and ruining my workflow.
I can customize the prefix for for these files f.x. to .#flycheck_ and that will make Meteor ignore them, however that will break the eslint checker.
So my question is. Is there any way to tell meteor to prevent all files starting with flycheck_ from triggering a rebuild, something like meteor run --ignore "flycheck_*.js".
Meteor handles the whole build process, so introducing something like flycheck isn't really ideal (same goes for transpilers, etc).
One possibility is to save those files inside the test folder, which is ignored by meteor. If the file is required to be in the same folder, you could quickly edit the source of flycheck to look in 'test/' + currentDir & recreate the same folder structure within the test folder. Not really ideal, but that's about your only option if you want to keep using flycheck + emacs.

Is there a faster way to update a deployment in Meteor?

To deploy a meteor app, you enter meteor deploy my_first_meteor_app.meteor.com
To update the deployment, is there a faster way than typing the above command again? It's quite tedious if you have a long domain name like the one in this example.
Yes. You can user aliases (nothing to do with Meteor). This is how you do it on a Mac:
alias new_name='command to be performed'
After which you must store the changes permanently in the file:
~/.bash_profile
See a full explanation here: http://www.maclife.com/article/columns/terminal_101_creating_aliases_commands
Also, you can try running meteor deploy without the site name. I don't remember if that works or not though. meteor deploy does remember old settings files that were used, but I'm not sure if it remembers the site name you used too.

console.log in .meteor directory

Sometimes I want to analyze how things works in a meteor app and I wish I could output logs in the .meteor directory. But If I add a console.log() there, it never shows. Is there a way to do so?
As of the current version of Meteor, you can use a normal debugger on the server side using meteor debug. (You could always use the debugger client-side by using the Web Inspector.)

Use a MongoHQ db with Meteor on localhost

I wanted to know how to go about getting a MongoHQ db to work on my localhost installation of Meter.
i tried using the settings.json method or the MONGO_URL=mongodb://user:pass#xxxx.mongohq.com:10061/xxxx when firing up meteor but both dont work and are probably the wrong way of doing it.
run it like this in your terminal within your project directory
MONGO_URL=mongodb://user:pass#xxxx.mongohq.com:10061/xxxx meteor
or
export MONGO_URL=mongodb://user:pass#xxxx.mongohq.com:10061/xxxx
meteor

Resources