ijijin-cli
Version
0.9.3
update info:
- 2019.02.14: update typeicalbuild.
Install
npm install -g ijijin-cli
Usage
1.easy server
ijijin -s
or
ijijin --server
browser: http://localhost:8443/
params
- port(p): listen port(default:8443);
- dirname: listen dirname
example
ijijin -s -p 3000 --dirname D:/
proxy.config.js
if folder has 'proxy.config.js', the proxy can add interfaces(Array) from the file. as
// proxy.config.jsmodule.exports =
2.image build
format image file to webp and blur base64 string.
If fs system find the render HTML file, it will replace ijijin-img="..."
to src="{{blured base64 image}}" data-format="{{image format}}" data-original="{{image path}}"
*need gm and ImageMagick
ijijin -m
or
ijijin --image
params
- config: config file (default: img.config.js).(optional)
- pc: handle pc rendered HTML file.
example
ijijin -m --config src/img.config.js
* html image load render
if root directory has 'index.html', imageBuilder will render image label which has 'ijijin-img' attribute.
for example
before:
after:
- src: base64 blured image;
- data-format: original image format;
- data-original: original image path;
get base64 string
example
ijijin --base64 logo.png
if you want to change image type, add type argument
ijijin --base64 logo.png --type jpg
get webp image
example
ijijin --webp logo.png
3.typical project build
init typical project folder and core files.
ijijin -t {tasktype}
or
ijijin --typical {tasktype}
default folder name: Time string.
param
- name: folder name;
types
- v/vue: vue project;
- r/react: react project;
- w/webpack: webpack project(no frame, with zepto);
- g+w/gulp+webpack: gulp+webpack project(no frame, with zepto);
command
run development:
npm run start
run build:
npm run build
run production:
npm run build:prod
example
ijijin -t webpack --name 2018test
Author
Micheal Wayne
Update time
2019.02.14