Giter Club home page Giter Club logo

make-package's Introduction

NPM version NPM downloads

介绍

make-package 是可以生成和编辑 package.json 的命令行小工具,可以对其配置通用模板,后期你所创建的包都可以使用这个模板,避免了不必要的重复劳动。

安装

npm

npm i -g make-package

yarn

yarn global add make-package

使用

设置模板

mpkg temp set version 1.0.0
mpkg temp set author [email protected]
mpkg temp set license MIT
mpkg temp set files lib -a
mpkg temp set repository.type git

初始化

mpkg init packageName

生成package.json

{
  "name": "packageName",
  "version": "1.0.0",
  "license": "MIT",
  "author": "[email protected]",
  "files": [
    "lib"
  ],
  "repository": {
    "type": "git"
  }
}

增加字段

mpkg set description balabala...
mpkg set repository.url https://github.com/yinjiazeng/make-package.git
mpkg set files.1 pkg

更新package.json

{
  "name": "packageName",
  "version": "1.0.0",
  "license": "MIT",
  "author": "[email protected]",
  "description": "balabala...",
  "files": [
    "lib",
    "pkg"
  ],
  "repository": {
    "type": "git",
    "url": "https://github.com/yinjiazeng/make-package.git"
  }
}

删除字段

mpkg del files.0
mpkg del repository.url
mpkg del description

更新package.json

{
  "name": "packageName",
  "version": "1.0.0",
  "license": "MIT",
  "author": "[email protected]",
  "files": [
    "pkg"
  ],
  "repository": {
    "type": "git"
  }
}

清除字段

mpkg clear

更新package.json

{}

许可证

MIT

捐赠

如果觉得 make-package 对您有帮助,或者想请作者喝一杯咖啡的话,欢迎给我捐赠

make-package's People

Contributors

yinjiazeng avatar

Watchers

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