Skip to content

Commit 52187e2

Browse files
chore(npm-scripts): ensure they work on Windows
1 parent 5d2baf8 commit 52187e2

File tree

6 files changed

+18
-28
lines changed

6 files changed

+18
-28
lines changed

.travis.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ node_js:
55
before_script:
66
- export DISPLAY=:99.0
77
- sh -e /etc/init.d/xvfb start
8-
- npm install --quiet -g karma
9-
- npm install --quiet -g protractor
10-
- ./scripts/web-server.js > /dev/null &
8+
- npm start
119
- sleep 1 # give server time to start
1210

1311
script:
14-
- karma start config/karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
15-
- webdriver-manager update
16-
- protractor config/protractor-conf.js --browser=firefox
12+
- node_modules/.bin/karma start test/karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
13+
- node_modules/.bin/protractor test/protractor-conf.js --browser=firefox

app/index-async.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
</style>
1010
<script>
1111
// include angular loader, which allows the files to load in any order
12-
13-
/*
12+
/*
1413
AngularJS v1.2.15
1514
(c) 2010-2014 Google, Inc. http://angularjs.org
1615
License: MIT
1716
*/
1817
(function(){'use strict';function d(a){return function(){var c=arguments[0],b,c="["+(a?a+":":"")+c+"] http://errors.angularjs.org/1.2.15/"+(a?a+"/":"")+c;for(b=1;b<arguments.length;b++)c=c+(1==b?"?":"&")+"p"+(b-1)+"="+encodeURIComponent("function"==typeof arguments[b]?arguments[b].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[b]?"undefined":"string"!=typeof arguments[b]?JSON.stringify(arguments[b]):arguments[b]);return Error(c)}}(function(a){var c=d("$injector"),b=d("ng");a=a.angular||
19-
(a.angular={});a.$$minErr=a.$$minErr||d;return a.module||(a.module=function(){var a={};return function(e,d,f){if("hasOwnProperty"===e)throw b("badname","module");d&&a.hasOwnProperty(e)&&(a[e]=null);return a[e]||(a[e]=function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return g}}if(!d)throw c("nomod",e);var b=[],h=[],k=a("$injector","invoke"),g={_invokeQueue:b,_runBlocks:h,requires:d,name:e,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide",
18+
(a.angular={});a.$minErr=a.$minErr||d;return a.module||(a.module=function(){var a={};return function(e,d,f){if("hasOwnProperty"===e)throw b("badname","module");d&&a.hasOwnProperty(e)&&(a[e]=null);return a[e]||(a[e]=function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return g}}if(!d)throw c("nomod",e);var b=[],h=[],k=a("$injector","invoke"),g={_invokeQueue:b,_runBlocks:h,requires:d,name:e,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide",
2019
"service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:k,run:function(a){h.push(a);return this}};f&&k(f);return g}())}}())})(window)})(window);
2120
//# sourceMappingURL=angular-loader.min.js.map
2221

22+
2323
// include a third-party async loader library
2424
/*!
2525
* $script.js v1.3

bower.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
"homepage": "https://github.com/angular/angular-seed",
66
"license": "MIT",
77
"private": true,
8-
"ignore": [
9-
"**/.*",
10-
"node_modules",
11-
"bower_components",
12-
"test",
13-
"tests"
14-
],
158
"dependencies": {
169
"angular": "1.2.x",
1710
"angular-route": "1.2.x",

logs/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@
66
"repository": "https://github.com/angular/angular-seed",
77
"license": "MIT",
88
"devDependencies": {
9-
"phantomjs": "~1.9",
109
"karma": "~0.10",
11-
"karma-junit-reporter": "~0.1",
12-
"karma-jasmine": "~0.1",
1310
"protractor": "~0.17.0",
1411
"http-server": "^0.6.1",
15-
"bower": "^1.3.1"
12+
"bower": "^1.3.1",
13+
"shelljs": "^0.2.6"
1614
},
1715
"scripts": {
18-
"postinstall": "node node_modules/.bin/bower install; sed '/@@NG_LOADER@@/{\ns/@@NG_LOADER@@//g\nr bower_components/angular-loader/angular-loader.min.js\n}' app/index-async.html.template > app/index-async.html",
16+
"postinstall": "bower install",
17+
"postupdate": "bower update",
1918

20-
"prestart": "npm install",
21-
"start": "node node_modules/.bin/http-server",
19+
"start": "http-server -p 8000",
20+
"test": "karma start test/karma.conf.js --single-run",
2221

23-
"pretest": "npm install",
24-
"test": "node node_modules/.bin/karma start config/karma.conf.js",
25-
26-
"protractor": "npm install; node node_modules/.bin/webdriver-manager update; node node_modules/.bin/protractor config/protractor-conf.js"
22+
"update-webdriver": "webdriver-manager update",
23+
"protractor": "protractor test/protractor-conf.js",
24+
"test-watch": "karma start test/karma.conf.js",
25+
26+
"update-index-async": "node -e \"require('shelljs/global'); sed('@@NG_LOADER@@', cat('bower_components/angular-loader/angular-loader.min.js'), 'app/index-async.html.template').to('app/index-async.html');\""
2727
}
2828
}

test/protractor-conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports.config = {
99
'browserName': 'chrome'
1010
},
1111

12-
baseUrl: 'http://localhost:8080/app/',
12+
baseUrl: 'http://localhost:8000/app/',
1313

1414
framework: 'jasmine',
1515

0 commit comments

Comments
 (0)