在Scss中使用angular时,如何查看翻译的CSS?

时间:2018-07-06 17:56:06

标签: angular angular-cli kendo-ui-angular2

在Angluar cli应用程序中使用scss时,我在哪里可以看到生成的结果CSS和ng构建是否完成?

angular.json中的相关部分

  "options": {
    "outputPath": "dist/ClientApp",
    "index": "src/index.html",
    "main": "src/main.ts",
    "polyfills": "src/polyfills.ts",
    "tsConfig": "src/tsconfig.app.json",
    "assets": [
      "src/favicon.ico",
      "src/assets"
    ],
    "styles": [
      "./node_modules/bootstrap/scss/bootstrap.scss",
      "./node_modules/font-awesome/css/font-awesome.css",
      "src/styles.scss"
    ],
    "scripts": [
      "./node_modules/jquery/dist/jquery.min.js",
      "./node_modules/popper.js/dist/umd/popper.min.js",
      "./node_modules/bootstrap/dist/js/bootstrap.min.js"
    ]

  "defaultProject": "ClientApp",
  "schematics": {
    "@schematics/angular:component": {
      "styleext": "scss"
    }

1 个答案:

答案 0 :(得分:1)

运行:

ng build

这会将已转译的文件放入dist/,然后检查该文件夹中是否有css文件。

相关文档:https://github.com/angular/angular-cli/wiki/build#creating-a-build