diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 000000000..a834cb0d3 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,7 @@ +[production staging] +> 1% +ie 10 + +[development] +last 1 chrome version +last 1 firefox version diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..5850e3267 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +trim_trailing_whitespace = true + +[*.js] +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/LICENSE b/LICENSE index fad004c8a..43d69febc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-2017 Preboot team +Copyright (c) 2015-2018 Preboot team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package.json b/package.json index c1c1569f6..6e68269bc 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.1.0", "description": "A workflow for Angular made with Webpack", "scripts": { - "build": "rimraf dist && webpack --bail --progress --profile", + "build": "webpack --bail --progress --profile", "server": "webpack-dev-server --history-api-fallback --inline --progress", "test": "karma start", "test-watch": "karma start --auto-watch --no-single-run", @@ -20,36 +20,37 @@ }, "homepage": "https://github.com/preboot/angularjs-webpack", "dependencies": { - "angular": "^1.5.0" + "angular": "^1.7.0" }, "devDependencies": { - "angular-mocks": "^1.5.0", - "autoprefixer": "^6.0.3", - "babel-core": "^6.2.1", - "babel-loader": "^6.2.0", + "ajv": "^6.4.0", + "angular-mocks": "^1.7.0", + "autoprefixer": "^8.4.1", + "babel-core": "^6.26.3", + "babel-loader": "^7.1.4", "babel-preset-es2015": "^6.1.18", - "copy-webpack-plugin": "4.0.1", - "css-loader": "0.26.1", + "clean-webpack-plugin": "^2.0.2", + "copy-webpack-plugin": "^4.5.1", + "css-loader": "^0.28.11", "extract-text-webpack-plugin": "2.0.0-beta.5", - "file-loader": "^0.9.0", - "html-webpack-plugin": "^2.7.1", - "istanbul-instrumenter-loader": "^1.0.0", - "jasmine-core": "^2.3.4", - "karma": "^1.1.0", + "file-loader": "^1.1.11", + "html-webpack-plugin": "^3.2.0", + "istanbul-instrumenter-loader": "^3.0.1", + "jasmine-core": "^3.1.0", + "karma": "^2.0.2", "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-phantomjs-launcher": "^1.0.0", "karma-sourcemap-loader": "^0.3.7", - "karma-spec-reporter": "0.0.26", - "karma-webpack": "2.0.1", - "node-libs-browser": "2.0.0", + "karma-spec-reporter": "^0.0.32", + "karma-webpack": "^3.0.0", + "node-libs-browser": "^2.1.0", "null-loader": "^0.1.1", "phantomjs-prebuilt": "^2.1.4", - "postcss-loader": "1.2.2", + "postcss-loader": "^2.1.5", "raw-loader": "^0.5.1", - "rimraf": "^2.5.1", - "style-loader": "^0.13.0", - "webpack": "2.2.0", - "webpack-dev-server": "2.2.0" + "style-loader": "^0.21.0", + "webpack": "^2.7.0", + "webpack-dev-server": "^2.11.2" } } diff --git a/webpack.config.js b/webpack.config.js index 0178162d6..04ec432cc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,7 @@ var autoprefixer = require('autoprefixer'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var CopyWebpackPlugin = require('copy-webpack-plugin'); +var CleanWebpackPlugin = require('clean-webpack-plugin'); /** * Env @@ -45,7 +46,7 @@ module.exports = function makeWebpackConfig() { // Output path from the view of the page // Uses webpack-dev-server in development - publicPath: isProd ? '/' : 'http://localhost:8080/', + publicPath: '/', // Filename for entry points // Only adds hash in build mode @@ -160,6 +161,7 @@ module.exports = function makeWebpackConfig() { * List: http://webpack.github.io/docs/list-of-plugins.html */ config.plugins = [ + new CleanWebpackPlugin(), new webpack.LoaderOptionsPlugin({ test: /\.scss$/i, options: { @@ -194,10 +196,6 @@ module.exports = function makeWebpackConfig() { // Only emit files when there are no errors new webpack.NoErrorsPlugin(), - // Reference: http://webpack.github.io/docs/list-of-plugins.html#dedupeplugin - // Dedupe modules in the output - new webpack.optimize.DedupePlugin(), - // Reference: http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin // Minify all javascript, switch loaders to minimizing mode new webpack.optimize.UglifyJsPlugin(), @@ -217,7 +215,8 @@ module.exports = function makeWebpackConfig() { */ config.devServer = { contentBase: './src/public', - stats: 'minimal' + stats: 'minimal', + host: '0.0.0.0' }; return config;