This repository has been archived by the owner on Dec 12, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21ab95c
commit 24f0434
Showing
4 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
# cooking-cli | ||
# cooking | ||
[![npm](https://img.shields.io/npm/dm/cooking-cli.svg?maxAge=2592000)]() | ||
[![npm](https://img.shields.io/npm/v/cooking-cli.svg?maxAge=6000)](https://www.npmjs.com/package/cooking-cli) | ||
[![gitter](https://img.shields.io/gitter/room/QingWei-Li/cooking.svg?maxAge=2592000)](https://gitter.im/QingWei-Li/cooking?utm_source=share-link&utm_medium=link&utm_campaign=share-link) | ||
|
||
> [cooking](https://github.com/ElemeFE/cooking) 命令行工具 | ||
|
||
## Links | ||
- [Docs](http://cookingjs.github.io) | ||
- [Examples](https://github.com/cooking-demo) | ||
- [Plugins](https://github.com/cookingjs) | ||
|
||
## Installation | ||
```shell | ||
npm i cooking-cli -g | ||
``` | ||
|
||
## Usages | ||
```shell | ||
# create vue project | ||
cooking create vue-project vue | ||
|
||
# development mode | ||
cooking watch | ||
|
||
# production mode | ||
cooking build | ||
|
||
# import plugin | ||
cooking import vue,lint | ||
``` | ||
|
||
# License | ||
[MIT](https://github.com/ElemeFE/cooking/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,63 @@ | ||
# cooking | ||
[![npm](https://img.shields.io/npm/dm/cooking.svg?maxAge=2592000)]() | ||
[![npm](https://img.shields.io/npm/v/cooking.svg?maxAge=6000)](https://www.npmjs.com/package/cooking) | ||
[![gitter](https://img.shields.io/gitter/room/QingWei-Li/cooking.svg?maxAge=2592000)](https://gitter.im/QingWei-Li/cooking?utm_source=share-link&utm_medium=link&utm_campaign=share-link) | ||
|
||
> 更易上手的前端构建工具,基于 webpack | ||
|
||
## Links | ||
- [Docs](http://cookingjs.github.io) | ||
- [Examples](https://github.com/cooking-demo) | ||
- [Plugins](https://github.com/cookingjs) | ||
|
||
## Installation | ||
```shell | ||
npm i cooking -D | ||
``` | ||
|
||
## webpack 1 | ||
### webpack 1 | ||
```shell | ||
npm i babel-core babel-loader css-loader file-loader postcss postcss-loader\ | ||
html-loader html-webpack-plugin json-loader style-loader url-loader\ | ||
webpack@1 webpack-dev-server@1 extract-text-webpack-plugin@1 -D | ||
``` | ||
|
||
## webpack 2 | ||
### webpack 2 | ||
```shell | ||
npm i babel-core babel-loader css-loader file-loader postcss postcss-loader\ | ||
html-loader html-webpack-plugin json-loader style-loader url-loader\ | ||
webpack@beta webpack-dev-server@beta extract-text-webpack-plugin@beta -D | ||
``` | ||
|
||
## Usage | ||
|
||
cooking.conf.js | ||
```javascript | ||
var cooking = require('cooking') | ||
|
||
cooking.set({ | ||
entry: './src/index.js', | ||
dist: './dist', | ||
template: './index.tpl', | ||
hash: true, | ||
extractCSS: true, | ||
devServer: { port: 8080 } | ||
}) | ||
|
||
module.exports = cooking.resolve() | ||
``` | ||
|
||
```shell | ||
# development | ||
node_modules/.bin/cooking watch | ||
|
||
# production | ||
node_modules/.bin/cooking build -p | ||
|
||
# or use webpack | ||
NODE_ENV=production webpack --config cooking.conf.js | ||
``` | ||
|
||
# License | ||
[MIT](https://github.com/ElemeFE/cooking/LICENSE) |