I used yeoman to scaffold an angular app and I'm trying to figure out how to use the existing minified file version of the lib in the bower_components folder rather than minifying it in my build process.
Is it possible?
You can use bower-installer which is a node package to control which files to be copied to your lib folder from the downloaded distribution package folder.
https://www.npmjs.com/package/bower-installer
I followed below steps to select which files to be copied to my lib folder
1) Install bower-installer
npm install -g bower-installer
2) Edit bower.json configuration file and specify path
3) Run bower-installer from terminal
Related
I have an Electron+Angular application.
When I build the Angular app, it goes to dist folder, ok. And when I use electron-packager and electron-builder, it put the files inside dist too.
For the first version it's ok. The problem is when I'm building a second version. It packs the old version files that is inside dist folder. And the result is a large .exe file.
These is the commands I'm using to pack and publish my app:
electron-packager . --overwrite --asar=true --platform=win32 --ignore=ˆ/tmp
electron-builder --publish always
How can I prevent the old version files to be packed in new versions? Should I remove them every time I build a new version?
I finally solved my problem
I'm new with Electron, so I though that run electron-packager was necessary before publish new versions.
You only need to run:
electron-builder --publish always
electron-packager packs everything inside dist folder and creates a new folder outside dist.
electron-builder create necessary files to publish but ignores the old version files that was created for it. But if you have that new folder created by electron-packager it'll be published too and your .exe will be very large.
I have a asp.net mvc 5 project that utilizes npm for package management.
I include node_modules directory in output and publish my project.
I then upload my project on a plesk host.
The file(s) in the Script directory load successfully, however files that are in the node_modules directory do not load.
When I rename the node_modules directory to Modules it fixes the problem. However, this is not my answer.
Where is problem? plesk does not find node_modules?
Is there some permission policy in plesk that may be causing this issue?
Why do you want to pack the node_modules? Is it not supposed to be installed by npm based on your package.json dependencies when your package is being installed or brought in as a dependency by other packages ¯_(ツ)_/¯
On a side note, even if you want to pack node_modules, is there an .npmignore or a .gitignore having a node_modules entry in it?
When I install the following package from this git url, it creates a directory /flyLabel.js
bower install https://github.com/space150/flyLabel.js.git
The fact the directory has a dot in its name is causing issues elsewhere when I am trying to include it.
Question
Is there a way to change the name of the directory Bower is going to create when it installs the package?
I initialized a bower project under d:\myProject and if i run bower install angularjs the packages are copy in the same folder. But what i need to do is to copy the packages under d:\myprojects\src\resources\static. How can i do that?
Bower's docs tell you that adding the "directory" tag in your .bowerrc file will make bower put downloaded packages in that dir.
notice that the path is relative to where you have the project's json so in your case:
{
"directory": "src/resources/static/"
...
}
Also see this answer and this one.
I have create a folder (named webapp) in a Dart project where I put some server side classes. When I run pub install ( or pub update ), to import the libraries that I use in the project, the dependencies are correctly download and some link to this folder are created in some default folders ( eg: web, out ecc ).
there is a way to generate automatically a link to the package folder in my webapp ( or any custom folder ) folder?
I don't think it is possible to make pub generate packages in a not standard directory.
In pub install documentation you can read the section Linked packages directories :
It assumes your package is laid out according to the package layout guide, and creates a linked packages directory in bin/, test/, and example/, as well as their subdirectories.