Skip to content

Instantly share code, notes, and snippets.

@nickserv
Created January 2, 2014 23:08
Show Gist options
  • Save nickserv/8228938 to your computer and use it in GitHub Desktop.
Save nickserv/8228938 to your computer and use it in GitHub Desktop.
Example: Using bower with an npm package
node_modules
bower_components

Usage

  1. Move package.json and .gitignore into your project, or merge in their contents if you already have these files.
  2. Run npm init and bower init if you haven't already set up your npm and bower packages.
  3. Use your dependencies from the bower_components directory as needed.
  4. Run npm install now, and whenever you want to reinstall your package in the future.
{
"scripts": {
"postinstall": "node_modules/.bin/bower install"
},
"dependencies": {
"bower": "*"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment