Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Installing Dependencies

Setting up babel, webpack for every project or once?

Hello,

Do we need to do npm install for all these packages in ever project or is this something we do only once?

2 Answers

You can set up all of this stuff in one project folder and use that folder for every project that you make. However, doing this requires more work to make sure the projects stay separate from one another. It is a real pain and something that you would be hard-pressed to find directions for on the web...but still a thing that can be done.

Yes, you will have to do this setup everytime you want to use those packages.

One thing that you can do is create a generic project that just has all of this stuff already set up for you to use and nothing else included (no packages above and beyond what you need for initial setup). You can either copy this folder every time you want to start a new project or add it to a local git repo or github repo and then clone that project everytime you start a new one.

I would recommend either a local repo or one stored on github...either way learning git is a good idea (please refer to links above for more information).

I hope this helps

Thanks for the recommendation Daniel, github sounds like a very good way:)