`npm init with <repo-name>` base code
Last updated 9 months ago by allenkim .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @toronto/create-with 
SYNC missed versions from official npm registry.


Base code for npm-init with

  • This repo. is the base code of npm init with or npx create-with.


  1. You can create your own npm-init template with two files with;
  • template directory
  • npm-init.json
  1. Then, push to your github repository. $ git push

  2. Then, you are ready. $ npm init with myusername/my-template

If you want it without your user name, e.g., npm init with my-template, it has to be under https://github.com/npm-init. Thus, pleae create an issue for it.

Examples of npm-init.json

  "prompts": {
    "name": {
      "type": "string",
      "required": true,
      "message": "Project Name"
    "description": {
      "type": "input",
      "required": true,
      "message": "Project Description"
  "completeMessage": "To get started:\n  cd {{name}}\n  npm install\n  npm start"

Examples of template directory

template directory can have any file including any directory. If your file contents to be dynamic, please build it as a mustache template

e.g. package.json

  "name": "{{name}}",
  "description": "{{description}}",
  "version": "0.0.0",
  "main": "dist/{{name}}.umd.js

MIT Licensed

Current Tags

  • 0.8.2                                ...           latest (9 months ago)

1 Versions

  • 0.8.2                                ...           9 months ago
Maintainers (1)
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 3
Dependencies (4)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |