1.0.9 • Published 4 years ago

emow-core v1.0.9

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

emow-cli

前端工程化工具套件

You can use emow-cli to generate your project:

$ npm install emow-cli -g

Emow-cli provides the following commands:

$ emo -h
Usage: emo [options] [command]

Options:
  -v --vers       output the current version
  -h, --help      display help for command

Commands:
  install [name]  install generator module by name
  init|i [name]   list all generators for you to choose
  dev             start your project
  build           build your project
  test            test your project
  help [command]  display help for command

install: Install generator to local

$ emo install @lvhh/generator-emow

开始安装:  @lvhh/generator-emow
moduleRootPath /Users/haohua/.emo/emo_modules/.generators/@lvhh/generator-emow
✔ Installed 1 packages
✔ Linked 0 latest versions
✔ Run 0 scripts
✔ All packages installed (used 345ms(network 344ms), speed 2.98kB/s, json 1(1.02kB), tarball 0B)

 安装完成,你可以继续执行以下命令开始使用:

 运行:emo init

init: Init your project by already installed 'Generator',You can also use your own Generator, In other words, you can use all the generators in the NPM repository。

Next you need to execute 'emo init',emo will lists all Generators you installed before:

$ emo init
? 请选择generator: (Use arrow keys)
❯ emow : 用于构建react项目的generator

Next select a genertor you want,generator will running

$ emo init
? 请选择generator: emow : 用于构建react项目的generator
initializing...
prompting...
? 项目名称(Project name) test
? 是否启用TypeScript? Yes
? 请选择css预处理类型 (Use arrow keys)
❯ CSS
  LESS
  SCSS

After configuration according to the prompts of the Generator,Gennerator will start building your project.

After the build is complete, you can go to your project directory and use 'emo dev' to start your project dev: start your project

$ emo dev

Compiled successfully!

You can now view emo in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://192.168.0.115:3000

Note that the development build is not optimized.
To create a production build, use yarn build.

build:

$ emo build

Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  39.38 KB  build/static/js/2.54ca3501.chunk.js
  771 B     build/static/js/runtime-main.97745e36.js
  641 B     build/static/js/main.b49acc06.chunk.js
  547 B     build/static/css/main.5f361e03.chunk.css

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  yarn global add serve
  serve -s build

Find out more about deployment here:

  bit.ly/CRA-deploy

'node' exit : 0

test:

$ emo test
 PASS  src/App.test.js
  ✓ renders learn react link (25ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        2.647s
Ran all test suites.

Watch Usage
 › Press f to run only failed tests.
 › Press o to only run tests related to changed files.
 › Press q to quit watch mode.
 › Press p to filter by a filename regex pattern.
 › Press t to filter by a test name regex pattern.
 › Press Enter to trigger a test run.

Welcome to use

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago