linemanjs / lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change
MIT License
1.18k stars 83 forks source link

How can I move the my-lineman-app/node_modules folder to a folder outside my-lineman-app #371

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi - I'm writing this in hopes of saving the the blood, toil, sweat, and tears of figuring it out in case someone else has done it already. I have figured out what to do about the vendor files.

Our company police establishes that only our own source code are to be kept in our repositories. All the files in _my-lineman-app/nodemodules and vendor are not our source code and must be moved elsewhere.

Thanks in advance for your help.

Regards

ghost commented 8 years ago

I thought I found the problem when I added _my-lineman-app/nodemodules to .gitignore. Close, but no cigar. I need these modules in the build server and I would like to avoid having to npm install every build. My next step is to install them globally in the build server and see what happens. In the mean time, any insights would be welcome.

NOTE: I used the maven-exec plugin to run npm install on the my-lineman-app folder, see this link for an excellent reference. This worked well, except that it added a bit of time for all the node_modules to be downloaded.

I'll leave this issue open in hopes someone has a suggestion on how to shorten the build time.

ghost commented 8 years ago

I found the answer, the npm registry enables me to set up a local registry.

How about this ... I created the issue ... then banged my head around and ended up finding a way to deal with it before anyone added any comments.

Well, sorry for polluting the roster, although this might be useful to someone else.

searls commented 8 years ago

Thanks for documenting what you did @dematic-rodrigo-silveira.