Closed tomwayson closed 7 years ago
Update on this (partially so I don't forget current status over the weekend): I am in the process of doing this upgrade: https://github.com/gavinr/generator-esri-appbuilder-js/tree/yeoman-generator-1.0
... looks like one of the issues with the upgrade to 1.0 is that in 1.0 they have removed the gruntfile API, and our generator is currently using this api (Example). I do not see in the issue nor in the commit a recommendation on the recommended way to integrate gruntfile creation without this being there. I will explore integrating gruntfile-editor
directly in our generator, but would love to get some advice on "best practice" before I go off and do that, if possible.
I'm only half joking when I say that maybe this is a good excuse to move away from grunt and to use npm scripts instead. It would take some effort to get the initial set up right, but I think we could get something that would run better (namely using babel's watch in parallel instead of running babel in an external watch, which is always slower). Here are cross-platform packages for the tasks we need:
We'd also want to use https://www.npmjs.com/package/concurrently to run babel in watch mode in parallel to the other watch.
I've successfully used all the above before.
The other thing we currently do w/ grunt is use variables for the output (stemapp and app) directories If that's still needed, we could try npm config.
Thoughts?
I like it. I'll play with some of the ideas and let you know which way I'm leaning.
@tomwayson I have an example of what we'd like the generated package.json
to look like - see here:
https://github.com/gavinr/web-appbuilder-dev-example/blob/master/package.json
My concerns are:
npm config
, but I cannot find a cross-platform solution for using environmental variables (https://github.com/npm/npm/issues/10575#issuecomment-163384277) - do you have any ideas on that?@gavinr thanks for starting on this. I'll play around w/ your example repo and try config/environment, etc after I've got WAB installed to test #80 and this. I'll post my findings over in #81.
resolved in #80
http://yeoman.io/blog/hello-generator-1.0.html