Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

devsigners/SugarDevelop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SugarDevelop

Sugar Develop is a user-friendly static pages develop environment based on Koa and Handlebars.

Dependency Status devDependency Status

Targets

  • Enhance handlebars template, like PHP/Java template as much as possible.
  • Standard workflow, few config, and pure JavaScript env without other dependencies.
  • Components develop.

Hope the develop environment will make static page development much easier.

Features

  • Enhanced handlebars template: support yaml header, support data file, support layout specified in template and so on.
  • Components.
  • Koa server and some useful npm scripts. Such as build totally static html pages from templates, build components map.

Workflow

The simplest way to run is exec npm install && npm run build && npm start, then view http://0.0.0.0:3000 for your static pages.

Develop dir is front/src:

front/src
    ├── group                  # project group
    │   ├── test               # sub project
    │   │   ├── layouttt       # custom layout
    │   │   ├── myhelper       # custom helper
    │   │   ├── mypartial      # custom partial
    │   │   └── subdir         # normal sub dir
    │   └── test2              # sub project
    ├── index                  # project
    └── shared                 # shared resources
        ├── data               # data
        ├── helpers            # handlebars helpers
        ├── layouts            # handlebars layouts
        ├── partials           # handlebars partials
        │   └── components     # partials/components
        └── static             # static resources
            ├── images
            ├── scripts
            └── styles

We only need to

  1. mkdir dir at front/src as our project root dir.
  2. write config file (optional, yaml format).
  3. And then write your page with handlebars template or just static html.
  4. Wow, just view http://0.0.0.0:3000/[group/]project/page.html!

License

MIT