a css pre-compiler&agressive compressor
JavaScript CSS Other
Latest commit de38aa1 Aug 22, 2015 @army8735 Merge pull request #26 from denji/en_US
README.md (en_US)
Failed to load latest commit information.
build 0.12 Jun 1, 2015
src 0.12 Jun 1, 2015
tests 增强@import编译 fix #24 Jun 1, 2015
web 0.12 Jun 1, 2015
.coveralls.yml REPO TOKEN Mar 26, 2015
.gitattributes init May 30, 2013
.gitignore compressor Sep 27, 2014
.npmignore npmignore Apr 3, 2015
.travis.yml 继续迁移 Sep 9, 2014
Makefile timeout Oct 27, 2014
README.md README.md (en_US) Aug 23, 2015
gulpfile.js 变量记录增加值类型 #6 Nov 11, 2014
index.js 增强@import编译 fix #24 Jun 1, 2015


A css pre-compiler&radical-compressor

Relative to the less, the more the name mean, like css more than a little bit.

NPM version Build Status Coverage Status Dependency Status

more – Positioning of the ordinary products simplify the development of location, rather than a broad definition of CSS downstream framework for heavyweight functions. more design strict adherence to css standards, norms and expansion.

Currently provide the level of functionality, document splitting (actually it's the standard@import syntax), the levels of variables, automatically split strings, deep inheritance, a function of mixing, the rule of four; css radical compression. To not use these functions to the css code, The more the cognitive't change. more not normal css code.

Details (Chinese): https://github.com/army8735/more/wiki/文档

build directory for nodejs environment module module. web directory for writing compatible with AMD/CMD norms js document.

the core concept: the original browser standards no changes, editing, translation, code, strictly to maintain tuning consistency, the numbers don't change, document the relationship don't change to meet GoToDefine prerequisite.


npm install more-css



  • constructor(code:String = '') In need to pre-compile the code
  • parse(code:String = null, type:int = More.INDEPENDENT):String Pre-compiled code, it can be empty, otherwise it will cover the structure, function, where in the code; and type for address@import types
  • parseFile(file:String, type:int = More.INDEPENDENT):String Convert css files; type the address@import types
  • ast():Object Return, the syntax tree.
  • tokens():Array<Object> Return, the term module sequence.
  • imports():Array<String> Return,@import Document List.
  • vars(data:Object):Object Set/read variables hash.
  • styles(data:Object):Object Set/read the style hash.
  • fns(data:Object):Object Set/read methods hash.
  • path(file:String):String Set/read the document path
  • config(str:String):void Pre-compiled paragraph of css and its results as more of the image after pre-compile time global variables
  • configFile(file:String):void Ibid., in a file path
  • clean():void Empty set

Static attributes

  • parse(code:String = null, type:int = More.INDEPENDENT):String Quick a way to pre-compile, without the need for new steps
  • parseFile(file:String, type:int = More.INDEPENDENT):String Quick a way of pre-editing and translation of documents, without the need for new steps
  • suffix(str:String):String The authority to set/read a document name list, the default css
  • root(str:String):String The authority to set/read the local document root path
  • vars(data:Object):Object Global set/read variables hash.
  • styles(data:Object):Object Global set/read pattern Hashi
  • fns(data:Object):Object Global set/read methods hash.
  • path(file:String):String The authority to set/read the document path
  • config(str:String):void Pre-compiled paragraph of css and its results, as after the overall compilation time of a global variable
  • configFile(file:String):void Ibid., in a file path
  • clean():void Clear the Board to set
  • addKeyWord(kw:String/Array<String>):void Add unknown css attributes of key words to support analysis
  • compress(code:String, radical:Boolean = false):String Based on clean-css compress css code, radical indicates whether or not to use a radical of the security algorithm.
  • compress(code:String, options:Object = { processImport: false }, radical:Boolean = false):String Ibid., an increase of options Options to pass clean-css
  • map(data:Object/Function):Object/Function The authority to set/read the mapping table, use the@import of the name of the file as a matching replacement handle
  • INDEPENDENT:int = 0 Types, processing of import documents, rewrite the paper concludes with css
  • INCLUDE:int = 1 Types, processing of import documents, sharing role, don't rewrite document end
  • COMPLEX:int = 2 Types, processing of import documentation, segregation, don't rewrite document end



[MIT License]