0.0.15 • Published 10 years ago

es-css2js v0.0.15

Weekly downloads
2
License
MIT
Repository
github
Last release
10 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

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

11 years ago