Getting Started

May 29, 2015 ยท View on GitHub


Introduction

spm is a powerful and integrated static package manager designed for browser-side solutions including JavaScript, CSS and template.

All packages in spmjs.io should be written in CommonJS, having a complete lifecycle management via spm, including the following features:

  • Initialization
  • Dependencies Management
  • Local Development
  • Publishing on spmjs.io
  • Test Runner
  • Documentation Site Generator and Host
  • Build

spmjs.io is packages management service for spm. You can browse for packages you need, or publish your package here.

Installation

$ npm install spm -g

Basic Usage

Init a spm package.

$ mkdir example
$ cd example
$ spm init

Install dependencies.

$ spm install jquery --save
$ spm install moment@2.6.0 --save

Publish the package to spmjs.io

$ spm publish

You should run spm login first to get permission. The authkey will be displayed at http://spmjs.io/account after signing in.

Add .spmignore for ignoring useless files to avoid oversize of package.

Contribution

Anyone is welcome to contribute by the following ways.