generator-spm

A SPM Project generator for Yeoman.

generator-spm

A SPM Project generator for Yeoman.

$ npm install yo -g
$ npm install generator-spm -g

Init project

$ yo spm

If choosing complex Project Type, you can add mod and page seperatly.

# add mod
$ yo spm:mod foo
 
# add page
$ yo spm:page bar

Run

$ npm install spm-server -g
$ spm-server
  • relative
  • all
  • standalone

Notice: seajs will be included in mode relative and all.

Simple

- index.js
- index.css
- index.html
- package.json

Complex

+ mods
    + modA
        - index.js
        - index.css
    + modB
        - index.js
+ pages
    - pageA.html
    - pageA.js
    - pageA.css
- package.json