| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent da24412 commit f55954a
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -127,7 +127,7 @@ | |||
| 127 | 127 | "svg-sprite-loader": "0.0.31", | |
| 128 | 128 | "temp": "0.8.3", | |
| 129 | 129 | "through": "^2.3.6", | |
| 130 | - "ts-loader": "^0.8.2", | ||
| 130 | + "ts-loader": "1.2.2", | ||
| 131 | 131 | "tslint": "^3.15.1", | |
| 132 | 132 | "tslint-loader": "^2.1.4", | |
| 133 | 133 | "typescript": "~2.0.3", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -108,7 +108,22 @@ module.exports = { | |||
| 108 | 108 | // Return custom template variables here. | |
| 109 | 109 | return { | |
| 110 | 110 | __path__: () => { | |
| 111 | - return `src/app/ui/components/${options.locals.rtKind.toLowerCase().replace(' ','-')}/${options.dasherizedModuleName}`; | ||
| 111 | + var dir = this.dynamicPath.dir; | ||
| 112 | + if (!options.locals.flat) { | ||
| 113 | + dir += path.sep + options.dasherizedModuleName; | ||
| 114 | + } | ||
| 115 | + var srcDir = this.project.ngConfig.apps[0].root; | ||
| 116 | + var kindDirname = options.locals.rtKind.toLowerCase().replace(' ','-'); | ||
| 117 | + var kindMatch = dir.match(/.*\/components\/ui\/(.*)\/.*$/); | ||
| 118 | + | ||
| 119 | + this.appDir = dir.substr(dir.indexOf(srcDir) + srcDir.length); | ||
| 120 | + this.generatePath = dir; | ||
| 121 | + | ||
| 122 | + if(kindMatch) { | ||
| 123 | + return dir; | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + return `src/app/ui/components/${kindDirname}/${options.dasherizedModuleName}` | ||
| 112 | 127 | }, | |
| 113 | 128 | __styleext__: () => { | |
| 114 | 129 | return this.styleExt; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,9 +24,9 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, appConf | |||
| 24 | 24 | devtool: 'source-map', | |
| 25 | 25 | output: { | |
| 26 | 26 | path: path.resolve(projectRoot, appConfig.outDir), | |
| 27 | - filename: '[name].[chunkhash].bundle.js', | ||
| 28 | - sourceMapFilename: '[name].[chunkhash].bundle.map', | ||
| 29 | - chunkFilename: '[id].[chunkhash].chunk.js' | ||
| 27 | + filename: '[name].[hash].bundle.js', | ||
| 28 | + sourceMapFilename: '[name].[hash].bundle.map', | ||
| 29 | + chunkFilename: '[id].[hash].chunk.js' | ||
| 30 | 30 | }, | |
| 31 | 31 | module: { | |
| 32 | 32 | rules: [ | |
@@ -57,6 +57,7 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, appConf | |||
| 57 | 57 | 'process.env.NODE_ENV': JSON.stringify('production') | |
| 58 | 58 | }), | |
| 59 | 59 | new webpack.optimize.UglifyJsPlugin(<any>{ | |
| 60 | + warnings: false, | ||
| 60 | 61 | mangle: { screw_ie8 : true }, | |
| 61 | 62 | compress: { screw_ie8: true }, | |
| 62 | 63 | sourceMap: true | |
@@ -72,8 +73,9 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, appConf | |||
| 72 | 73 | options: { | |
| 73 | 74 | postcss: [ | |
| 74 | 75 | require('postcss-discard-comments') | |
| 75 | - ] | ||
| 76 | - } | ||
| 76 | + ], | ||
| 77 | + resolve: {} | ||
| 78 | + }, | ||
| 77 | 79 | }) | |
| 78 | 80 | ] | |
| 79 | 81 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ export const getWebpackNonAotConfigPartial = function(projectRoot: string, appCo | |||
| 19 | 19 | resolve: { | |
| 20 | 20 | plugins: [ | |
| 21 | 21 | new atl.TsConfigPathsPlugin({ | |
| 22 | - tsconfig: path.resolve(appRoot, appConfig.tsconfig) | ||
| 22 | + configFileName: path.resolve(appRoot, appConfig.tsconfig) | ||
| 23 | 23 | }) | |
| 24 | 24 | ] | |
| 25 | 25 | }, | |
@@ -30,21 +30,21 @@ export const getWebpackNonAotConfigPartial = function(projectRoot: string, appCo | |||
| 30 | 30 | loaders: [{ | |
| 31 | 31 | loader: '@angularclass/hmr-loader' | |
| 32 | 32 | },{ | |
| 33 | - loader: 'awesome-typescript-loader', | ||
| 33 | + loader: 'ts-loader', | ||
| 34 | 34 | query: { | |
| 35 | - forkChecker: true, | ||
| 36 | - tsconfig: path.resolve(appRoot, appConfig.tsconfig) | ||
| 35 | + configFileName: path.resolve(appRoot, appConfig.tsconfig), | ||
| 36 | + // transpileOnly: true | ||
| 37 | 37 | } | |
| 38 | 38 | }, { | |
| 39 | 39 | loader: 'angular2-template-loader' | |
| 40 | 40 | }], | |
| 41 | - exclude: [/\.(spec|e2e)\.ts$/] | ||
| 41 | + exclude: [/node_modules/, /\.(spec)\.ts$/] | ||
| 42 | 42 | } | |
| 43 | 43 | ], | |
| 44 | 44 | }, | |
| 45 | 45 | plugins: [ | |
| 46 | 46 | new webpack.ContextReplacementPlugin(/.*/, appRoot, lazyModules), | |
| 47 | - new atl.ForkCheckerPlugin(), | ||
| 47 | + // new atl.ForkCheckerPlugin(), | ||
| 48 | 48 | ] | |
| 49 | 49 | }; | |
| 50 | 50 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments