node package manager

uicompile

A compiler for web-based user interfaces

uicompile

A compiler for web-based user interface.

Install

$ npm install -g uicompile

Start a server

$ uicompile server

To start with port option

$ uicompile server --port 3456

Compile your app

$ uicompile compile

Configurations

You can configure uicompile with the require('uicompile')-able module in the root directory of your project.

  • projectRoot (Not configurable) A path to your project.
  • src (default: "src") -- A relative path from projectRoot to the directory contains source codes.
  • dest (default: "release") -- A relative path from projectRoot to the directory for compiled codes.
  • html (default: ["."]) -- An array of relative paths from src to the directory for files to generate .html files.
  • static (default: ["static"]) -- An array of relative paths from src to the directory for static files.
  • css (default: ["css"]) -- An array of relative paths from src to the directory for files to generate .css files.
  • js (default: ["js"]) -- An array of relative paths from src to the directory for .js files.
  • translator (default: "js/g11n/translate.js") -- relative path from src to the translation module.
  • translations (default: translations) -- relative path from src to the directory for dictionary files.
  • langs (default: ["en"]) -- An array of language keys.
  • port (default: 4000) -- A port number the uicompile server listens.
  • middleware (default: undefined) -- A function called on the server received any requests.
  • uglifyjs (default: undefined) -- An object passed to UglifyJS2.
  • browserify (default: undefined) -- An object passed to browserify.
  • autoPrefixer (default: undefined) -- An object passed to Autoprefixer.
  • cleanCss (default: undefined) -- An object passed to clean-css.
  • j0 (default: false) -- A boolean flag to use the j0 library. If it is set to true, the translator will be compatible with the library.