Skip to content

Commit 70b678a

Browse files
javoskiamorey
authored andcommitted
add npm scripts
1 parent 6df6dc1 commit 70b678a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,22 +249,22 @@ loadjs/
249249
1. Build examples
250250

251251
```bash
252-
$ ./node_modules/.bin/gulp examples:build
252+
$ npm run build:examples
253253
```
254254

255255
To view the examples you can use any static file server. To use the `nodejs` http-server module:
256256

257257
```bash
258258
$ npm install http-server
259-
$ ./node_modules/.bin/http-server -p 3000
259+
$ npm run serve
260260
```
261261

262262
Then visit http://localhost:3000/examples
263263

264264
1. Build distribution files
265265

266266
```bash
267-
$ ./node_modules/.bin/gulp dist:build
267+
$ npm run build
268268
```
269269

270270
The files will be located in the `dist` directory.
@@ -274,7 +274,7 @@ loadjs/
274274
To run the browser tests first build the `loadjs` library:
275275

276276
```bash
277-
$ ./node_modules/.bin/gulp test:build
277+
$ npm run build:test
278278
```
279279

280280
Then visit http://localhost:3000/test

package.json

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
"url": "https://github.com/muicss/loadjs.git"
1919
},
2020
"main": "dist/loadjs.umd.js",
21+
"scripts": {
22+
"build": "gulp dist:build",
23+
"build:examples": "gulp examples:build",
24+
"build:test": "gulp test:build",
25+
"serve": "http-server -p 3000"
26+
},
2127
"devDependencies": {
2228
"del": "2.2.2",
2329
"gulp": "git+https://github.com/gulpjs/gulp#4.0",

0 commit comments

Comments
 (0)