A command line utility to ease the link
-ing of local bower modules
Almost completely based on and fully compatible with npm-workspace by Mario Casciaro.
npm install -g bower-workspace
Create a workspace.json
in your workspace dir, and create mappings module name -> module dir
{
"links": {
"prj2": "prj2",
"prj3": "prj3"
}
}
Then
cd myBowerWorkspace
bower-workspace install
cd myBowerWorkspace/prj1
bower-workspace install
cd myBowerWorkspace
bower-workspace clean
When you are ready to deploy your app, you can package all your modules for production, including all your private/local only modules. Just use these 3 options:
-c
: Copy the packages intobower_components
instead of linking them-g
: Remove.git
directories from dependencies while copying. This is so you can package your production app under a new repo (e.g. for use in a PaaS)-p
: Installs only production dependencies (ignoresdevDependencies
)
Example
cd myNodeJsWorkspace/yourapp
bower-workspace install -cgp
Your app is now ready for deployment.