Code Monkey home page Code Monkey logo

介绍

	easy-cli是一个简单易用的脚手架工具,可以让用户通过简单的命令行交互获取远程模板工程来快速构建本地开发环境。

全局安装

npm install -g @yibancangbai/easy-cli

命令

以下是所有可用命令,您也可以通过在终端内输入easy -h来查看:

create <templateName> <projectName>:

	这种方式会在当前目录下创建文件名为```projectName```的项目,如果文件名已存在可选择合并、覆盖或取消操作。

	另外, ```projectName``` 可以是 ```.``` 代表直接在当前文件目录下初始化项目,而不会再创建文件夹。如果本地当前目录下已有存在的子文件,将默认采用合并的方式处理。

list:

	将会在终端内列出所有可用的模板列表

bind <url>:

	将会从远程获取包含模板配置信息的js文件内容,并通过nodejs将其内容写入```process.env.HOME```目录下生成的easyConfig.js文件。

使用

  1. 在任意静态服务器上传包含模板配置信息的js文件,该文件内容格式见下文;
  2. 终端中运行 easy bind <远程js文件地址>,将模板配置信息同步到本地;
  3. 运行 easy create 命令开始初始化本地项目;

模板配置文件

module.exports = {
  templateName: {
    name: 'easy-template-' + templateName,
    repo: 'http://gitlab.ops...,模板项目仓库页面地址,仅供查看',
    downloadUrl: '[email protected]...,模板项目的完整git clone地址,用于下载',
    description: '模板项目描述'
  },
  ......
}
	请严格按照以上格式编写配置文件,其中```templateName```由用户自定义,在运行```easy create```命令时使用。```downloadUrl```必须是完整的git clone地址,因为easy-cli会在本地运行```git clone```来获取远程代码。```name```属性也要稍微留意下,获取完远程代码后easy-cli会在本地当前目录创建一个临时文件夹用于承载下载的文件,该文件名用的就是```name```的属性值,虽然临时文件夹很快会被自动删除,但还是要尽量保证该文件名的唯一性,避免与同级目录内文件夹产生命名冲突。

持续更新。。。

Evan Chen's Projects

axios icon axios

Promise based HTTP client for the browser and node.js

card icon card

This project aims to show users all the restaurant discount information related to credit card.

dawn icon dawn

:sunrise: Dawn is a lightweight task management and build tool for front-end and nodejs.

easy-cli icon easy-cli

简单易用的cli工具,用于下载存于远程仓库地址的项目模板

natty-fetch icon natty-fetch

A natty semantic data-fetching util based on promise that no longer needs to use jQuery/Zepto's Ajax.

qiankun icon qiankun

📦 🚀 Blazing fast, simple and completed solution for micro frontends.

react-fileupload icon react-fileupload

Upload files async with xhr2 or iframe for IE. Supporting IE8+. React component.

react-lazy-load icon react-lazy-load

React component that renders children elements when they enter the viewport.

vant icon vant

Lightweight Mobile UI Components built on Vue

vue icon vue

🖖 A progressive, incrementally-adoptable JavaScript framework for building UI on the web.

vue-cli icon vue-cli

🛠️ Standard Tooling for Vue.js Development

vue2-elm icon vue2-elm

基于 vue2 + vuex 构建一个具有 45 个页面的大型单页面应用

webpack icon webpack

A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

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.