CBP Theme is an npm project built and bundled using webpack.
- Install Node 6.0.0 or greater
- For running multiple versions of Node nvm is highly recommended.
- Note: npm comes bundled with versions of Node.js v0.6.3+
- Install Git.
- Verify that you have node, git, and npm installed and accessible from your path.
git --version
node --version
npm --version
If you do not see the version number after running each of the above commands, you may need to reinstall.
After verifying git, node and npm installations, following in the directory where you cloned the repository:
- clone the repository by running
git clone https://github.com/US-CBP/cbp-theme.git
- navigate into the `cbp-theme' directory from the repository you just cloned. From this repostory run:
npm install
npm build
Boom! You've just built the latest cbp-theme from source!
As you make changes and to code, re run the npm build script and visit the demo kitchen sink application to see your changes.
See below for more info on developing:
We use Webpack for our build process wrapped by npm commands:
- npm install - downloads and resolves depedencies
- npm run build - builds the dependencies via Webpack
- npm run dev - builds via Webpack
- npm run server - builds and serves it up via Webpack
- npm run a11y - runs pa11y accesibility on the kitchen sink (assumes npm run serve has been called)
A demo app is located under app/kitchensink with all the components available so that one can experiment and test changes. Run 'npm run dev', which builds and uses gulp serve. The demo app runs localhost:8888/webpack-dev-server
Browse the list of open issues on github to get started with a bug fix.
We use SemVer system of versioning (MAJOR MINOR PATCH)
- Run npm version patch (or minor, major)
- Run npm publish to publish the current version to NPM's public registry
- Self publish the webjar by going to WebJars and adding a new webjar using the name cbp-theme. Then select the appropriate version.