零配置打包工具parcel

作者: admin 日期: 2018-08-23 17:23:22 人气: - 评论: 0

最近下载了一个tensorflowjs的一个demo研究的时候发现,该demo项目使用了parcel-bundler作为打包工具

package.json :

{
"name": "tfjs-examples-polynomial-regression-core",
 "version": "0.1.0",
 "description": "",
 "main": "index.js",
 "license": "Apache-2.0",
 "private": true,
 "engines": {
"node": ">=8.9.0"
 },
 "dependencies": {
"@tensorflow/tfjs": "^0.12.5",
   "parcel-bundler": "^1.8.1",
   "vega-embed": "^3.2.0",
   "vega-lite": "^2.3.1"
 },
 "scripts": {
"watch": "cross-env NODE_ENV=development parcel index.html --no-hmr --open",
   "build": "cross-env NODE_ENV=production parcel build index.html --no-minify --public-url ./",
   "postinstall": "yarn upgrade --pattern @tensorflow"
 },
 "devDependencies": {
"babel-plugin-transform-runtime": "~6.23.0",
   "babel-polyfill": "~6.26.0",
   "babel-preset-env": "~1.6.1",
   "clang-format": "~1.2.2",
   "cross-env": "^5.1.6",
   "parcel-bundler": "~1.8.1"
 }
}


执行npm run watch 就开始打包项目,无需其他配置

相关内容

发表评论
更多 网友评论0 条评论)
暂无评论

Copyright © 2012-2014 我的代码板 Inc. 保留所有权利。

页面耗时0.0291秒, 内存占用1.83 MB, 访问数据库13次

闽ICP备15009223号-1