Code Monkey home page Code Monkey logo

dong's Introduction

dong

NPM version

      ___
  ____/ /___  ____  ____
 / __  / __ \/ __ \/ __ \
/ /_/ / /_/ / / / / /_/ /
\____/\____/_/ /_/\__, /
                 /____/

又一个前端工具

安装

$ npm install -g dong
# MUST
$ dong patch

使用

查看帮助

$ dong [command] -h

初始化项目

$ dong init [type]

# Single Page Application
$ dong init spa

# General Web Project
$ dong init web

项目构建

dong build [type]

# Single Page Application
$ dong build spa

# General Web Project
$ dong build web

参数

-r, --root <root>    Web 服务根目录,默认 `.`
-v, --views <views>  视图文件,默认 Web 服务根目录下的 `*.html`
-f, --force          先清空输出目录
-d, --debug          DEBUG, 仅生成 `config.js`

特性

  • JS 文件打包压缩
  • 资源 MD5 值生成
  • 资源链接添加 MD5 串
  • CSS 文件生成于压缩

启动 Web 服务

$ dong serve

参数

-r, --root <root>  Web 服务根目录,默认 `.`
-H, --host <host>  服务域名,默认 `127.0.0.1`
-p, --port <port>  监听端口,默认 `9527`
-m, --mock <mock>  接口请求模拟数据存放目录,默认 `api`
-o, --open         服务启动后,自动在浏览器打开,默认 `false`
-d, --debug        显示 Debug 信息,默认 `false`

特性

  • 静态文件服务
  • 模拟接口请求
  • 自动编译 SCSS
  • 自动重启服务

TODOs

  • dong test
  • dong release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.