Permalink
Browse files

lots of documentation

  • Loading branch information...
1 parent b0ff73e commit 79c8d2de85e271183beadbb30f0716ae6d3ce8d9 Hsiaoming Yang committed Mar 20, 2013
View
@@ -352,3 +352,6 @@ a.title-permalink:hover {
padding-bottom: 10px;
}
}
+.center {
+ text-align: center;
+}
View
@@ -0,0 +1,12 @@
+{%- extends "layout.html" -%}
+{%- block title %}{{post.title}}{% endblock %}
+
+{%- block document %}
+<div class="center">
+ <h1 class="entry-title">{{post.title}}</h1>
+ {%- if post.description %}
+ <blockquote class="entry-description">{{post.description}}</blockquote>
+ {%- endif %}
+ <div class="entry-content">{{post.html|linkfix}}</div>
+</div>
+{% endblock -%}
View
@@ -0,0 +1,14 @@
+# grunt
+
+- pubdate: 2013-03-20
+- index: 10
+
+Hack the grunt.
+
+-----
+
+
+## invokeTask
+
+
+## loadGlobalTasks
View
@@ -1,11 +0,0 @@
-# iduri
-
-- pubdate: 2013-01-24
-
------
-
-```js
-var iduri = require('spm').sdk.iduri
-```
-
-## iduri.resovle
View
@@ -1,5 +1,8 @@
# spm
+- pubdate: 2013-03-20
+- index: 0
+
The API of spm.
-------
@@ -14,7 +17,7 @@ var spm = require('spm')
The version of spm.
-## spm.log
+## spm.log(category, message)
Always use `spm.log` in your program, never use `console`.
@@ -33,21 +36,34 @@ Interact with `~/.spm/spmrc` config file.
- spm.config.remove
- spm.config.show
-## spm.publish
+
+## spm.install(options)
+
+Install packages from spmjs.org.
+
+## spm.info(options)
+
+Get information of a module from spmjs.org.
+
+## spm.search(options)
+
+Search modules from spmjs.org.
+
+## spm.publish(options)
Publish a package to spmjs.org.
-## spm.install
+## spm.unpublish(options)
-Install packages from spmjs.org.
+Unpublish a package from spmjs.org.
## spm.sdk
Low level API:
-- `spm.sdk.spmrc`
- [`spm.sdk.ast`](https://github.com/spmjs/cmd-util/blob/master/docs/ast.md)
-- `spm.sdk.iduri`
-- `spm.sdk.yuan`
-- `spm.sdk.grunt`
+- [`spm.sdk.iduri`](https://github.com/spmjs/cmd-util/blob/master/docs/iduri.md)
+- [`spm.sdk.spmrc`](https://github.com/spmjs/spmrc)
+- [`spm.sdk.yuan`](./yuan.md)
+- [`spm.sdk.grunt`](./grunt.md)
View
@@ -1,66 +0,0 @@
-# spmrc
-
-- pubdate: 2013-01-28
-
------
-
-```js
-var spmrc = require('spm').sdk.spmrc
-```
-
-spmrc is located at `~/.spm/spmrc` in ini format. An example:
-
-```
-[user]
-username = spm
-
-[template:arale]
-url = http://aralejs.org/hello
-```
-
-
-## spmrc.get
-
-Get information in spmrc:
-
-```js
-spmrc.get('user')
-// {username: 'spm'}
-
-spmrc.get('user.username')
-// spm
-```
-
-## spmrc.set
-
-Set value in a section:
-
-```js
-spmrc.set('user.username', 'spmjs')
-```
-
-## spmrc.config
-
-A mix of get and set:
-
-```js
-spmrc.config('user.username') // equal spmrc.get
-spmrc.config('user.username', 'spm') // equal spmrc.set
-```
-
-## spmrc.parse
-
-Parse an ini file to object. Default file is `~/.spm/spmrc`.
-
-```js
-spmrc.parse(file)
-// an object
-```
-
-## spmrc.write
-
-Write object to `~/.spm/spmrc`.
-
-```js
-spmrc.write(obj)
-```
View
@@ -1,8 +1,9 @@
# yuan
-- pubdate: 2013-01-23
+- pubdate: 2013-03-20
+- index: 5
-communication with yuan.
+communication with spmjs.org.
-----
@@ -12,25 +13,30 @@ var yuan = require('spm').sdk.yuan
This is a lower API, for higher API, use `spm.publish` or `spm.install`.
-## Login
+## login
-```js
-yuan({username: 'spm', password: 'spm'})
- .login(function(err, response, body) {
- console.log(body.data);
- })
-```
+Login your account.
-## Publish
+## register
-```js
-yuan({
- auth: 'auth code ....',
- distfile: './hello.tgz',
- root: 'spmjs',
- name: 'spm',
- version': '1.0.0'
-}).publish(function(err, response, body) {
- console.log(body);
-});
-```
+Register an account.
+
+## info
+
+Get information of a module.
+
+## Search
+
+Search modules.
+
+## publish
+
+Publish a module.
+
+## unpublish
+
+Unpublish a module.
+
+## upload
+
+Upload docs.
View
Deleted file not rendered
View
@@ -1,6 +1,6 @@
# spm
-- pubdate: 2013-02-21
+- pubdate: 2013-03-20
- index: 0
spm is a static package manager, it's **not a build tools**.
@@ -73,8 +73,6 @@ or:
$ spm help
-![spm help](../assets/spm-help.png)
-
You can get more help information of a sub-command by:
$ spm build -h
@@ -118,9 +116,7 @@ The `package.json` (more information on [package](./package.md) section) is as s
"alias": {
"jquery": "jquery/jquery/1.7.2/jquery"
},
- "output": {
- "hello.js": ["hello.js"]
- }
+ "output": ["hello.js"]
}
}
```
View
@@ -42,12 +42,16 @@ Here is an example of `package.json`:
"ie": [6, 7],
"firefox": ["13"],
"chrome": [20]
- },
- "platforms": ["ie/6", "chrome/20", "firefox"]
+ }
}
}
```
+Platforms can be an array:
+
+ "platforms": ["ie/6", "chrome/20", "firefox"]
+
+
## family
This is the account name on http://spmjs.org.
@@ -174,7 +178,7 @@ You should define your output as:
}
```
-## merge from old package.json
+## Old Time
1. `root` is deprecated, use `family` instead.
2. `dependencies` is deprecated, use `spm.alias` instead.
View
@@ -1,11 +1,39 @@
# Plugin
-- pubdate: 2013-02-25
+- pubdate: 2013-03-20
+- index: 10
----------
-## Register
+Plugins are commands that can be excuted(indexed) by `spm`.
+
+Lets try:
+
+```
+$ npm install spm-init -g
+```
+
+`spm-init` is a spm plugin, when you excute `spm -h`, you will find that spm has a plugin commands called `init`.
+
+Create a plugin is simple with `spm-init`. Get the template:
+
+```
+$ git clone git://github.com/spmjs/template-spmplugin.git ~/.spm/init/spmplugin
+```
+
+And now, you can create a plugin:
+
+```
+$ spm init spmplugin
+```
+
+
+## The background
+
+Learn the background of spm plugins.
+
+### Install
Thanks for npm's `postinstall` policy.
@@ -46,7 +74,7 @@ You will see init on spm now:
$ spm help
-## Uninstall
+### Uninstall
Add in your `package.json`:
@@ -70,3 +98,8 @@ spm.plugin.uninstall('init')
Make this script excutable by:
$ chmod +x scripts/postinstall.js
+
+
+## Plugins
+
+You can find some offical plugins on [github](https://github.com/spmjs).
View
@@ -1,3 +1,7 @@
# SPM
+- template: home.html
+
--------
+
+<iframe src="http://ascii.io/a/2533/raw" frameborder="0" width="566" height="646"></iframe>
View
@@ -1,3 +0,0 @@
-# SPM Plugin
-
--------
Oops, something went wrong.

0 comments on commit 79c8d2d

Please sign in to comment.