I used to install plugins in my ion project 1 with a gazebo. A new trend, especially with ion 2, is installing packages with npm. Some basic packages, such as ionic.cloud , are no longer provided with a gazebo even for ionic 1.x.
So, I need to transfer some packages to npm number. What is the recommended way to do this?
My problem:
- "npm install" seems to install packages in the "my_project / node_modules" folder, unlike bower, which installs packages directly in my_project / www / lib /
As explained, for example, in the ionic.cloud installation guide , this requires an additional step to copy the recently installed npm package to the lib folder with the command:
cp node_modules/@ionic/cloud/dist/bundle/ionic.cloud.min.js www/lib
However, when I update the package and run "npm update", this will update the node_modules folder, but not the lib folder. This is a problem since only the files from my lib folder are included in my index.html.
Running a cp command after every npm update doesn't seem like such an elegant solution. What is the recommended way to handle this?
source share