I've been facing a really frustrating problem regarding .graphql files while developing in Meteor. Whenever I change my graphql files, Meteor does not notice the changes and I should change something in the source files to force Meteor to reload.
However, sometimes it does not even apply the changes after the hot reloading.
I'm wondering if the be any solution to get around this issue.
Meteor knows to recompile based on files changing that have an extension that Meteor or a Meteor build plugin supports.
https://guide.meteor.com/build-tool.html#build-plugins
This one supports .graphql files:
https://github.com/Swydo/meteor-graphql
Related
I've successfully used PhoneGap Build with pre-populated SQLite DBs in the past via the https://build.phonegap.com/plugins/2368 plugin. However, Adobe deprecated the use of all plugins from the PG Build repository. Thus, I've been forced to use the npm alternatives.
https://www.npmjs.com/package/cordova-sqlite-storage is the recommended alternative to brodybits' original plugin. However, it's not compatible with PG Build due to them not honoring before_plugin_install hook.
https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free and https://github.com/litehelpers/Cordova-sqlite-legacy-build-support are the recommended PG Build solutions. These work successfully to create and save/load to a new SQLite DB. However, they do not inherently support pre-populated DBs. It seems the solution to this was to copy the directory from the www/ directory to the app's DB dir before opening the DB. This is made possible by using https://github.com/an-rahulpandey/cordova-plugin-dbcopy. I've had success using this plugin, but have also experience the app initially crashing (likely due to some case where the DB was trying to be opened before it was copied..?).
It's frustrating to now have to use two plugins to do what one accomplished simply because Adobe deprecated use of its repository. Furthermore, I find it strange that the newer versions of Cordova-sqlite-storage don't support pre-populated DBs anymore when version 1.0.6 did.
I tried adding https://github.com/litehelpers/Cordova-sqlite-storage/tree/a97198d as the plugin source in my config.xml file. However, I can't seem to be able to specify a tag for the git repo (it only seems to pull the master version). Also, I tried adding https://github.com/litehelpers/Cordova-sqlite-storage/tree/a97198d as a custom plugin for PG Build and got an error for invalid url.
Does anyone know a possible solution to this? I'd really just like to be able to use the same plugin I've used for almost two years. Thanks!
was the right way to add the plugin to my config.xml file
I have a package which includes a file that gets frequently rebuilt. This causes meteor to restart each time that file is edited.
There are ways to get meteor to ignore files within the main app, eg putting inside a .directory but is there a way to do this within a package?
The catch is that I DO need the final file to be included for deployment, so it has to be named - as an asset - and included in the package addFiles.
The only solution I have so far is to host the asset external to the meteor app and load it in via http or something on each cold start, but that's a bit fragile.
As of Meteor v1.5.2.1, there is support for a .meteorignore file. It behaves the same as a .gitignore. Have you tried using it?
You can use them in any directory of your project and are fully integrated with the file watching system.
Purchased a theme for my new app, which is entirely based on LESS. However, Meteor is not recognizing the #varable variables in the LESS files. I have over 100+ such files and these error lines span for that long as well.
Is there anything that I'm doing wrong here by assuming Meteor will compile all the files because the layout isn't working correctly and these LESS file problems are the reason. Anything I can do to fix this problem?
Please check if the version of less used in your purchased theme is compatible with the version of Meteor that your app is using. I had a similar issue recently where my purchased theme used an older version of less which was not compatible with Meteor 1.2. So, when I updated my app to the latest version of Meteor, my app layout was messed up as the less files were not properly interpreted. Please see Breaking changes in Meteor 1.2 - point 3 under Build tool and package improvements
Just my $0.02
Is there some specific folder in Meteor file structure which is simply ignored by Meteor? (meteor bundle and meteor deploy etc)
Or better yet: is there a kind of .meteorignore file where we can list files for Meteor to ignore?
There's no such file as .meteorignore yet.
Currently the only reliable way to hide a file from Meteor is to make it hidden (add a dot to the beginning of name). You can hide the whole directory, which is useful if you need specific filenames for things like Grunt tasks.
For example if you create a directory called .hammerTime, then Meteor can't touch this.
Update:
As of Meteor v1.5.2.1, there is support for a .meteorignore file. It works exactly the same as a .gitignore.
As of Meteor v1.5.2.1, there is support for a .meteorignore file. It works exactly the same as a .gitignore.
You can use them in any directory of your project and are fully integrated with the file watching system.
Tl;dr : Is there an equivalent in meteor to .gitignore?
Yes, I am aware of using a leading '.' in the directory name to get meteor to exclude it. But using leading dot is not a solution in this case. Read below to understand.
Longer:
I would like to use Bower.io to install various browser plugins.
Ideally, I run bower in the client subdirectory. Bower does its thing creating the bower_components directory and pulls down the plugin (pick a random jquery plugin for example).
Many plugins include example html, demo css files, etc. to show how to use the plugin.
Unfortunately, Meteor wants to include all that stuff in the application. Which unsurprisingly causes problems.
My current solution is to have bower.io run in the project's parent directory. This is not ideal as I have to copy js/css files over from the bower directory to the meteor client directory. (yes, I could use soft links but then the files would be missing when pushing to production).
With only a few client plugins / css packages this is becoming quite annoying.
NOTE: Renaming files/directories retrieved by bower.io to have a leading '.' or using bower in a dotted subdirectory helps only marginally. I would then have to manually include the files needed.
Is this possibly a duplicate of How to exclude directories/files from Meteor's bundler?
If you want to define the way you name your files, you could try including a certain regex to match in the meteor bundler. Otherwise, maybe it's something that needs to be implemented on a framework level.
I also found this tutorial by Tri on integrating meteor and bower: http://tridnguyen.com/articles/meteor-and-bower/. Tri defines a new meteor package to specify the exact files required on the client.
The best solution, however, is move away from Bower as Meteor offers its own package manager at a framework level. Including the front end files that you need using Meteor packages would be the more productive solution in the long run, especially as the framework changes.