Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GN-116 Publishing to npm #142

Merged
merged 2 commits into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
}