Config

Table of Contents

Status: API design

Configuration file is located at ~/.spm/spmrc in ini format:

$ spm config user.username lepture

user

The [user] section contains information of the current user.

[user]
username =

; gruntfile can be a local path or an online url
; gruntfile is used for task based commands
gruntfile =

install

The [install] section contains settings for installation.

[install]
; when spm install a module, should we keep the debugfiles
debugfile = true

; spm install path format, it should be end with {{filename}}
format = {{family}}/{{name}}/{{version}}/{{filename}}

source

Define or add your own source center with [source] section.

The default source is:

[source:default]
url = https://spmjs.org

You can add another source:

[source:alipay]
url = http://spmjs.alipay.com

When you info, search, login, install, publish, you can set the source in your command line:

$ spm info jquery -s alipay

If you are behide a firewall, you need proxy:

[source:default]
proxy = username:password@proxy.server:port
Fork me on GitHub