项目入口
package.json
由package.json文件可知
- 项目的文件入口:
index.js - 命令行:parcel123456{"main": "index.js","bin": {"parcel": "bin/cli.js"}}
bin/cli.js
使用commander包来处理命令行,有以下命令
解析命令后,执行构建流程
Bundler.js
The Bundler is the main entry point. It resolves and loads assets, creates the bundle tree, and manages the worker farm, cache, and file watcher.
构造函数:constructor
|
|
源码有点难度,以后再看。。。/(ㄒoㄒ)/~~
参考: