diff --git a/README.md b/README.md index d592bb3a..5b7d8f5b 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ Using SCSS allows us to use mixins, functions and variables from the NICE Design **TL;DR;** to run the project locally, do the following: -- install [Node 10+](https://nodejs.org/en/download/) or latest LTS version +- install [Node 14+](https://nodejs.org/en/download/) or latest LTS version. Or even better, use [Volta](https://volta.sh/) to use the Node version pinned in package.json. - run `npm i` on the command line to install dependencies - run `npm start` on the command line - navigate to http://localhost:8080/ in a browser. @@ -287,14 +287,14 @@ Install the package and require the `Header` and `Footer` React components into #### Installation -First, install the _@nice-digital/global-nav_ package into your project, directly from GitHub: - -> Note: we currently don't publish the Global Nav to npm but we plan to in the future. +First, install the _@nice-digital/global-nav_ package [from npm](https://www.npmjs.com/package/@nice-digital/global-nav) into your project: ```sh -npm install nice-digital/global-nav --save +npm i @nice-digital/global-nav --save ``` +> Note: we used to recommend installing directly from GitHub via `npm i nice-digital/global-nav --save` (notice the missing _@_), which still works but we now recommend using npm. + Then, require the header and/or footer into your application: #### Usage diff --git a/package.json b/package.json index 32f8cbf1..8daeba50 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start:nohot": "cross-env HOT=false webpack serve --mode development", "// PRODUCTION BUILDS": "", "build": "webpack --mode=production --config webpack.config.prod.js", - "es5ify": "cross-env NODE_ENV=production babel src -d lib --copy-files --no-copy-ignored --ignore \"src/**/*.test.js\",\"src/**/*.test.jsx\",\"src/setupTests.js\",\"src/polyfill/**/*.js\"", + "es5ify": "cross-env NODE_ENV=production babel src -d lib --extensions \".js\",\".jsx\",\".snap\" --copy-files --no-copy-ignored --ignore \"src/**/*.test.js\",\"src/**/*.test.jsx\",\"src/setupTests.js\",\"src/polyfill/**/*.js\",\"src/cdn.js\",\"src/**/*.snap\"", "// TESTS": "", "test": "npm run lint && npm run test:unit", "test:unit": "jest --notify", @@ -48,7 +48,7 @@ "access": "public" }, "engines": { - "node": ">= 8.9" + "node": ">= 12" }, "devDependencies": { "@babel/cli": "^7.13.16", @@ -131,5 +131,8 @@ ], "directories": { "lib": "lib" + }, + "volta": { + "node": "14.18.1" } }