GithubHelp home page GithubHelp logo

flclover-init's Introduction

flclover-init

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Init flclover app helper tools.

Install

$ npm i flclover-init -g
$ flclover-init -h

Create a simple type application

$ flclover-init --type simple [dest]

Or select a boilerplate by yourself

$ flclover-init dest
? Please select a boilerplate type (Use arrow keys)
❯ simple - Simple egg app
  plugin - egg plugin

Command

Usage: flclover-init [dir] --type=simple

Options:
  --type          boilerplate type                                                [string]
  --dir           target directory                                                [string]
  --force, -f     force to override directory                                     [boolean]
  --template      local path to boilerplate                                       [string]
  --package       boilerplate package name                                        [string]
  --registry, -r  npm registry, support china/npm/custom, default to auto detect  [string]
  --silent        don't ask, just use default value                               [boolean]
  --version       Show version number                                             [boolean]
  -h, --help      Show help                                                       [boolean]

Custom a boilerplate

We use npm package to manager boilerplate, you can follow this steps:

  • Create a new repo like egg-boilerplate-plugin

  • Put all files under boilerplate dir

  • Use egg-init --template=PATH to check

  • index.js can define variables which can be useed on template, like {{name}}, but \{{name}} will ignore.

    module.exports = {
      name: {
        desc: 'plugin-name',
      },
      description: {
        desc: 'my best plugin',
      },
      author: {
        desc: 'author',
        default: 'eggjs team'
      },
    };
  • Write unit test, see npm scripts at egg-boilerplate-simple

  • Add your package name to egg-init-config's package.json config.boilerplate property

  • Publish your package to npm

License

MIT

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.