From 34c9e9b2fddbd7a6d6d22c720fc4b171b8d55220 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 1 Jul 2016 16:39:53 +0100 Subject: [PATCH] Simplified package configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - deprecate http-server and ‘proser-sync’ libs - remove useless ‘start’ and ‘server’ scripts from component projects (only demo projects need that) - decouple ‘install’ and ‘start’ scripts, ‘start’ script no longer runs second install --- ng2-components/ng2-alfresco-core/package.json | 8 +++---- .../demo/browser-sync-config.js | 23 ------------------- .../ng2-alfresco-login/demo/package.json | 9 ++++---- .../ng2-alfresco-login/package.json | 4 ++-- .../demo/browser-sync-config.js | 23 ------------------- .../ng2-alfresco-search/demo/package.json | 9 ++++---- .../ng2-alfresco-search/package.json | 7 +++--- .../demo/browser-sync-config.js | 23 ------------------- .../ng2-alfresco-upload/demo/package.json | 9 ++++---- .../ng2-alfresco-upload/package.json | 7 +++--- .../demo/browser-sync-config.js | 23 ------------------- .../ng2-alfresco-viewer/demo/package.json | 9 ++++---- .../ng2-alfresco-viewer/package.json | 7 +++--- 13 files changed, 30 insertions(+), 131 deletions(-) delete mode 100644 ng2-components/ng2-alfresco-login/demo/browser-sync-config.js delete mode 100644 ng2-components/ng2-alfresco-search/demo/browser-sync-config.js delete mode 100644 ng2-components/ng2-alfresco-upload/demo/browser-sync-config.js delete mode 100644 ng2-components/ng2-alfresco-viewer/demo/browser-sync-config.js diff --git a/ng2-components/ng2-alfresco-core/package.json b/ng2-components/ng2-alfresco-core/package.json index 8ac47dd126..193b6d76ef 100644 --- a/ng2-components/ng2-alfresco-core/package.json +++ b/ng2-components/ng2-alfresco-core/package.json @@ -6,8 +6,6 @@ "scripts": { "clean": "rimraf dist node_modules typings", "typings": "typings install", - "start": "npm run build && npm run server", - "server": "http-server -c-1 -o -p 8875 .", "build": "npm run tslint && typings install && rimraf dist && tsc && npm run copytemplates && license-check", "tslint": "npm run tslint-src && npm run tslint-root", "tslint-src": "tslint -c tslint.json src/{,**/}**.ts", @@ -25,7 +23,7 @@ "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", "test-browser": "karma start karma.conf.js --reporters kjhtml ", "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", - "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", + "coverage": "npm run test && wsrv -o -p 9875 ./coverage/report", "prepublish": "npm run build" }, "main": "./dist/index.js", @@ -80,7 +78,6 @@ "devDependencies": { "coveralls": "^2.11.9", "cpx": "1.3.1", - "http-server": "0.8.5", "jasmine-ajax": "3.2.0", "jasmine-core": "2.4.1", "karma": "0.13.22", @@ -95,7 +92,8 @@ "traceur": "0.0.91", "tslint": "3.8.1", "typescript": "1.8.10", - "typings": "1.0.4" + "typings": "1.0.4", + "wsrv": "0.1.3" }, "license-check-config": { "src": [ diff --git a/ng2-components/ng2-alfresco-login/demo/browser-sync-config.js b/ng2-components/ng2-alfresco-login/demo/browser-sync-config.js deleted file mode 100644 index bd5f084318..0000000000 --- a/ng2-components/ng2-alfresco-login/demo/browser-sync-config.js +++ /dev/null @@ -1,23 +0,0 @@ -var browserSync = require("browser-sync").create(); -var historyApiFallback = require('connect-history-api-fallback'); - -browserSync.init({ - - server: { - baseDir: './', - middleware: [ historyApiFallback() ] - }, - - files: [ - 'index.html', - 'dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-core/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-datatable/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-documentlist/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-login/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-search/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-upload/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-viewer/dist/**/*.{html,htm,css,js}'], - - reloadDelay: 1000 -}); diff --git a/ng2-components/ng2-alfresco-login/demo/package.json b/ng2-components/ng2-alfresco-login/demo/package.json index 48b9c20536..f27b679ead 100644 --- a/ng2-components/ng2-alfresco-login/demo/package.json +++ b/ng2-components/ng2-alfresco-login/demo/package.json @@ -8,8 +8,8 @@ "clean": "rimraf dist node_modules typings", "typings": "typings install", "postinstall": "npm run typings && npm run build", - "start": "npm install && npm run typings && concurrently \"npm run build:w\" \"npm run server\" ", - "server": "node browser-sync-config.js", + "start": "concurrently \"npm run build:w\" \"npm run server\" ", + "server": "wsrv -o -l -s", "build": "npm run tslint && rimraf dist && tsc", "build:w": "npm run tslint && rimraf dist && tsc -w", "tslint": "npm run tslint-src && npm run tslint-root", @@ -72,11 +72,10 @@ "ng2-alfresco-login": "^0.1.29" }, "devDependencies": { - "browser-sync": "^2.10.0", - "connect-history-api-fallback": "^1.2.0", "concurrently": "^2.0.0", "tslint": "^3.8.1", "typescript": "^1.8.10", - "typings": "^1.0.4" + "typings": "^1.0.4", + "wsrv": "0.1.3" } } diff --git a/ng2-components/ng2-alfresco-login/package.json b/ng2-components/ng2-alfresco-login/package.json index 3fa5afff76..aee58f95d3 100644 --- a/ng2-components/ng2-alfresco-login/package.json +++ b/ng2-components/ng2-alfresco-login/package.json @@ -6,7 +6,6 @@ "scripts": { "clean": "rimraf dist node_modules typings", "typings": "typings install", - "server": "http-server -c-1 -o -p 8875 .", "build": "npm run tslint && typings install && rimraf dist && tsc && npm run copytemplates && license-check", "build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", @@ -27,7 +26,7 @@ "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", - "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", + "coverage": "npm run test && wsrv -o -p 9875 ./coverage/report", "prepublish": "npm run build" }, "main": "./dist/index.js", @@ -104,6 +103,7 @@ "tslint": "3.8.1", "typescript": "1.8.10", "typings": "1.0.4", + "wsrv": "0.1.3", "xo": "0.14.0", "yargs": "4.7.0" }, diff --git a/ng2-components/ng2-alfresco-search/demo/browser-sync-config.js b/ng2-components/ng2-alfresco-search/demo/browser-sync-config.js deleted file mode 100644 index bd5f084318..0000000000 --- a/ng2-components/ng2-alfresco-search/demo/browser-sync-config.js +++ /dev/null @@ -1,23 +0,0 @@ -var browserSync = require("browser-sync").create(); -var historyApiFallback = require('connect-history-api-fallback'); - -browserSync.init({ - - server: { - baseDir: './', - middleware: [ historyApiFallback() ] - }, - - files: [ - 'index.html', - 'dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-core/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-datatable/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-documentlist/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-login/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-search/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-upload/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-viewer/dist/**/*.{html,htm,css,js}'], - - reloadDelay: 1000 -}); diff --git a/ng2-components/ng2-alfresco-search/demo/package.json b/ng2-components/ng2-alfresco-search/demo/package.json index 3671d80aed..b1b37d4569 100644 --- a/ng2-components/ng2-alfresco-search/demo/package.json +++ b/ng2-components/ng2-alfresco-search/demo/package.json @@ -8,8 +8,8 @@ "clean": "rimraf dist node_modules typings", "postinstall": "npm run typings && npm run build", "typings": "typings install", - "start": "npm install && npm run typings && concurrently \"npm run build:w\" \"npm run server\" ", - "server": "node browser-sync-config.js", + "start": "concurrently \"npm run build:w\" \"npm run server\" ", + "server": "wsrv -o -l -s", "build": "npm run tslint && rimraf dist && tsc", "build:w": "npm run tslint && rimraf dist && tsc -w", "tslint": "npm run tslint-src && npm run tslint-root", @@ -72,11 +72,10 @@ "ng2-alfresco-search": "^0.1.21" }, "devDependencies": { - "browser-sync": "2.10.0", - "connect-history-api-fallback": "1.2.0", "concurrently": "2.0.0", "tslint": "3.8.1", "typescript": "1.8.10", - "typings": "1.0.4" + "typings": "1.0.4", + "wsrv": "0.1.3" } } diff --git a/ng2-components/ng2-alfresco-search/package.json b/ng2-components/ng2-alfresco-search/package.json index fef2de769c..c986da3310 100644 --- a/ng2-components/ng2-alfresco-search/package.json +++ b/ng2-components/ng2-alfresco-search/package.json @@ -6,7 +6,6 @@ "scripts": { "clean": "rimraf dist node_modules typings", "typings": "typings install", - "server": "http-server -c-1 -o -p 8875 .", "build": "npm run tslint && typings install && rimraf dist && tsc && npm run copytemplates && license-check", "build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", @@ -27,7 +26,7 @@ "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", - "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", + "coverage": "npm run test && wsrv -o -p 9875 ./coverage/report", "prepublish": "npm run build" }, "main": "./dist/index.js", @@ -86,7 +85,6 @@ "concurrently": "2.1.0", "coveralls": "2.11.9", "cpx": "1.3.1", - "http-server": "0.8.5", "jasmine-core": "2.4.1", "karma": "0.13.22", "karma-chrome-launcher": "1.0.1", @@ -100,7 +98,8 @@ "traceur": "0.0.91", "tslint": "3.8.1", "typescript": "1.8.10", - "typings": "1.0.4" + "typings": "1.0.4", + "wsrv": "0.1.3" }, "license-check-config": { "src": [ diff --git a/ng2-components/ng2-alfresco-upload/demo/browser-sync-config.js b/ng2-components/ng2-alfresco-upload/demo/browser-sync-config.js deleted file mode 100644 index bd5f084318..0000000000 --- a/ng2-components/ng2-alfresco-upload/demo/browser-sync-config.js +++ /dev/null @@ -1,23 +0,0 @@ -var browserSync = require("browser-sync").create(); -var historyApiFallback = require('connect-history-api-fallback'); - -browserSync.init({ - - server: { - baseDir: './', - middleware: [ historyApiFallback() ] - }, - - files: [ - 'index.html', - 'dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-core/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-datatable/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-documentlist/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-login/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-search/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-upload/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-viewer/dist/**/*.{html,htm,css,js}'], - - reloadDelay: 1000 -}); diff --git a/ng2-components/ng2-alfresco-upload/demo/package.json b/ng2-components/ng2-alfresco-upload/demo/package.json index 3459913692..eeb06d4178 100644 --- a/ng2-components/ng2-alfresco-upload/demo/package.json +++ b/ng2-components/ng2-alfresco-upload/demo/package.json @@ -8,8 +8,8 @@ "clean": "rimraf dist node_modules typings", "typings": "typings install", "postinstall": "npm run typings && npm run build", - "start": "npm install && npm run typings && concurrently \"npm run build:w\" \"npm run server\" ", - "server": "node browser-sync-config.js", + "start": "concurrently \"npm run build:w\" \"npm run server\" ", + "server": "wsrv -o -l -s", "build": "npm run tslint && rimraf dist && tsc", "build:w": "npm run tslint && rimraf dist && tsc -w", "tslint": "npm run tslint-src && npm run tslint-root", @@ -72,11 +72,10 @@ "ng2-alfresco-upload": "^0.1.49" }, "devDependencies": { - "browser-sync": "2.10.0", - "connect-history-api-fallback": "1.2.0", "concurrently": "2.0.0", "tslint": "3.8.1", "typescript": "1.8.10", - "typings": "1.0.4" + "typings": "1.0.4", + "wsrv": "0.1.3" } } diff --git a/ng2-components/ng2-alfresco-upload/package.json b/ng2-components/ng2-alfresco-upload/package.json index 1620ddb8e9..4666f1b837 100644 --- a/ng2-components/ng2-alfresco-upload/package.json +++ b/ng2-components/ng2-alfresco-upload/package.json @@ -6,7 +6,6 @@ "scripts": { "clean": "rimraf dist node_modules typings", "typings": "typings install", - "server": "http-server -c-1 -o -p 8875 .", "build": "npm run tslint && typings install && rimraf dist && tsc && npm run copytemplates && license-check", "build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", @@ -25,7 +24,7 @@ "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", - "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", + "coverage": "npm run test && wsrv -o -p 9875 ./coverage/report", "prepublish": "npm run build" }, "main": "./dist/index.js", @@ -88,7 +87,6 @@ "concurrently": "2.1.0", "coveralls": "2.11.9", "cpx": "1.3.1", - "http-server": "0.8.5", "jasmine-ajax": "3.2.0", "jasmine-core": "2.4.1", "karma": "0.13.22", @@ -104,7 +102,8 @@ "traceur": "0.0.91", "tslint": "3.8.1", "typescript": "1.8.10", - "typings": "1.0.4" + "typings": "1.0.4", + "wsrv": "0.1.3" }, "license-check-config": { "src": [ diff --git a/ng2-components/ng2-alfresco-viewer/demo/browser-sync-config.js b/ng2-components/ng2-alfresco-viewer/demo/browser-sync-config.js deleted file mode 100644 index bd5f084318..0000000000 --- a/ng2-components/ng2-alfresco-viewer/demo/browser-sync-config.js +++ /dev/null @@ -1,23 +0,0 @@ -var browserSync = require("browser-sync").create(); -var historyApiFallback = require('connect-history-api-fallback'); - -browserSync.init({ - - server: { - baseDir: './', - middleware: [ historyApiFallback() ] - }, - - files: [ - 'index.html', - 'dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-core/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-datatable/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-documentlist/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-login/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-search/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-upload/dist/**/*.{html,htm,css,js}', - 'node_modules/ng2-alfresco-viewer/dist/**/*.{html,htm,css,js}'], - - reloadDelay: 1000 -}); diff --git a/ng2-components/ng2-alfresco-viewer/demo/package.json b/ng2-components/ng2-alfresco-viewer/demo/package.json index d2d1b59b41..1d348240e1 100644 --- a/ng2-components/ng2-alfresco-viewer/demo/package.json +++ b/ng2-components/ng2-alfresco-viewer/demo/package.json @@ -8,8 +8,8 @@ "clean": "rimraf dist node_modules typings", "typings": "typings install", "postinstall": "npm run typings && npm run build", - "start": "npm install && npm run typings && concurrently \"npm run build:w\" \"npm run server\" ", - "server": "node browser-sync-config.js", + "start": "concurrently \"npm run build:w\" \"npm run server\" ", + "server": "wsrv -o -l -s", "build": "npm run tslint && rimraf dist && tsc", "build:w": "npm run tslint && rimraf dist && tsc -w", "tslint": "npm run tslint-src && npm run tslint-root", @@ -42,12 +42,11 @@ "ng2-alfresco-viewer": "^0.1.32" }, "devDependencies": { - "browser-sync": "2.10.0", - "connect-history-api-fallback": "1.2.0", "concurrently": "2.0.0", "tslint": "3.8.1", "typescript": "1.8.10", - "typings": "1.0.4" + "typings": "1.0.4", + "wsrv": "0.1.3" }, "contributors": [ { diff --git a/ng2-components/ng2-alfresco-viewer/package.json b/ng2-components/ng2-alfresco-viewer/package.json index faca7ee573..a9ad02e8f0 100644 --- a/ng2-components/ng2-alfresco-viewer/package.json +++ b/ng2-components/ng2-alfresco-viewer/package.json @@ -6,8 +6,6 @@ "scripts": { "clean": "rimraf dist node_modules typings", "typings": "typings install", - "start": "npm run build && npm run server", - "server": "http-server -c-1 -o -p 8875 .", "build": "npm run tslint && typings install && rimraf dist && tsc && npm run copytemplates && license-check", "build:w": "npm run tslint && typings install && rimraf dist && npm run watch-task", "watch-task": "concurrently \"npm run tsc:w\" \"npm run copytemplates:w\" \"license-check\"", @@ -26,7 +24,7 @@ "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html", - "coverage": "npm run test && http-server -c-1 -o -p 9875 ./coverage/report", + "coverage": "npm run test && wsrv -o -p 9875 ./coverage/report", "prepublish": "npm run build" }, "main": "./dist/index.js", @@ -96,7 +94,8 @@ "traceur": "0.0.91", "tslint": "3.8.1", "typescript": "1.8.10", - "typings": "1.0.4" + "typings": "1.0.4", + "wsrv": "0.1.3" }, "license-check-config": { "src": [