mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5180 from dhensby/pulls/4/npm-update
Updating required node version
This commit is contained in:
commit
5d3b896297
@ -277,35 +277,41 @@ The [Node.js](https://nodejs.org) JavaScript runtime is the foundation of our cl
|
|||||||
|
|
||||||
The configuration for an npm package goes in `package.json`. You'll see one in the root directory of `framework`. As well as being used for defining dependencies and basic package information, the `package.json` file has some handy scripts.
|
The configuration for an npm package goes in `package.json`. You'll see one in the root directory of `framework`. As well as being used for defining dependencies and basic package information, the `package.json` file has some handy scripts.
|
||||||
|
|
||||||
|
```
|
||||||
|
$ npm run bundle
|
||||||
|
```
|
||||||
|
|
||||||
|
`bundle` generates the lib and leftandmain JavaScript bundles.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run thirdparty
|
$ npm run thirdparty
|
||||||
```
|
```
|
||||||
|
|
||||||
This script copies JavaScript files from the `node_modules` directory into the `thirdparty` directory. The `node_modules` directory is not part of source control, so you'll need to run this command if you have upgraded, or added a module.
|
`thirdparty` copies JavaScript files from the `node_modules` directory into the `thirdparty` directory. The `node_modules` directory is not part of source control, so you'll need to run this command if you have upgraded, or added a module.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run sanity
|
$ npm run sanity
|
||||||
```
|
```
|
||||||
|
|
||||||
This script makes sure files in `thirdparty` match files copied from `node_modules`. You should never commit custom changes to a library file. This script will catch them if you do :smile:
|
`sanity` makes sure files in `thirdparty` match files copied from `node_modules`. You should never commit custom changes to a library file. This script will catch them if you do :smile:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run css
|
$ npm run css
|
||||||
```
|
```
|
||||||
|
|
||||||
This script will compile all of the .scss files into minified .css files. ProTip: run with the `--development` flag to compile non-minified css and watch for every time a .scss file is changed.
|
`css` will compile all of the .scss files into minified .css files. ProTip: run with the `--development` flag to compile non-minified css and watch for every time a .scss file is changed.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run sprites
|
$ npm run sprites
|
||||||
```
|
```
|
||||||
|
|
||||||
This script generates sprites from the individual image files in `admin/images/sprites/src`.
|
`sprites` generates sprites from the individual image files in `admin/images/sprites/src`.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm run lock
|
$ npm run lock
|
||||||
```
|
```
|
||||||
|
|
||||||
Generates a "shrinkwrap" file containing all npm package versions and writes it to `npm-shrinkwrap.json`.
|
`lock` generates a "shrinkwrap" file containing all npm package versions and writes it to `npm-shrinkwrap.json`.
|
||||||
Run this command whenever a new package is added to `package.json`, or when updating packages.
|
Run this command whenever a new package is added to `package.json`, or when updating packages.
|
||||||
Commit the resulting `npm-shrinkwrap.json`. This uses
|
Commit the resulting `npm-shrinkwrap.json`. This uses
|
||||||
a third party [npm-shrinkwrap](https://github.com/uber/npm-shrinkwrap) library
|
a third party [npm-shrinkwrap](https://github.com/uber/npm-shrinkwrap) library
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
"test": "tests"
|
"test": "tests"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "~4.2.0"
|
"node": "^4.2.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
|
"bundle": "gulp bundle",
|
||||||
"sanity": "gulp sanity",
|
"sanity": "gulp sanity",
|
||||||
"thirdparty": "gulp thirdparty",
|
"thirdparty": "gulp thirdparty",
|
||||||
"css": "gulp css",
|
"css": "gulp css",
|
||||||
|
Loading…
Reference in New Issue
Block a user