This app is now deprecated, the app will be only updated for critical updates or bug fixes for areas of the site that have not been migrated to use the dp-design-system.
If you work across multiple Node.js projects there's a good chance they require different Node.js and npm versions.
To enable this we use nvm (Node Version Manager) to switch between versions easily.
Note brew is not supported as an installation option
- Clone this repo in the root of your user profile
cd ~/
from anywhere thengit clone https://github.com/nvm-sh/nvm.git .nvm
cd ~/.nvm
and check out the latest version with e.g.git checkout v0.39.7
- Activate
nvm
by sourcing it from your shell:. ./nvm.sh
Add these lines to your ~/.bashrc
, ~/.profile
, or ~/.zshrc
file to have it automatically sourced upon login:
(you may have to add to more than one of the above files)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
- Run nvm install in the project directory (this will use .nvmrc)
nvm install
- Run
npm install && npm run dev
from the root of the repo you've cloned onto your machine. - Use the JS and CSS files in the
dist
directory.
This app uses jQuery, the calling app will need to have the following snippet inserted above the sixteens JS injection.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
- Either run
npm run dev
orrun.sh
in the root of the project. This boots up an npm watch command that'll re-build your JS, CSS on change and host it at localhost:9000/dist/folder/file. - New JS files go into the
js
directory and the path added into the config object in the package.json. You'll need to restartnpm run dev
if you edit the package.json for the watch to detect them. - New SCSS files should be added to the
scss
directory. Add the path intomain.scss
andold-ie.scss
.
Sixteens builds a separate CSS file for 'work in progress' styling.
SCSS for these patterns are stored in scss/work-in-progress
. Once they're a production pattern they should be moved into the usual SCSS file structures.
To build the work in progress patterns run:
npm run build-work-in-progress
or to re-build these patterns automatically when an SCSS file is updated run:
npm run watch-work-in-progress
This will create or update the work-in-progress.css
file in dist
.