# parcel
**Repository Path**: zhoujianjun/parcel
## Basic Information
- **Project Name**: parcel
- **Description**: 打包工具案例
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2018-09-28
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# parcel
#### 项目介绍
打包工具案例
#### 软件架构
parcel 打包工具
官网:https://parceljs.org
中文网:http://www.css88.com/doc/parcel/getting_started.html
#### 软件架构
请使用es6语法/scss
```javascript es6
() => {alert()}
const {location, localStorage} = window;
let aa = [1,2,3,4,5];
let bb = [
...aa,
6,7,8,9
]
```
scss直接link标签引入,无需编译
```html
```
图片引入方法:
```javascript
require('../images/page2-bg.jpg')
import img from '../images/page2-bg.jpg'
```
#### 安装教程
全局安装parcel
```shell
npm install -g parcel-bundler
```
初始化项目
```shell
git clone https://gitee.com/zhoujianjun/c.git
cd https://gitee.com/zhoujianjun/parcel
npm install
```
监听某个项目并在1234端口打开
```shell
parcel src/demo1/index.html
```
监听某个项目并在指定端口打开
```shell
parcel src/demo1/index.html -p 5000
```
打包线上环境
```shell
parcel build src/demo1/index.html
```