-
Notifications
You must be signed in to change notification settings - Fork 15
npm scripts not triggered for ionic-cli 3.x #18
Comments
Hi @begriffin! |
I have I just took a guess at the keys after digging through things and not finding any reason why I was getting the error: When I changed to the |
Maybe there was a change in |
After switching to
Actually any script is ignored, even But I don't understand why this works for you if you change the script names!? I think I will have to spend some time to investigate this... |
As I couldn't find any code that implements this feature in |
I have upgraded to Ionic CLI 3.1.2 and the suddenly realised that this plugin no longer was building during build of my app. But for others in the same situation there is a simple solution until the proper hook will be available. Just execute: npm run prebuild Then you will manually have to remember if the icons have been updated :-) |
npm run ionic2-custom-icons should do the trick |
Yes, you are right. I was assuming that you had updated package.json according to the istallation guide, så I had this in my file
I also realised that running
would build all |
Good news! The Ionic team provides a solution very soon. :-) See the last messages in the corresponding issue thread: ionic-team/ionic-cli#1989 (comment) |
It looks like the new CLI (3.4) now resolves this issue: https://github.com/ionic-team/ionic-cli/blob/master/CHANGELOG.md Would an acceptable integration be |
It is working fine with "ionic:build:before": "ionic2-custom-icons" Is there a way to get output from the build? Now the result looks like this
|
If you are lazy like me you could add I use that as a sanity check before I start release builds :) However since 3.4 supports gulp tasks, a better solution would be to hook the gulp task into the CLI events and then you could control the outputs and errors. |
Npm script hooks have been fixed in Sounds like @Gemeapp got it working! 😄 Are you sure you are using the latest version of Unfortunately I'm on a hiking trip right now and don't have access to a dev machine to test it and make changes except updating the docs. |
@begriffin @ThorvaldAagaard @davyzhang @mwiley63 |
Alias Gemeapp :-) This is ionic info global packages:
local packages:
System:
And there is no output from the "ionic:build:before": "ionic2-custom-icons", |
@ThorvaldAagaard Thanks! I have reported the issue to the Ionic team. ionic-team/ionic-cli#2124 (comment) |
Using the latest alpha release of
Don't forget to update when a new stable release becomes available! |
The hooks work for |
Just a quick note for updated ionic-app-scripts.
You need to change the scripts section in package.json to:
The text was updated successfully, but these errors were encountered: