Skip to content

Commit

Permalink
downgrade less to ^2.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Jun 5, 2018
1 parent ddafab0 commit 4c03f59
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"site:start": "node site_scripts/generate-site init && node site_scripts/generateColorLess && ng serve --port 0 --open",
"site:init": "node site_scripts/generate-site init && node site_scripts/generateColorLess",
"site": "node site_scripts/generate-site",
"schematic:demo": "node schematics_script/demo2schematics",
"schematic:tsc": "tsc -p schematics/tsconfig.json",
"schematic:build": "npm run schematic:tsc && node schematics_script/copy-resources",
"ng": "ng",
"start": "ng serve -p 0",
"build": "node site_scripts/generate-site init && ng build",
Expand All @@ -25,6 +28,7 @@
"module": "./esm5/antd.js",
"es2015": "./esm2015/antd.js",
"typings": "./antd.d.ts",
"schematics": "./schematics/collection.json",
"keywords": [
"ant",
"design",
Expand Down Expand Up @@ -61,6 +65,9 @@
"zone.js": "^0.8.26",
"@angular/compiler-cli": "^6.0.0",
"@angular-devkit/build-angular": "~0.6.0",
"@angular-devkit/core": "^0.6.0",
"@angular-devkit/schematics": "^0.6.0",
"@schematics/angular": "^0.6.0",
"typescript": "~2.7.2",
"@angular/cli": "~6.0.0",
"@angular/language-service": "^6.0.0",
Expand Down Expand Up @@ -96,7 +103,9 @@
"@stackblitz/sdk": "^1.1.1",
"codecov": "^3.0.0",
"ngx-infinite-scroll": "^6.0.0",
"less-plugin-clean-css": "^1.5.1"
"less-plugin-clean-css": "^1.5.1",
"fs-extra": "^6.0.1",
"parse5": "^4.0.0"
},
"peerDependencies": {
"@angular/animations": "^6.0.0",
Expand Down
8 changes: 8 additions & 0 deletions schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Schema } from './schema';
export default function (options: Schema): Rule {
return chain([
options && options.skipPackageJson ? noop() : addZorroToPackageJson(),
downgradeLess(),
addThemeToAppStyles(options),
addModulesToAppModule(options),
addI18n(options)
Expand Down Expand Up @@ -59,6 +60,13 @@ function addI18n(options: Schema) {
};
}

function downgradeLess() {
return (host: Tree) => {
addPackageToPackageJson(host, 'dependencies', 'less', '^2.7.3');
return host;
};
}

/** Add NG-ZORRO, annimations to package.json if not already present. */
function addZorroToPackageJson() {
return (host: Tree) => {
Expand Down

0 comments on commit 4c03f59

Please sign in to comment.