npm常用script

来源:互联网 发布:淘宝达人大v账号购买 编辑:程序博客网 时间:2024/06/17 15:03


// 删除目录"clean": "rimraf dist/*",// 本地搭建一个 HTTP 服务"serve": "http-server -p 9090 dist/",// 打开浏览器"open:dev": "opener http://localhost:9090",// 实时刷新 "livereload": "live-reload --port 9091 dist/",// 构建 HTML 文件"build:html": "jade index.jade > dist/index.html",// 只要 CSS 文件有变动,就重新执行构建"watch:css": "watch 'npm run build:css' assets/styles/",// 只要 HTML 文件有变动,就重新执行构建"watch:html": "watch 'npm run build:html' assets/html",// 部署到 Amazon S3"deploy:prod": "s3-cli sync ./dist/ s3://example-com/prod-site/",// 构建 favicon"build:favicon": "node scripts/favicon.js",
// 删除目录"clean": "rimraf dist/*",// 本地搭建一个 HTTP 服务"serve": "http-server -p 9090 dist/",// 打开浏览器"open:dev": "opener http://localhost:9090",// 实时刷新 "livereload": "live-reload --port 9091 dist/",// 构建 HTML 文件"build:html": "jade index.jade > dist/index.html",// 只要 CSS 文件有变动,就重新执行构建"watch:css": "watch 'npm run build:css' assets/styles/",// 只要 HTML 文件有变动,就重新执行构建"watch:html": "watch 'npm run build:html' assets/html",// 部署到 Amazon S3"deploy:prod": "s3-cli sync ./dist/ s3://example-com/prod-site/",// 构建 favicon"build:favicon": "node scripts/favicon.js",