Fix build problem (#1861)

* fix sourcemap
fix relative path and pre publish build
change travis wait
all test run build and remove unused cpx

* global test task
modify publish script to accept options

* appveyor run

* different approach single test run

* make it work the analytics test
modify start demo shell script to use a different registry

* sourcemap demo shell working

* update readme and add install after any clean
add registry option in start.sh script
add develop and normal mode in demo shell
add -d option in start.sh to point to the local components
add -c option in build script to point to the local components
This commit is contained in:
Mario Romano
2017-05-11 18:08:35 +01:00
committed by Eugenio Romano
parent b0be88ec37
commit 6da0eaba37
88 changed files with 3203 additions and 774 deletions

View File

@@ -41,7 +41,7 @@ module.exports = {
{
enforce: 'pre',
test: /\.js$/,
include: [helpers.root('app')],
include: [helpers.root('app'), helpers.root('../ng2-components')],
loader: 'source-map-loader',
exclude: [ /node_modules/, /public/, /resources/, /dist/]
},
@@ -105,10 +105,7 @@ module.exports = {
}
]
},
resolve: {
extensions: ['.ts', '.js'],
modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
},
plugins: [
// Workaround for angular/angular#11580
new webpack.ContextReplacementPlugin(

View File

@@ -6,6 +6,11 @@ const helpers = require('./helpers');
module.exports = webpackMerge(commonConfig, {
devtool: 'cheap-module-eval-source-map',
resolve: {
extensions: ['.ts', '.js'],
modules: [helpers.root('../ng2-components'), helpers.root('node_modules')]
},
output: {
path: helpers.root('dist'),
filename: '[name].js',

View File

@@ -16,6 +16,11 @@ module.exports = webpackMerge(commonConfig, {
chunkFilename: '[id].[hash].chunk.js'
},
resolve: {
extensions: ['.ts', '.js'],
modules: [helpers.root('node_modules')]
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618

View File

@@ -5,8 +5,10 @@
"author": "Alfresco Software, Ltd.",
"scripts": {
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
"start": "npm run server-versions && node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress",
"build:dev": "rimraf dist && webpack --config config/webpack.dev.js --progress --profile --bail",
"start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0",
"start": "npm run server-versions && node --max_old_space_size=4096 webpack-dev-server --progress -config config/webpack.prod.js",
"start:dev": "npm run server-versions && node --max_old_space_size=4096 webpack-dev-server --progress -config config/webpack.dev.js",
"test": "rimraf coverage && karma start --single-run",
"clean": "npm run clean-build && rimraf dist node_modules typings dist",
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'",