Giter VIP home page Giter VIP logo

build-cli's Introduction

build-cli

构建前端项目通用配置

build-cli 旨在能够 快速构建项目, 规范目录结构, 开发规范 等。 接入者可快速开发业务, 无需考虑打包构建等头疼问题。

如何接入?

  • 新项目接入
# npm install -g build-cli 目前还没发布正式版

build init <template-name> <project-name>

Example:

build init webpack demo

上面的命令从 build-webpack-template 中提取模板,提示您输入一些信息,并在 demo 处生成项目。

  • 老项目接入

老项目接入时, build 会将用户重新配置的信息合并到 package.json 文件中

当前可用的模板

可扩展

你也可以使用自己构建的模板, 参照 build-webpack-template 构建自己的通用配置

必要文件

  • meta.js / meta.json: 配置文件

  • templates 目录: 存放 ejs 模板

meta 字段

meta.js 或者 meta.json 包含以下字段:

  • prompts: 用于收集用户选项数据

  • filter: 用于有条件的过滤器文件进行渲染。

  • skipInterpolation: 不执行 ejs 编译文件

  • complete: 可以在生成模板后钩子。

build-cli's People

Watchers

刘朝旭 avatar

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.