如何正确编译节点js项目中的文件

how to properly compile files in node js project

创建了一个小项目。我是 在其中使用 sass、节点 js、打字稿、车把。

我编译项目的脚本

"start": "nodemon index.ts",
"build": "tsc --noEmit false && sass -w src/:dist/css/"

差不多

所有文件都按我的需要编译, 我想念将 handlebars 文件移动到主编译文件夹 (dist)

如何整理?

enter image description here

对于 sass 我个人使用这个简单的构建过程

package.json

"scripts": {
    "watch:sass": "sass --watch sass/main.sass  dist/css/style.css",
    "compile:sass": "sass --no-source-map sass/main.sass  dist/css/style.comp.css",
    "concat:css": "concat -o dist/css/style.concat.css dist/css/icon-fonts.css dist/css/style.comp.css",
    "prefix:css": "postcss --use autoprefixer  -b 'last 10 versions' dist/css/style.concat.css  -o dist/css/style.prefix.css",
    "compress:css": "sass --style compressed dist/css/style.prefix.css dist/css/style.css ",
    "build:css": "npm-run-all compile:sass concat:css prefix:css compress:css "
  },
  "devDependencies": {
    "autoprefixer": "^10.4.2",
    "concat": "^1.0.3",
    "npm-run-all": "^4.1.5",
    "postcss-cli": "^9.1.0",
    "sass": "^1.49.4"
  },