GithubHelp home page GithubHelp logo

h5-build-cli's Introduction

H5模板构建工具

注意!由于package名过长&覆盖面低,已经切换至 https://g.hz.netease.com/f2e/component/ne-build

version commit new feature

命令

$ npx ne-build h5
# 请使用ne-build创建项目

$ npx h5-build-cli init -t NyPhile/h5_template
# node版本大于5.2
# 参数可在命令行输入,也可以输入命令后按交互提示输入

参数

以下参数均可交互式输入

-n or --name
# 项目名称,必须
# 用于替换模板项目中package.json的{name}

-c or --channel
# 频道名称,必须
# 用于替换模板项目内上传路径中的频道路径

-d or --desc
# 项目描述,可选
# 用于替换模板项目中package.json的{description}

-t or --template
# 模板地址,必选
# 使用download-git-repo下载模板
# H5模板地址 NyPhile/h5_template

--username
# 上传工具账号,必须,即邮箱前缀

--password
# 上传工具密码,必须,即邮箱密码

流程

  1. 使用 npx 执行包命令
  2. 输入相应参数(namechanneldesctemplateusernamepassword
  3. 使用 download-git-repo 在当前目录下载对应模板内容
  4. 替换 package.json 中的内容,{name} -> name{channel} -> channel{desc} -> description
  5. 替换 .ftppass 中的内容,{username} -> username{password} -> password
  6. 替换 README.md 中的内容,# {name} -> # 项目标题
$ npx ne-build init
# 创建项目,可同时输入参数,如 npx ne-build init -t NyPhile/h5_template

$ npx ne-build h5
# 使用 NyPhile/h5_template 作为模板创建项目,等同于 npx ne-build init -t NyPhile/h5_template

$ npx ne-build post
# 使用 NyPhile/post_template 作为模板创建项目,等同于 npx ne-build init -t NyPhile/post_template

h5-build-cli's People

Watchers

James Cloos 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.