-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(packaging): produce angular package format compatible code (#240)
- Loading branch information
Showing
70 changed files
with
1,056 additions
and
46 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
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
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
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,9 @@ | ||
for dir in ./integration/*/ | ||
do | ||
dir=${dir%*/} | ||
name=${dir##*/} | ||
echo "Integration test for $name" | ||
cd $dir | ||
npm run integration | ||
cd ../.. | ||
done |
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,82 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"project": { | ||
"name": "integration-test" | ||
}, | ||
"apps": [ | ||
{ | ||
"root": "src", | ||
"outDir": "dist", | ||
"assets": [ | ||
"assets", | ||
"favicon.ico" | ||
], | ||
"index": "index.html", | ||
"main": "main.ts", | ||
"polyfills": "polyfills.ts", | ||
"test": "test.ts", | ||
"tsconfig": "tsconfig.app.json", | ||
"testTsconfig": "tsconfig.spec.json", | ||
"prefix": "app", | ||
"styles": [ | ||
"styles.css" | ||
], | ||
"scripts": [], | ||
"environmentSource": "environments/environment.ts", | ||
"environments": { | ||
"dev": "environments/environment.ts", | ||
"prod": "environments/environment.prod.ts" | ||
} | ||
} | ||
], | ||
"e2e": { | ||
"protractor": { | ||
"config": "./protractor.conf.js" | ||
} | ||
}, | ||
"lint": [ | ||
{ | ||
"project": "src/tsconfig.app.json", | ||
"exclude": "**/node_modules/**" | ||
}, | ||
{ | ||
"project": "src/tsconfig.spec.json", | ||
"exclude": "**/node_modules/**" | ||
}, | ||
{ | ||
"project": "e2e/tsconfig.e2e.json", | ||
"exclude": "**/node_modules/**" | ||
} | ||
], | ||
"test": { | ||
"karma": { | ||
"config": "./karma.conf.js" | ||
} | ||
}, | ||
"defaults": { | ||
"styleExt": "css", | ||
"component": { | ||
"spec": false, | ||
"inlineStyle": true, | ||
"inlineTemplate": true | ||
}, | ||
"directive": { | ||
"spec": false | ||
}, | ||
"class": { | ||
"spec": false | ||
}, | ||
"guard": { | ||
"spec": false | ||
}, | ||
"module": { | ||
"spec": false | ||
}, | ||
"pipe": { | ||
"spec": false | ||
}, | ||
"service": { | ||
"spec": false | ||
} | ||
} | ||
} |
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,40 @@ | ||
{ | ||
"name": "integration-test", | ||
"version": "0.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"setup": "mkdir -p lib/ng-zorro-antd && rsync -av --exclude=\".*\" ../../publish/ lib/ng-zorro-antd", | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"test": "echo \"Error: no test... minimal project\" && exit 1", | ||
"lint": "echo \"Error: no lint... minimal project\" && exit 1", | ||
"e2e": "echo \"Error: no e2e... minimal project\" && exit 1", | ||
"preintegration": "npm run setup && npm install", | ||
"integration": "ng build --prod --build-optimizer" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "^4.2.4", | ||
"@angular/cdk": "2.0.0-beta.8", | ||
"@angular/common": "^4.2.4", | ||
"@angular/compiler": "^4.2.4", | ||
"@angular/core": "^4.2.4", | ||
"@angular/forms": "^4.2.4", | ||
"@angular/http": "^4.2.4", | ||
"@angular/platform-browser": "^4.2.4", | ||
"@angular/platform-browser-dynamic": "^4.2.4", | ||
"@angular/router": "^4.2.4", | ||
"core-js": "^2.4.1", | ||
"moment": "^2.18.1", | ||
"ng-zorro-antd": "file:lib/ng-zorro-antd", | ||
"rxjs": "^5.4.2", | ||
"zone.js": "^0.8.14" | ||
}, | ||
"devDependencies": { | ||
"@angular/cli": "1.3.2", | ||
"@angular/compiler-cli": "^4.2.4", | ||
"@angular/language-service": "^4.2.4", | ||
"typescript": "~2.3.3" | ||
} | ||
} |
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,12 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
template: ` | ||
<button nz-button [nzType]="'primary'">测试按钮</button> | ||
`, | ||
styles: [] | ||
}) | ||
export class AppComponent { | ||
title = 'app'; | ||
} |
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,18 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { NgZorroAntdModule } from 'ng-zorro-antd'; | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
NgZorroAntdModule.forRoot(), | ||
], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } |
Empty file.
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 @@ | ||
export const environment = { | ||
production: 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,8 @@ | ||
// The file contents for the current environment will overwrite these during build. | ||
// The build system defaults to the dev environment which uses `environment.ts`, but if you do | ||
// `ng build --env=prod` then `environment.prod.ts` will be used instead. | ||
// The list of which env maps to which file can be found in `.angular-cli.json`. | ||
|
||
export const environment = { | ||
production: false | ||
}; |
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,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>IntegrationTest</title> | ||
<base href="/"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
</head> | ||
<body> | ||
<app-root></app-root> | ||
</body> | ||
</html> |
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,11 @@ | ||
import { enableProdMode } from '@angular/core'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
||
import { AppModule } from './app/app.module'; | ||
import { environment } from './environments/environment'; | ||
|
||
if (environment.production) { | ||
enableProdMode(); | ||
} | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
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,72 @@ | ||
/** | ||
* This file includes polyfills needed by Angular and is loaded before the app. | ||
* You can add your own extra polyfills to this file. | ||
* | ||
* This file is divided into 2 sections: | ||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. | ||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main | ||
* file. | ||
* | ||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that | ||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), | ||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. | ||
* | ||
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html | ||
*/ | ||
|
||
/*************************************************************************************************** | ||
* BROWSER POLYFILLS | ||
*/ | ||
|
||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/ | ||
// import 'core-js/es6/symbol'; | ||
// import 'core-js/es6/object'; | ||
// import 'core-js/es6/function'; | ||
// import 'core-js/es6/parse-int'; | ||
// import 'core-js/es6/parse-float'; | ||
// import 'core-js/es6/number'; | ||
// import 'core-js/es6/math'; | ||
// import 'core-js/es6/string'; | ||
// import 'core-js/es6/date'; | ||
// import 'core-js/es6/array'; | ||
// import 'core-js/es6/regexp'; | ||
// import 'core-js/es6/map'; | ||
// import 'core-js/es6/weak-map'; | ||
// import 'core-js/es6/set'; | ||
|
||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ | ||
// import 'classlist.js'; // Run `npm install --save classlist.js`. | ||
|
||
/** Evergreen browsers require these. **/ | ||
import 'core-js/es6/reflect'; | ||
import 'core-js/es7/reflect'; | ||
|
||
|
||
/** | ||
* Required to support Web Animations `@angular/animation`. | ||
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation | ||
**/ | ||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. | ||
|
||
|
||
|
||
/*************************************************************************************************** | ||
* Zone JS is required by Angular itself. | ||
*/ | ||
import 'zone.js/dist/zone'; // Included with Angular CLI. | ||
|
||
|
||
|
||
/*************************************************************************************************** | ||
* APPLICATION IMPORTS | ||
*/ | ||
|
||
/** | ||
* Date, currency, decimal and percent pipes. | ||
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 | ||
*/ | ||
// import 'intl'; // Run `npm install --save intl`. | ||
/** | ||
* Need to import at least one locale-data with intl. | ||
*/ | ||
// import 'intl/locale-data/jsonp/en'; |
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 @@ | ||
/* You can add global styles to this file, and also import other style files */ |
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,13 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/app", | ||
"baseUrl": "./", | ||
"module": "es2015", | ||
"types": [] | ||
}, | ||
"exclude": [ | ||
"test.ts", | ||
"**/*.spec.ts" | ||
] | ||
} |
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,5 @@ | ||
/* SystemJS module definition */ | ||
declare var module: NodeModule; | ||
interface NodeModule { | ||
id: string; | ||
} |
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,19 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"outDir": "./dist/out-tsc", | ||
"sourceMap": true, | ||
"declaration": false, | ||
"moduleResolution": "node", | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"target": "es5", | ||
"typeRoots": [ | ||
"node_modules/@types" | ||
], | ||
"lib": [ | ||
"es2017", | ||
"dom" | ||
] | ||
} | ||
} |
Oops, something went wrong.