Skip to content

Commit

Permalink
refactor(module: all): support angular 7.0 (#206)
Browse files Browse the repository at this point in the history
* refactor(module: all): support angular 7.0
  • Loading branch information
fisherspy authored and Guoyuanqiang committed Dec 29, 2018
1 parent bee4fc4 commit 04df46a
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 86 deletions.
1 change: 1 addition & 0 deletions components/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"entryFile": "ng-zorro-antd-mobile.module.ts"
},
"whitelistedNonPeerDependencies": [
"@ant-design/icons-angular",
"tslib",
"angular"
]
Expand Down
35 changes: 18 additions & 17 deletions components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,27 @@
"url": "https://github.com/NG-ZORRO/ng-zorro-antd-mobile/issues"
},
"dependencies": {
"@angular/cdk": "^6.3.0",
"@angular/animations": "^6.1.9"
"@angular/cdk": "^7.2.0",
"@angular/animations": "^7.1.0",
"@ant-design/icons-angular": "~2.0.1"
},
"devDependencies": {
"@angular/common": "^6.1.9",
"@angular/compiler": "^6.1.9",
"@angular/core": "^6.1.9",
"@angular/forms": "^6.1.9",
"@angular/http": "^6.1.9",
"@angular/platform-browser": "^6.1.9",
"@angular/platform-browser-dynamic": "^6.1.9",
"@angular/router": "^6.1.9",
"@angular/upgrade": "^6.1.9",
"@angular-devkit/build-angular": "~0.6.0",
"@angular/cli": "^6.2.3",
"@angular/compiler-cli": "^6.1.9",
"@angular/platform-server": "^6.1.9",
"tslint": "^5.9.1",
"@angular/common": "^7.1.0",
"@angular/compiler": "^7.1.0",
"@angular/core": "^7.1.0",
"@angular/forms": "^7.1.0",
"@angular/http": "^7.1.0",
"@angular/platform-browser": "^7.1.0",
"@angular/platform-browser-dynamic": "^7.1.0",
"@angular/router": "^7.1.0",
"@angular/upgrade": "^7.1.0",
"@angular-devkit/build-angular": "^0.11.0",
"@angular/cli": "^7.1.0",
"@angular/compiler-cli": "^7.1.0",
"@angular/platform-server": "^7.1.0",
"tslint": "~5.11.0",
"tslib": "^1.9.0",
"typescript": "~2.9.2"
"typescript": "~3.1.1"
},
"lint-staged": {
"{src,docs}/**/*.{scss}": [
Expand Down
95 changes: 49 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"scripts": {
"ng": "ng",
"start": "npm run site:init && ng serve --port 4300 --host 0.0.0.0 --deploy-url=/ --disable-host-check",
"build": "node ./scripts/site/generate-site init && ng build --prod --output-hashing none",
"build": "node ./scripts/site/generate-site init && node --max_old_space_size=5120 node_modules/@angular/cli/bin/ng build --prod --output-hashing none",
"test": "npm run site:init && ng test --watch=false --code-coverage",
"test-watch": "npm run site:init && ng test --watch=true --code-coverage",
"release": "node ./scripts/publish/publish.js",
"release": "node --max_old_space_size=5120 ./scripts/publish/publish.js",
"publish": "bash ./scripts/publish/publish.sh",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --pkg components/package.json && node ./scripts/site/replace-scope-prefix.js",
"site": "node ./scripts/site/generate-site",
Expand Down Expand Up @@ -44,76 +44,79 @@
"frontend"
],
"dependencies": {
"@angular/cdk": "^6.3.0",
"@angular/animations": "^6.1.9",
"@ant-design/icons-angular": "^1.0.1",
"ant-design": "^1.0.0"
"@angular/cdk": "^7.2.0",
"@angular/animations": "^7.1.0",
"@ant-design/icons-angular": "~2.0.1",
"ant-design": "^1.0.0",
"@angular/pwa": "^0.11.3"
},
"devDependencies": {
"node-prismjs": "^0.1.1",
"prismjs": "^1.10.0",
"codecov": "^3.0.0",
"remark": "^8.0.0",
"rxjs": "^6.3.3",
"yaml-front-matter": "^3.4.0",
"zone.js": "^0.8.24",
"@angular-devkit/build-angular": "^0.11.0",
"@angular-devkit/build-ng-packagr": "^0.11.0",
"@angular-devkit/core": "^7.1.0",
"@angular-devkit/schematics": "^7.1.0",
"@angular/cli": "^7.1.0",
"@angular/common": "^7.1.0",
"@angular/compiler": "^7.1.0",
"@angular/compiler-cli": "^7.1.0",
"@angular/core": "^7.1.0",
"@angular/forms": "^7.1.0",
"@angular/http": "^7.1.0",
"@angular/platform-browser": "^7.1.0",
"@angular/platform-browser-dynamic": "^7.1.0",
"@angular/platform-server": "^7.1.0",
"@angular/router": "^7.1.0",
"@angular/upgrade": "^7.1.0",
"@schematics/angular": "^0.6.0",
"@stackblitz/sdk": "^1.1.1",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.0",
"antd-theme-generator": "^1.1.5",
"classlist.js": "^1.1.20150312",
"codelyzer": "^4.4.4",
"core-js": "^2.5.4",
"web-animations-js": "^2.3.1",
"antd-theme-generator": "^1.0.7",
"less": "^2.7.2",
"marked": "^0.5.1",
"ng-zorro-antd": "^1.1.0",
"@angular-devkit/build-angular": "^0.6.0",
"@angular-devkit/build-ng-packagr": "^0.6.8",
"@angular-devkit/core": "^0.6.0",
"@angular-devkit/schematics": "^0.6.0",
"@angular/common": "^6.1.9",
"@angular/compiler": "^6.1.9",
"@angular/core": "^6.1.9",
"@angular/forms": "^6.1.9",
"@angular/http": "^6.1.9",
"@angular/platform-browser": "^6.1.9",
"@angular/platform-browser-dynamic": "^6.1.9",
"@angular/router": "^6.1.9",
"@angular/upgrade": "^6.1.9",
"@angular/cli": "^6.2.3",
"@angular/compiler-cli": "^6.1.9",
"@angular/platform-server": "^6.1.9",
"@types/jasmine": "~2.8.0",
"@types/jasminewd2": "^2.0.3",
"@types/node": "^6.0.45",
"@schematics/angular": "^0.6.0",
"codecov": "^3.0.0",
"codelyzer": "~4.5.0",
"conventional-changelog-cli": "^2.0.1",
"core-js": "^2.5.4",
"fs-extra": "^6.0.1",
"husky": "^1.0.1",
"jasmine-core": "~2.99.1",
"jasmine-marbles": "^0.3.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma": "~3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-phantomjs-launcher": "^1.0.2",
"less": "^3.9.0",
"less-plugin-clean-css": "^1.5.1",
"marked": "^0.5.1",
"ng-packagr": "^4.0.0",
"ngx-color": "^1.5.2",
"ng-zorro-antd": "^1.1.0",
"ngx-color": "^2.0.5",
"ngx-infinite-scroll": "^6.0.0",
"node-prismjs": "^0.1.1",
"phantomjs-prebuilt": "^2.1.7",
"pre-commit": "^1.2.2",
"protractor": "~5.3.0",
"prismjs": "^1.10.0",
"protractor": "^5.4.2",
"readline-sync": "^1.4.9",
"remark": "^8.0.0",
"rollup": "^0.49.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"rollup-plugin-uglify": "^2.0.1",
"rxjs": "^6.3.3",
"ts-node": "~7.0.0",
"tslib": "^1.9.0",
"tslint": "~5.11.0",
"typescript": "^2.9.2"
"tsickle": "^0.30.0",
"typescript": "~3.1.1",
"web-animations-js": "^2.3.1",
"yaml-front-matter": "^4.0.0",
"zone.js": "^0.8.26"
},
"lint-staged": {
"{src,docs}/**/*.{scss}": [
Expand Down
12 changes: 3 additions & 9 deletions scripts/build/generate-less.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@ function compileLess(content, savePath, min) {
return new Promise((resolve, reject) => {
const plugins = [];
if (min) {
const cleanCSSPlugin = new LessPluginCleanCSS({
advanced: true
});
const cleanCSSPlugin = new LessPluginCleanCSS({advanced: true});
plugins.push(cleanCSSPlugin);
}
return less.render
.call(less, content, {
plugins
})
.then(({
css
}) => {
.call(less, content, {plugins: plugins, javascriptEnabled: true})
.then(({css}) => {
fs.writeFileSync(savePath, css);
resolve();
})
Expand Down
27 changes: 13 additions & 14 deletions scripts/site/_site/src/app/share/nz-codebox/nz-codebox.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,20 +352,19 @@ export class AppModule { }
description : 'Created with <3 by the StackBlitz SDK!',
template : 'angular-cli',
dependencies: {
'rxjs' : '^6.0.0',
"rxjs-compat" : "^6.2.0",
'@angular/cdk' : '^6.0.0',
'@angular/core' : '^6.0.0',
'@angular/forms' : '^6.0.0',
'@angular/http' : '^6.0.0',
'@angular/language-service' : '^6.0.0',
'@angular/platform-browser' : '^6.0.0',
'@angular/platform-browser-dynamic': '^6.0.0',
'@angular/common' : '^6.0.0',
'@angular/router' : '^6.0.0',
'@angular/animations' : '^6.0.0',
'date-fns' : '^1.29.0',
'ng-zorro-antd-mobile' : '^0.9.0'
'rxjs' : '^6.3.3',
'@angular/cdk' : '^7.1.0',
'@angular/core' : '^7.1.0',
'@angular/forms' : '^7.1.0',
'@angular/http' : '^7.1.0',
'@angular/language-service' : '^7.1.0',
'@angular/platform-browser' : '^7.1.0',
'@angular/platform-browser-dynamic': '^7.1.0',
'@angular/common' : '^7.1.0',
'@angular/router' : '^7.1.0',
'@angular/animations' : '^7.1.0',
'@ant-design/icons-angular' : '~2.0.1',
'ng-zorro-antd-mobile' : '^0.10.0'
},
tags : [ 'stackblitz', 'sdk' ]
});
Expand Down

0 comments on commit 04df46a

Please sign in to comment.