博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
好用的项目初始化工具SCION升级啦!
阅读量:7104 次
发布时间:2019-06-28

本文共 2193 字,大约阅读时间需要 7 分钟。

clipboard.png

1、什么是SCION

SCION是一个专门用于初始化项目的工具。只要你有一套模板,就能通过SCION方便地把项目初始化出来。同时SCION允许你添加多套模板,大大提升了工作效率。

关于SCION的诞生,可以查看我的这篇文章:。

项目地址:

2、安装

可以通过yarn或者npm全局安装使用:

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

3、使用方式

执行scion命令,获取详细使用方式及说明:

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

注意,如果你正在使用MacOS或者Linux系统,在执行adddelete命令的时候,需要加上sudo前缀。

4、命令

add | a

这条命令会添加一个模板信息到templates.json文件内,以便将来供SCION使用。

$ 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!

Scion 使用了 去下载位于github的项目作为模板。

clipboard.png

list | l

列出所有已保存的模板。

$ scion list┌────────────────────┬────────────────┬────────┐│ Template Name      │ Owner/Name     │ Branch │├────────────────────┼────────────────┼────────┤│ my-first-template  │ jrainlau/scion │ new    │├────────────────────┼────────────────┼────────┤│ my-second-template │ jrainlau/motto │ master │└────────────────────┴────────────────┴────────┘

clipboard.png

init | i

在添加了模板以后,通过这条命令初始化你的项目。

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

是不是很简单呢?

clipboard.png

delete | d

用于删除一个模板。

$ 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

clipboard.png

5、明白模板是什么

简单来说,一个“模板”就是一个保存在github或者gitlab项目,这个项目有着完整的目录结构,以其为模板的项目都会在当前的目录基础上进行扩展。

6、升级信息

  • 使用优化模板的输出。

  • 使用实现命令行交互功能。

  • 使用去下载模板,避免了通过git clone会把.git文件夹也下载下来的问题。

  • 修复无法跨平台(MacOS, Windows)使用的问题。

转载地址:http://kyuhl.baihongyu.com/

你可能感兴趣的文章
关闭VMwareWorkStation的嘀嘀声音(启动或重启Linux虚拟机时
查看>>
ppp协议LCP数据包
查看>>
apache启动报错
查看>>
ERP为何在国内怪象横生?
查看>>
安卓(android)4.0以后播放flash问题
查看>>
机器学习的特征究竟是什么
查看>>
Lync Server 2013 _ 启用Lync账户进行基本功能测试
查看>>
mysql表的导入与导出
查看>>
VMware (威睿) 虚拟化产品简介
查看>>
Zookeeper 命令行基本操作
查看>>
OracleLinux5.8配置多路径DM-multipath
查看>>
Mysql多实例多进程方案实践说明
查看>>
kill掉tomcat进程并重启服务
查看>>
关于raid
查看>>
JQuery selector
查看>>
实验一 vlan的创建
查看>>
懒加载
查看>>
cron表达式
查看>>
第二周编程总结
查看>>
【高斯消元】[JSOI2008]球形空间产生器sphere
查看>>