Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0bfed6

Browse files
committed
updated so that all command executions use local npm packages. ( and added live-server).
1 parent 22c7b5c commit d0bfed6

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

gulpfile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ gulp.task('help', taskListing.withFilters(function(taskName) {
5757
gulp.task('serve-and-sync', ['build-docs'], function (cb) {
5858

5959
// execCommands(['harp server'], {}, cb);
60-
execCommands(['npm run harp'], {}, cb);
60+
execCommands(['npm run harp -- server .'], {}, cb);
6161

6262
var browserSync = require('browser-sync').create();
6363
browserSync.init({
@@ -78,7 +78,7 @@ gulp.task('serve-and-sync', ['build-docs'], function (cb) {
7878
});
7979

8080
gulp.task('serve-and-watch', function (cb) {
81-
execCommands(['harp server'], {}, cb);
81+
execCommands(['npm run harp -- server .'], {}, cb);
8282
devGuideExamplesWatch(_devguideShredOptions);
8383
});
8484

@@ -168,8 +168,8 @@ gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
168168
});
169169

170170
gulp.task('check-deploy', function() {
171-
return execPromise(['harp compile . ./deploy'], {}).then(function() {
172-
execPromise('live-server', {cwd: './deploy'});
171+
return execPromise(['npm run harp -- compile . ./deploy'], {}).then(function() {
172+
execPromise('npm run live-server ./deploy');
173173
return askDeploy();
174174
}).then(function(shouldDeploy) {
175175
if (shouldDeploy) {

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"main": "index.js",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
9-
"harp": "harp server .",
9+
"harp": "harp",
10+
"live-server": "live-server",
1011
"test-api-builder": "jasmine-node public/api-builder"
1112
},
1213
"repository": {
@@ -43,6 +44,7 @@
4344
"karma": "^0.13.9",
4445
"karma-chrome-launcher": "^0.2.0",
4546
"karma-jasmine": "^0.3.6",
47+
"live-server": "^0.8.1",
4648
"lodash": "^3.10.1",
4749
"marked": "^0.3.5",
4850
"minimatch": "^2.0.10",

0 commit comments

Comments
 (0)