Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Steve Dunlap
authored and
Steve Dunlap
committed
Nov 13, 2017
0 parents
commit f65f867
Showing
37 changed files
with
12,011 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules\\typescript\\lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
const path = require('path'); | ||
const _root = path.resolve(__dirname, '..'); | ||
|
||
function root(args) { | ||
args = Array.prototype.slice.call(arguments, 0); | ||
return path.join.apply(path, [_root].concat(args)); | ||
} | ||
|
||
exports.root = root; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
const webpack = require('webpack'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
const helpers = require('./helpers'); | ||
//const DashboardPlugin = require('webpack-dashboard/plugin'); | ||
|
||
|
||
|
||
module.exports = { | ||
|
||
entry: { | ||
'polyfills': './src/polyfills.ts', | ||
'vendor': './src/vendor.ts', | ||
'app': './src/main.ts' | ||
}, | ||
|
||
resolve: { | ||
extensions: ['.ts', '.js'] | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
loaders: [ | ||
{ | ||
loader: 'ng-router-loader', | ||
options: { | ||
/* ng-router-loader options */ | ||
} | ||
}, | ||
{ | ||
loader: 'awesome-typescript-loader', | ||
options: { configFileName: helpers.root('', 'tsconfig.json') } | ||
}, | ||
'angular2-template-loader' | ||
] | ||
}, | ||
{ | ||
test: /\.json/, | ||
use: 'json-loader' | ||
}, | ||
{ | ||
test: /\.html$/, | ||
use: 'html-loader' | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/, | ||
use: 'file-loader?name=assets/[name].[hash].[ext]' | ||
}, | ||
{ | ||
test: /\.css$/, | ||
exclude: helpers.root('src', 'app'), | ||
use: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'css-loader?sourceMap' }) | ||
}, | ||
{ | ||
test: /\.css$/, | ||
include: helpers.root('src', 'app'), | ||
use: 'raw-loader' | ||
}, | ||
{ | ||
test: /\.scss$/, | ||
exclude: /node_modules/, | ||
loaders: ['raw-loader', 'sass-loader'] | ||
} | ||
] | ||
}, | ||
|
||
plugins: [ | ||
|
||
// Workaround for angular/angular#11580 | ||
new webpack.ContextReplacementPlugin( | ||
// The (\\|\/) piece accounts for path separators in *nix and Windows | ||
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, | ||
helpers.root('./src'), // location of your src | ||
{} // a map of your routes | ||
), | ||
|
||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: ['app', 'vendor', 'polyfills'] | ||
}), | ||
|
||
new HtmlWebpackPlugin({ | ||
template: 'src/index.html', | ||
title: 'Output Management' | ||
}) | ||
|
||
//new DashboardPlugin({ | ||
// port: 3000 | ||
//}) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
const webpackMerge = require('webpack-merge'); | ||
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | ||
const commonConfig = require('./webpack.common.js'); | ||
const helpers = require('./helpers'); | ||
|
||
|
||
|
||
module.exports = webpackMerge(commonConfig, { | ||
|
||
devtool: 'cheap-module-eval-source-map', | ||
|
||
output: { | ||
path: helpers.root('dist'), | ||
publicPath: 'http://localhost:3000/', | ||
filename: '[name].js', | ||
chunkFilename: '[id].chunk.js' | ||
}, | ||
|
||
devServer: { | ||
historyApiFallback: true, | ||
compress: true, | ||
stats: 'minimal' | ||
} | ||
}); |
Oops, something went wrong.