hoodiehq / faq

Frequently asked questions about Hoodie
faq.hood.ie
11 stars 3 forks source link

Including Bootstrap / jQuery through node (npm) #118

Open julianhendricks opened 9 years ago

julianhendricks commented 9 years ago

Hello Hoodies,

i tried out Hoodie a few days ago and now i'm setting up a clean installation without the demo code. For my basic setup i want to include jQuery and Bootstrap, but i want to manage the versions of both by using npm. I just included these by executing "npm install xxx --save" and got an entry in my package.json file ("dependencies") and the directories under /node_modules/ . Now i wonder how to get these files from the Hoodie app (/www/ is the documentroot and the client is not able to browse to /node_modules/). Is there any workaround to get those files under /www/ ? I thought about using symlinks but i think this solution is still a little bit "dirty" :)

Do you have any idea how to handle this? Is there any hidden Hoodie magic? ;)

Thanks in advance :)

Julian

gr2m commented 9 years ago

Hey Julian,

I'm afraid there is no hidden trick for that part. If we want front-end dependencies to be bundled with our app, we usually have a build step that concatinates and minifies all assets and puts them into www/, while the dev server starts at its own port, and starts the Hoodie server in the background. You can use grunt-hoodie for that