perf: distrubute smaller bundled code and include es2015 bundle
TypeScript compiler will now build to ES2015 code and modules. Babili is used to minify ES2015 code, providing an initial optimization that we couldn't previously get just from Uglify. Uses Babel to convert ES2015 to UMD/ES5 code, and Uglify to minimize the output.
This commit is contained in:
@ -106,7 +106,7 @@ This CLI is intended for demos, prototyping, or for users with simple build syst
|
||||
that run bare `tsc`.
|
||||
|
||||
Users with a build system should expect an Angular template plugin. Such a plugin would be
|
||||
based on the `index.ts` in this directory, but should share the TypeScript compiler instance
|
||||
based on the `public_api.ts` in this directory, but should share the TypeScript compiler instance
|
||||
with the one already used in the plugin for TypeScript typechecking and emit.
|
||||
|
||||
## Design
|
||||
|
@ -11,4 +11,5 @@ module.exports = {
|
||||
entry: './test/all_spec.js',
|
||||
output: {filename: './all_spec.js'},
|
||||
resolve: {extensions: ['.js']},
|
||||
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - the compiler CLI for Node.js",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"typings": "./typings/index.d.ts",
|
||||
"bin": {
|
||||
"ngc": "./src/main.js",
|
||||
"ng-xi18n": "./src/extract_i18n.js"
|
||||
|
@ -18,7 +18,7 @@ const NODE_MODULES = '/node_modules/';
|
||||
const IS_GENERATED = /\.(ngfactory|ngstyle)$/;
|
||||
const GENERATED_FILES = /\.ngfactory\.ts$|\.ngstyle\.ts$/;
|
||||
const GENERATED_OR_DTS_FILES = /\.d\.ts$|\.ngfactory\.ts$|\.ngstyle\.ts$/;
|
||||
const SHALLOW_IMPORT = /^(\w+|(\@\w+\/\w+))$/;
|
||||
const SHALLOW_IMPORT = /^((\w|-)+|(@(\w|-)+\/(\w|-)+))$/;
|
||||
|
||||
export interface CompilerHostContext extends ts.ModuleResolutionHost {
|
||||
readResource(fileName: string): Promise<string>;
|
||||
|
Reference in New Issue
Block a user