1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【npm-scripts】タスクランナー メモ

Last updated at Posted at 2020-06-28

使用するコマンド

README.md
yarn init -y
yarn add -D
npm i -D 

「_**ejs」もコンパイルされてしまうのを防ぐため修正しました。

package.json
{
  "name": "npm-scripts_menta",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "devDependencies": {
    "autoprefixer": "^9.8.4",
    "browser-sync": "^2.26.7",
    "chokidar-cli": "^2.1.0",
    "ejs-cli": "^2.2.0",
    "node-sass": "^4.14.1",
    "node-sass-globbing": "^0.0.23",
    "npm-run-all": "^4.1.5",
    "postcss-cli": "^7.1.1",
    "watch": "^1.0.2"
  },
  "scripts": {
    "start": "run-p watch:ejs2html watch:scss2cssprefix start:server",
    "compile:ejs2html": "ejs-cli -b src/ejs/ \"/**/!(_)*.ejs\" -o dist/",
    "watch:ejs2html": "chokidar \"src/ejs/\" -c \"npm run compile:ejs2html\" --initial",
    "start:server": "browser-sync start -s dist -w src/*.html src/css/*.css src/js/*.js",
    "compile:css2cssprefix": "postcss dist/css/style.css -u autoprefixer -o dist/css/style.css",
    "compile:scss2css": "node-sass src/scss/style.scss --importer node_modules/node-sass-globbing/index.js dist/css/style.css --output-style expanded --source-map dist/css/",
    "compile:scss2cssprefix": "run-s compile:scss2css compile:css2cssprefix",
    "watch:scss2cssprefix": "chokidar \"src/scss/\" --command \"npm run compile:scss2cssprefix\" --initial"
  }
}


1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?