-
Notifications
You must be signed in to change notification settings - Fork 133
Use npm scripts as alias #466
Comments
@MathiasTim, I really like the idea of supplying a default set of commands via npm scripts. Thank might actually clarify some the main workflows of the generator for beginners and clear up any initial confusion of how certain things are done. Really good idea 👍 Additionally, we could still provide a guide on what they do and how to configure them. |
@MathiasTim, one of the many great things about this is: you can make your common flags part of the command. For instance
And you're done. This might make our I like this idea so much. I'm actually a little jealous that I didn't think of this! :) |
This will also make it a lot easier to distribute best practices and avoid common pitfalls when running cordova commands for instance. Additionally a guide would make sense, I think. To configure the default script using for instance However, we need to be aware that it will be perceived as our responsibility by the users that these commands will work. We're adding another layer of complexity and some might not even care that we're using gulp, cordova and all that underneath... |
This would be my initial suggestion: "scripts": {
"test": "npm run build && gulp karma",
"start": "gulp watch",
"watch": "npm start",
"prepare": "gulp --cordova 'prepare'",
"livereload:ios": "gulp --livereload 'run ios'",
"livereload:android": "gulp --livereload 'run android'",
"run:ios": "gulp --cordova 'run ios",
"run:android": "gulp --cordova 'run android'",
"watch:build": "gulp watch-build",
"build": "gulp build --minify"
} @MathiasTim, @lordgreg. Comments? |
From my perspective this is a good start. |
I'd wait through weekend. Maybe we could think of more of the commands. 🥇 |
docs, how to use options: npm run watch -- --env=prod |
We could use npm scripts for "complicated commands"
e.g.
could be
Don't know if its just something we could write in a guide or preconfigure for some commands in the generated project.
What do you think @lordgreg @gruppjo ?
The text was updated successfully, but these errors were encountered: