"scripts": {
"watch": "npm run build && node_modules/http-server/bin/http-server dist -p 1234 ",
"build": "mkdir -p dist/ && cp index.html dist/ && cp index.js dist/"
},
유닉스 기반으로 작성된 scripts 를 윈도우로 옮길 때 주의 해야 하는 것이 두가지 있습니다.
1. "/" --> "\\"
2. cp --> copy
"scripts": {
"build": "mkdir dist && copy index.html dist\\ && copy index.js dist\\",
"watch": "npm run build && npx http-server dist -p 1234"
}
(윈도우 환경에서는 http-server 명령어를 실행하려면 npx를 사용해야 합니다.)
let 과 var 의 차이 - window 속성에서 차이 중요 (1) | 2024.07.24 |
---|---|
DOMContentLoaded, load, onload, loadeddata, onloadeddata (2) | 2024.07.22 |
json() 과 JSON.parse() (2) | 2024.07.05 |
forEach() - advanced (1) | 2024.07.05 |
JSON.stringify() (0) | 2024.07.05 |