style-pot

0.0.22 • Public • Published

Style.Pot

In terminal

Installation

$ npm i -g style-pot

Usage

  1. Generate doc jsons

    $ style-pot generate --src SRC_PATH --out DEST_PATH [--base BASE_PATH_OF_SRC]
    
  2. Start doc server

    $ style-pot serve --json DOC_JSON_PATH \
        [--port PORT] \
        [--deps DEPENDENCY_STYLE_FILE_PATHs] \
        [--static STATIC_FILE_PATHs] \
        [--proxy-map PROXY_MAP_JSON]
        --
    $ open http://localhost:<PORT>
    
    • PORT: port number to be listened
    • DEPENDENCY_STYLE_FILE_PATHs: file paths for preloaded assets
    • STATIC_FILE_PATHs: file paths to be served via /
    • (experimental) PROXY_MAP_JSON: JSON string represent a map for pathnames to be proxied and the upstream host URL such as {"/something/to/be/proxied":"http://example.com"}

In Node.js

Installation

$ npm i style-pot

Usage

  1. Generate doc jsons

    import StylePot from 'style-pot';
    
    StylePot.generateStyleJSONs({
      src: SRC_PATH,
      out: DEST_PATH,
      base: BASE_PATH_OR_SRC,
    });
    
  2. Start doc server

    import StylePot from 'style-pot';
    
    StylePot.serve({
      json: DOC_JSON_PATH,
      port: PORT,
      static: STATIC_FILE_PATHs,
      deps: DEPENDENCY_STYLE_FILE_PATHs,
      proxyMap: PROXY_MAP,
    });
    

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.22
    2
    • latest

Version History

Package Sidebar

Install

npm i style-pot

Weekly Downloads

2

Version

0.0.22

License

MIT

Last publish

Collaborators

  • mixi-inc
  • mozisan
  • orgachem