From 3dea62a46b1742a3ef79fce419cc8a4c9e32cc51 Mon Sep 17 00:00:00 2001 From: Vladimir Polyakov Date: Tue, 22 Dec 2015 21:40:51 +0300 Subject: [PATCH] fix issue with undefined _, add parallelshell for safe script execution and chokidar for watch less --- app/components/builds/view/index.jade | 2 +- app/styles/index.less | 1 - package.json | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/components/builds/view/index.jade b/app/components/builds/view/index.jade index ba4e0fa..6076cec 100644 --- a/app/components/builds/view/index.jade +++ b/app/components/builds/view/index.jade @@ -69,7 +69,7 @@ mixin statusBadge(build) DateTime(value=this.state.build.createDate) if this.state.build.endDate - - var durationTitle = _(this.state.build.stepTimings).map(function(stepTiming) { + - var durationTitle = this.state.build.stepTimings.map(function(stepTiming) { - return stepTiming.name + ': ' + (stepTiming.duration / 1000).toFixed(1) + ' sec'; - }).join('\n'); | , finished diff --git a/app/styles/index.less b/app/styles/index.less index e98e31f..c309490 100644 --- a/app/styles/index.less +++ b/app/styles/index.less @@ -24,4 +24,3 @@ @import "./components/builds.less"; @import "./components/projects.less"; @import "./components/terminal.less"; - diff --git a/package.json b/package.json index 33b4a29..bebfda1 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,10 @@ "test": "npm run makeTestRepos && mocha --bail --reporter=spec --timeout 4000", "build-less": "lessc app/styles/index.less > static/css/index.css", "build-js": "browserify app/app.js -t ./transforms/jade.js | uglifyjs -mc > static/js/app.build.js", - "watch-less": "nodemon --ext less --watch app/styles --exec 'npm run build-less'", + "watch-less": "chokidar --initial --silent app/styles/**/*.less app/styles/index.less -c 'npm run build-less'", "watch-js": "watchify app/app.js -t ./transforms/jade.js -o static/js/app.build.js -dv", "watch-server": "nodemon --ignore app --ignore static --ignore node_modules --ignore data app.js", - "dev": "npm run build-fonts && npm run watch-less & npm run watch-js & npm run watch-server", + "dev": "parallelshell 'npm run build-fonts' 'npm run watch-less' 'npm run watch-js' 'npm run watch-server'", "sync": "npm install && npm prune", "build-fonts": "cp ./node_modules/bootstrap/fonts/* ./static/fonts/ & cp ./node_modules/font-awesome/fonts/* ./static/fonts/", "build-clean": "rm static/index.html", @@ -70,6 +70,7 @@ "underscore": "1.8.3" }, "devDependencies": { + "chokidar-cli": "^1.2.0", "expect.js": "0.3.1", "jade": "1.11.0", "jshint": "^2.9.1-rc1", @@ -79,6 +80,7 @@ "nci-yaml-reader": "0.1.0", "nodemon": "1.3.7", "nrun": "0.1.4", + "parallelshell": "^2.0.0", "sinon": "1.14.1", "uglifyjs": "^2.4.10", "watchify": "^3.6.1"