Skip to content

Commit 625d25e

Browse files
committed
"dev" npm script
1 parent 632629f commit 625d25e

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

Gruntfile.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,14 @@ module.exports = function (grunt) {
126126
});
127127

128128
grunt.registerTask('server', [
129-
'webpack:default',
130129
'connect',
131130
'watch'
132131
]);
133132

134-
grunt.registerTask('default', ['server']);
133+
grunt.registerTask('default', [
134+
'webpack:default',
135+
'server'
136+
]);
135137

136138
grunt.registerTask('test', [
137139
'clean:temp',

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ The ui-scroll sources are in [./src](https://github.com/angular-ui/ui-scroll/tre
403403
because of ES6 modules (since v1.6.0), they should be built. Build process includes jshint sources verification, webpack-based
404404
distributive files forming and tests running.
405405

406-
Three npm scripts are available for developing.
406+
There are some npm scripts available for developing.
407407

408408
__1__. To run dev-server use
409409

@@ -426,7 +426,16 @@ npm test
426426
than 160 tests. They are living at the [./test](https://github.com/angular-ui/ui-scroll/tree/master/test) folder. Karma watches for temp
427427
and test folders changes and automatically re-runs tests.
428428

429-
__3__. To run full build use
429+
__3__. To run both dev-server and tests in keep-alive mode use
430+
431+
```
432+
npm run dev
433+
```
434+
435+
This is the combination of first two scripts running in concurrently mode. This allows you to work with the ui-scroll examples on 5005 port
436+
during continuous tests running.
437+
438+
__4__. To run full build process use
430439

431440
```
432441
npm run build

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919
},
2020
"license": "MIT",
2121
"scripts": {
22-
"start": "grunt server",
23-
"build": "grunt build",
24-
"test": "grunt test"
22+
"start": "grunt",
23+
"test": "grunt test",
24+
"dev": "concurrently --kill-others --raw \"grunt server\" \"grunt test\"",
25+
"build": "grunt build"
2526
},
2627
"devDependencies": {
2728
"babel-core": "^6.22.1",
2829
"babel-loader": "^6.2.10",
2930
"babel-preset-es2015": "^6.22.0",
3031
"clean-webpack-plugin": "^0.1.15",
32+
"concurrently": "^3.4.0",
3133
"express": "^4.14.0",
3234
"grunt": "^1.0.1",
3335
"grunt-contrib-clean": "^1.0.0",

0 commit comments

Comments
 (0)