0.0.15 • Published 9 years ago

es-css2js v0.0.15

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

CSS2JS - Build Standalone UI Modules

CSS2JS could help you build standalone UI modules without referencing addtional CSS file. You can compile your CSS to a normal JavaScript file, a RequireJS module, an AngularJS module or any other custom JavaScript module.

Install

npm install es-css2js -g

Example usage

From command-line:

css2js srouce1.css source2.css source3.css ... sourceN.css dest.js

The file path will be related to your current executing path.

From node

#!/usr/bin/env node

var css2js = require('es-css2js');  
css2js({
  path: "/basepath",  //base path of source file and destination file, defaults to "/"
  src:  ["a.css", "b.css"], //source file
  dest: "dest.js" // destination file,
  wrapper: "requirejs" // Your module wrapper. Defaults to a function closure. It also cloud be a function like the following sample:
});

function customWrapper(content){
	return "hello!!![" + content + "]hello!!!";
}
0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

10 years ago