Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mode documentation #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/client/vendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// https://github.com/angular/angular/blob/85f3dc2fb5f90fef8798b77240a3a242b4d29f7e/gulpfile.js#L1377
import 'angular2/bundles/angular2-polyfills';

// Angular 2 Deps
// Rx as Angular 2 required dependency
import 'rxjs/Rx';
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"buildOnSave": false,
"compileOnSave": false,
{ /* Reference: http://www.typescriptlang.org/docs/handbook/tsconfig.json.html */
"buildOnSave": false, /* Atom specific https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#buildonsave */
"compileOnSave": false, /* Visual Studio 2015 / Atom specific http://www.typescriptlang.org/docs/handbook/tsconfig.json.html#compileonsave */
"compilerOptions": {
"module": "commonjs", /* Specify in which format are modules generated,
can't go with es6 until https://github.com/Microsoft/TypeScript/issues/6319 is resolved */
"target": "es5", /* Specify target ECMAScript version */
"noImplicitAny": true, /* Warn on expressions with unspecified type */
"sourceMap": true, /* Generate source maps for easier debugging */
"emitDecoratorMetadata": true, /* ??? */
"emitDecoratorMetadata": true, /* Needed for dependency injection */
"experimentalDecorators": true, /* Enable ES7 decorators */
"moduleResolution": "node", /* Resolve modules in node_modules */
"removeComments": false, /* No comment :) */
Expand Down
15 changes: 10 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,30 @@ const path = require( 'path' );
const CopyWebpackPlugin = require( 'copy-webpack-plugin' );
const HtmlWebpackPlugin = require( 'html-webpack-plugin' );

const config = {
module.exports = {

// Reference: https://webpack.github.io/docs/configuration.html#context
// Path where entries are resolved
context: path.resolve( __dirname, 'src/client' ),

// Reference: https://webpack.github.io/docs/configuration.html#entry
// Exported bundles
entry: {
'vendor': './vendor',
'app': './main'
},

// Reference: https://webpack.github.io/docs/configuration.html#output
// Export bundles target location and naming
output: {
path: path.resolve( __dirname, 'dist' ),
filename: '[name].js'
},

// Reference: https://webpack.github.io/docs/configuration.html#resolve
// import "vendor" instead of import "vendor.ts"
resolve: {
extensions: ['', '.ts', '.js']
extensions: [ '', '.ts', '.js' ]
},

// Reference: https://webpack.github.io/docs/configuration.html#module
Expand All @@ -36,13 +40,15 @@ const config = {
}
],

// Transpilers and preprocessors
loaders: [
{ test: /\.ts$/, exclude: /node_modules/, loader: 'awesome-typescript-loader' },
{ test: /\.json$/, loader: 'json-loader' } // See https://github.com/webpack/webpack/issues/592
]
},

// Reference: // Set source map processor see https://webpack.github.io/docs/configuration.html#devtool
// Set source map processor
// Reference: https://webpack.github.io/docs/configuration.html#devtool
devtool: 'source-map',

// Reference: https://webpack.github.io/docs/list-of-plugins.html
Expand All @@ -62,7 +68,7 @@ const config = {
}),

// Reference: https://github.com/kevlened/copy-webpack-plugin#usage
// Copy static assests
// Copy static assets
new CopyWebpackPlugin([
{
from: 'assets',
Expand All @@ -74,4 +80,3 @@ const config = {

};

module.exports = config;