Skip to content

Commit

Permalink
GN-116 Publishing to npm (#142)
Browse files Browse the repository at this point in the history
* GN-116 Pin Node version with Volta

* GN-116 Update readme
  • Loading branch information
ediblecode authored Nov 5, 2021
1 parent 8c2b7a8 commit 52e08c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -48,7 +48,7 @@
"access": "public"
},
"engines": {
"node": ">= 8.9"
"node": ">= 12"
},
"devDependencies": {
"@babel/cli": "^7.13.16",
Expand Down Expand Up @@ -131,5 +131,8 @@
],
"directories": {
"lib": "lib"
},
"volta": {
"node": "14.18.1"
}
}

0 comments on commit 52e08c7

Please sign in to comment.