add livereload demo folder browser-sync

This commit is contained in:
Eugenio Romano
2016-06-09 01:39:29 +01:00
parent bde0200b2c
commit 9bae2cc693
15 changed files with 146 additions and 30 deletions

View File

@@ -4,3 +4,4 @@ coverage
dist
typings
!systemjs.config.js
!browser-sync-config.js

View File

@@ -0,0 +1,22 @@
var browserSync = require("browser-sync").create();
var historyApiFallback = require('connect-history-api-fallback');
browserSync.init({
server: {
baseDir: './',
middleware: [ historyApiFallback() ]
},
files: [
'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
});

View File

@@ -5,11 +5,11 @@
"author": "Alfresco Software, Ltd.",
"main": "index.js",
"scripts": {
"postinstall": "npm run typings && npm run build",
"typings": "typings install",
"start": "rm -rf dist && npm install && npm run server",
"server": "lite-server",
"start": "npm install && npm run typings && concurrently \"npm run build:w\" \"npm run server\" ",
"server": "node browser-sync-config.js",
"build": "npm run tslint && rm -rf dist && tsc",
"build:w": "npm run tslint && rm -rf dist && tsc -w",
"tslint": "npm run tslint-src && npm run tslint-root",
"tslint-src": "tslint -c tslint.json src/**/*.ts",
"tslint-root": "tslint -c tslint.json *.ts"
@@ -29,7 +29,6 @@
"devDependencies": {
"browser-sync": "^2.10.0",
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"tslint": "^3.8.1",
"typescript": "^1.8.10",
"typings": "^0.7.12"