spmjs / spm-init Goto Github PK
View Code? Open in Web Editor NEWspm init template plugin
spm init template plugin
来自 #5
C:\Users\popomore\tmp>grunt-init C:\Users\popomore\.grunt-init\arale
Running "init:C:\Users\popomore\.grunt-init\arale" (init) task
Loading "C" init template...ERROR
是 grunt-init
的问题 gruntjs/grunt-init#46,看看能否用其他方式修复
现在只是获取目录名,需要检测下 template.js
$spm init
Choosing "cmd" as defaute template.
spm-init --install aralejs/template-arale
支持 github
spm-init --upgrade arale
如果不是 git 的则忽略
spm-init --update
spm-init --list
大多数包管理工具的 init 都只有初始化包这一个功能,调用方式如下:
$ npm init
$ git init
$ bower init
而 spm init 的调用方式非常奇怪,需要手动指定一个 theme。
$ spm init arale
目前的 theme 有 arale
、alice
、cmd
、site
、'spmplugin',其中 arale
和 alice
是常用的,其他几乎没人会用到。
早些时候由于这种区别,我从 arale 主题的基础上修改新建了一个 theme 叫 cmd,作为 spm init 的默认主题。也就是说用户可以直接:
$ spm init
就可以初始化一个可以发布到 spmjs.org 的模块
(这点很重要!)了。
想了想,认为 spm init
还是应该像其他工具看齐,只保留一个默认模块,不再传递主题,这样比较合适。
梳理了下现有的主题:
所以综合上述,可以只保留一个主题作为整个 spmjs.org 生态圈的默认模块模板,用于保存源码、构建、发布、文档部署。仓库可以建立在 spmjs/template 下,在现有的 arale 基础上修改即可。
用户可以直接使用 spm init
来建立所有的模块,并且可以很方便的发布文档到 spmjs.org 。
不指定 spm init 的类型时,默认指向它。
$ spm init
目前的 Arale 模块基本满足这个需求。
Arale 模块本身没有明确的特点,就是 CMD 模块。
[?] Do you need to make any changes to the above before continuing? (y/N) y
最后一个感觉反人类,直觉认为 y 是不需要修改,完成。而 N 才是需要修改。
另外,其实这个选项没什么必要,因为到这里了已经大部分完成,在这里修改会要全部再来一遍。建议最后一行提示需要修改请编辑 package.json
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.