Skip to content
This repository was archived by the owner on May 11, 2020. It is now read-only.

Commit dc22b58

Browse files
author
黄俊亮
committed
chore: bump less to version 3.0
angular/angular-cli#10430 has been fixed and shipped since @angular/cli 6.2.0. It is unecessary to lock less at version 2
1 parent a17ea49 commit dc22b58

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

docs/customize-theme.en-US.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@ We are using [Less](http://lesscss.org/) as the development language for styling
1717

1818
Run `ng add ng-zorro-antd --theme`,then modified the file `src/theme.less`.
1919

20-
> Note: `ng add ng-zorro-antd --theme` will [downgrade](https://github.com/angular/angular-cli/issues/10430) the version of `less` to `2.7`.
21-
2220
### Without schematics
2321

2422
Create a standalone less file named `theme.less` in `src` folder, and add the path of it to the list of `styles` in `angular.json` file.
2523

26-
> Note: You have to [downgrade](https://github.com/angular/angular-cli/issues/10430) the version of `less` to `2.7`.
27-
2824
```json
2925
...
3026
"styles": [

docs/customize-theme.zh-CN.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ Ant Design 的样式使用了 [Less](http://lesscss.org/) 作为开发语言,
1616

1717
在初始化项目时 `ng add ng-zorro-antd --theme` 即可自动配置好自定义主题的相关文件,修改 `src/theme.less` 文件内容就可以自定义主题。
1818

19-
> 注意:使用 `ng add ng-zorro-antd --theme` 时会[自动](https://github.com/angular/angular-cli/issues/10430)降级 `less``2.7` 版本
20-
2119
### 手动修改
2220

2321
`src` 目录下建立一个单独的 `theme.less` 文件,在 `angular.json` 文件的 `styles` 列表加入该文件
2422

25-
> 注意:由于 `less``3.0` 以上版本默认禁用了 `javascriptEnabled`,需要手动降级 `less``2.7` 版本
26-
2723
```json
2824
...
2925
"styles": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"karma-coverage-istanbul-reporter": "~1.4.2",
8181
"karma-jasmine": "~1.1.1",
8282
"karma-jasmine-html-reporter": "^0.2.2",
83-
"less": "^2.7.3",
83+
"less": "^3.0.0",
8484
"less-plugin-clean-css": "^1.5.1",
8585
"marked": "^0.3.6",
8686
"ng-packagr": "^4.0.0",

schematics/ng-add/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { Schema } from './schema';
2121
import schematicsFixIcon from '../fix-icon/index';
2222

2323
const ADD_CONFIG = {
24-
LESS_VERSION : '^2.7.3',
24+
LESS_VERSION : '^3.0.0',
2525
CUSTOM_THEME_PATH : 'src/theme.less',
2626
COMPILED_THEME_PATH: 'node_modules/ng-zorro-antd/ng-zorro-antd.min.css',
2727
BOOT_PAGE_PATH : 'src/app/app.component.html',

0 commit comments

Comments
 (0)