티스토리 뷰
# nodejs plugins CLI use nodejs plugins bundler to try CLI ## Feature - npm - node-sass - concat - minifier ### Installation ```sh > npm install -g npm > npm install node-sass --save-dev > npm install concat --save-dev > npm install -g minifier --save-dev ``` ### Plugins | Plugin | URL | | ------ | ------ | | node-sass | [https://github.com/sass/node-sass] | | concat | [https://www.npmjs.com/package/concat] | | minifier | [https://www.npmjs.com/package/minifier] | ### CLI Example ```sh > concat -o output.css ./1.css ./2.css > node-sass src/style.scss dest/style.css > node-sass src/style.scss dest/style.css ``` ### Order Step - step1 : concat ( css, js ) ```sh > concat -o style.scss ./1.scss ./2.scss ./3.scss > concat -o main.js ./1.js ./2.js ./3.js ``` - step2 : scss to css ```sh > node-sass style.scss style.css ``` - step3 : minify ( css, js ) ```sh > minify style.css // style.min.js > minify main.js // main.min.js ``` ### Complete package.json "scripts" - package.json ```sh "scripts": { "concat-css": "concat -o style.scss ./1.scss ./2.scss ./3.scss", "concat-js": "concat -o main.js ./1.js ./2.js ./3.js", "scss": "node-sass style.scss style.css", "minify-css": "minify style.css", "minify-js": "minify main.js" }, ```
온라인 에디터 : https://dillinger.io/
'■ 프론트엔드 ■ > Markdown' 카테고리의 다른 글
Markdown 이란 (0) | 2018.05.14 |
---|
댓글