-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run gulp build
when installing sample
#2
Comments
Generally I agree with you. I'm just not sure, if we have to bring the heavy ammo and use devDepencencies. Where to install them? Surely not into www/jxcore. And then we need to remove them before app deployment. If we talk about installing extra plugins/platforms (the greatest need I think), we could add e.g. "jxc" : {
plugins : [ "plugin1", "plugin2" ],
platforms : [ "android", "ios"]
} to package.json or separate jxc.json file. Just thinking. Other tasks, like downloading and installing jxcore-cordova plugin as defined e.g. here jxcore/jxcore-cordova#109 will be redundant, since jxc already is doing that. What do you think? |
devDependencies will be installed outside www. I mean in this folder, so it does not have to be removed before deployment. Good thing is that you can build sample after installing without using jxc, with Bad thing about this is that you have to install devDependencies and write io.jxcore.node plugin installation task in gulp for each sample (or this task can be moved to separate file). Creating |
But then: how can the same same gulp file work with jxc and without it? Some of the gulp tasks need to be disabled then when running through jxc. Or we need to have two gulp files. This gets complicated. |
jxc will be used for copying sample folder, then it will run child process - gulp build. After this, user can run gulp build himself if he changes anything in sample code. |
I understand, but my point is that gulp invoked by jxc child process should not e.g. install jxcore-cordova, unpack it and add to the project as in the sample: photos_sqlite_sample/gulpfile.js#L6-L29. That's a job for |
Then we need 2 gulp files, one for common tasks. |
That's what I'm saying :) That's too much if you ask me. I suggest until we don't have a samples really requiring more sophisticated tasks, let's skip the jxc -> gulp concept. I'm tending towards "jxc" in |
OK, so we'll have jxc property in package.json, where we put what plugins and platforms shall be installed. Shall I self assign this task? |
Yeap, feel free if you want to. Thanks! |
There might be several tasks that must be run for running sample, for example adding another plugin except io.jxcore.node or minifying css and js files... We could create gulpfile.js for each sample that will have task called "build". In samples
package.json
:So when running
jxc --sample express_perf
for example, it will executenpm build
(that will startgulp build
).The text was updated successfully, but these errors were encountered: