sim-pack
v1.0.2
Published
The simple tool dealing with packing JS files
Downloads
4
Readme
simple-pack
The simple pack tool, which resembles webpack.
How to pack
The following steps:
- Parse a single file and extract its dependencies;
- Recursively build a dependency graph;
- Package everything into a single file
Usage
根据项目根目录下的配置文件spack.config.js,将example里的js文件打包到dist目录下,生成打包后的文件s-pack.js,index.html引入s-pack.js后,会在浏览器控制台输出hello Wenfang Zhu!
目前仅供js文件打包使用
全局安装simple-pack。npm install -g sim-pack
or
git clone https://github.com/zwf193071/simple-pack.git
cd simple-pack && npm install
npm link
在个人项目的根目录下需新建spack.config.js文件,配置好入口文件之后,运行命令s-pack
,即可成功打包js文件
Thanks to
License
This repo is released under the MIT.