SCION, a useful project initialization tool, has been upgraded!

  es6, javascript, node.js


1. What is SCION

SCIONIs a special tool for initializing projects. As long as you have a set of templates, you can passSCIONIt is convenient to initialize the project. At the same timeSCIONAllow you to add multiple sets of templates, greatly improving work efficiency.

AboutSCIONThe birth of, can see my this article:“Teach you to build a front-end scaffold tool from scratch”.

Project address: …

2. Installation

ThroughyarnOr ..npmGlobalInstallation and use:

yarn add scion-cli --global
npm install scion-cli -g

3. Usage

carry outscionCommand for detailed usage and instructions:

Usage: scion <command>
 add|a      Add a new template
 list|l     List all the templates
 init|i     Generate a new project
 delete|d   Delete a template
 -h, --help     output usage information
 -V, --version  output the version number

Note that if you are usingMacOSOr ..LinuxSystem, in executionaddAnddeleteWhen ordering, need to addsudoPrefix.

4. Orders

add | a

This command adds a template message to thetemplates.jsonDocuments for future supplySCIONUse.

$ scion add
 ?  Set the custom name of the template: my-first-template
 ?  Owner/name of the template: jrainlau/scion
 ?  Branch of the template: new
 │ Template Name     │ Owner/Name     │ Branch │
 │ my-first-template │ jrainlau/scion │ new    │
 ✔ New template has been added successfully!

ScionUseddownload-git-repoDownload the github project as a template.


list | l

Lists all saved templates.

$ scion list
 │ Template Name      │ Owner/Name     │ Branch │
 │ my-first-template  │ jrainlau/scion │ new    │
 │ my-second-template │ jrainlau/motto │ master │


init | i

After adding the template, initialize your project with this command.

$ scion init
 ?  Template name: my-first-template
 ?  Project name: my-project
 ?   Where to init the project?  ../
 ⠹ Downloading template  ...
 New project has been initialized successfully!

Is it very simple?


delete | d

Used to delete a template.

$ scion delete
 ?   Which template you want to delete?  my-second-template
 │ Template Name     │ Owner/Name     │ Branch │
 │ my-first-template │ jrainlau/scion │ new    │
 ✔ Template has been deleted successfully


5. Understand what the template is

Simply put, a “template” is a project stored in github or gitlab. This project has a complete directory structure, and projects using it as a template will be expanded based on the current directory.

6. Upgrade Information

  • Usecli-tableOptimize the output of the template.

  • UseinquirerRealize the command line interaction function.

  • Usedownload-git-repoTo download the template, to avoid throughgit cloneWill put.gitThe folder was also downloaded.

  • Fix problems that cannot be used across platforms (MacOS, Windows).