0

我正在尝试做的事情:我正在尝试通过在我的 package.json 中设置一个脚本来自动将我的 scss 编译为 css。我使用 onchange 和 npm-run-all 包设置的一些监视任务并行运行此编译器。

我的 package.json 文件代码是这样的

{
  "name": "confusion",
  "version": "1.0.0",
  "description": "This is a website for Ristorante Con Fusion",
  "main": "index.html",
  "scripts": {
    "start": "npm run watch:all",
    "test": "echo \"Error: no test specified\" && exit 1",
    "lite": "lite-server",
    "scss": "sass css/styles.scss css/styles.css",
    "watch:scss": "onchange 'css/styles.scss' -- npm run scss",
    "watch:all": "npm-run-all --parallel watch:scss lite"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "lite-server": "^2.3.0",
    "npm-run-all": "^4.1.5",
    "onchange": "^7.1.0"
  },
  "dependencies": {
    "bootstrap": "^4.6.0",
    "bootstrap-social": "^5.1.1",
    "font-awesome": "^4.7.0",
    "jquery": "^3.6.0",
    "popper.js": "^1.12.9"
  }
}

当我对我的 scss 进行任何更改并尝试运行以下命令时

npm start

我希望我在我的 scss 上所做的更改在我的页面上可见,但他们没有。这里是完整项目的 Github 存储库,供您参考。请帮我看看我做错了什么。

4

0 回答 0