Skip to content

Commit 873cf84

Browse files
committed
add README
1 parent cc3b9b3 commit 873cf84

File tree

2 files changed

+117
-0
lines changed

2 files changed

+117
-0
lines changed

README.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
![Scion Logo](./logo.png)
2+
3+
# SCION
4+
A light tool to generate projects in an easy way.
5+
6+
# Installation
7+
```
8+
npm install scion-cli -g
9+
```
10+
or
11+
```
12+
git clone https://github.com/jrainlau/scion.git
13+
14+
cd scion && npm install
15+
16+
npm link
17+
```
18+
19+
# Usage
20+
Open your terminal and type `scion` or `scion -h` , you'll see the help infomation below:
21+
```
22+
Usage: scion <command>
23+
24+
25+
Commands:
26+
27+
add|a Add a new template
28+
list|l List all the templates
29+
init|i Generate a new project
30+
delete|d Delete a template
31+
32+
Options:
33+
34+
-h, --help output usage information
35+
-V, --version output the version number
36+
```
37+
38+
> Note that if you are using `MacOS`, `sudo` was required while using commands `add` and `delete`.
39+
40+
# Commands
41+
### add | a
42+
This command would help you to add a new template to the `templates.json`, which will be used by `Scion` to generate projects.
43+
```
44+
$ scion add
45+
46+
? Set the custom name of the template: my-first-template
47+
? Owner/name of the template: jrainlau/scion
48+
? Branch of the template: new
49+
┌───────────────────┬────────────────┬────────┐
50+
│ Template Name │ Owner/Name │ Branch │
51+
├───────────────────┼────────────────┼────────┤
52+
│ my-first-template │ jrainlau/scion │ new │
53+
└───────────────────┴────────────────┴────────┘
54+
✔ New template has been added successfully!
55+
```
56+
`Scion` use [download-git-repo](https://github.com/flipxfx/download-git-repo) to down load git repos. After answering 3 questions, you'll add a new template to `Scion`.
57+
58+
### list | l
59+
It shows you the templates list.
60+
```
61+
$ scion list
62+
63+
┌────────────────────┬────────────────┬────────┐
64+
│ Template Name │ Owner/Name │ Branch │
65+
├────────────────────┼────────────────┼────────┤
66+
│ my-first-template │ jrainlau/scion │ new │
67+
├────────────────────┼────────────────┼────────┤
68+
│ my-second-template │ jrainlau/motto │ master │
69+
└────────────────────┴────────────────┴────────┘
70+
```
71+
72+
### init | i
73+
After adding new templates, you could use this command to generate your own project by choosing template.
74+
```
75+
$ scion init
76+
77+
? Template name: my-first-template
78+
? Project name: my-project
79+
? Where to init the project? ../
80+
⠹ Downloading template...
81+
82+
New project has been initialized successfully!
83+
```
84+
85+
It's easy, right?
86+
87+
### delete | d
88+
To delete a template, you could use this command:
89+
```
90+
$ scion delete
91+
92+
? Which template you want to delete? my-second-template
93+
┌───────────────────┬────────────────┬────────┐
94+
│ Template Name │ Owner/Name │ Branch │
95+
├───────────────────┼────────────────┼────────┤
96+
│ my-first-template │ jrainlau/scion │ new │
97+
└───────────────────┴────────────────┴────────┘
98+
✔ Template has been deleted successfully
99+
```
100+
101+
# Template
102+
The most important part of Scion is `template`. All templates' infomation were list in the `templates.json`.
103+
A template means a project sample, which has a simple or complex file structure.
104+
105+
You can create your own templates repository, and push your templates in different branches. All you need to do then is to add the templates into Scion's `templates.json`.
106+
107+
# License
108+
MIT.
109+
110+
111+
112+
113+
114+
115+
116+
117+

logo.png

24.6 KB
Loading

0 commit comments

Comments
 (0)