0.0.2 • Published 7 years ago

in-css v0.0.2

Weekly downloads
6
License
-
Repository
-
Last release
7 years ago

in-css

a css modular management and loader for web-workflow.

use

1. install

npm install --save in-css

or

bower install --save in-css

or in use it directly in browser

<script src="path/to/in-css.js"></script>

2. config

InCss.config({
    urlArgs: '',
    baseUrl : '',
    jsBaseUrl: '',
    paths: {
        'module': 'path/to/module'
    },
    deps: {
        'module': 'otherModule',
        'module': [
            'otherModule', 'otherModule'
        ]
    }
});
  • urlArgs: if set, will be add to every link href by ?+urlArgs
  • baseUrl: base url of all css resources
  • jsBaseUrl: base url of all js resources
  • paths: module path declaration
  • deps: modules dependencies

3. use

  1. directly use
InCss.use('module1', 'module2', 'module3');
  1. make a module, and then load it
// in jsBaseUrl/path/to/module.js
InCss.use('module1', 'module2', 'module3');

// load it in other file
InCss.load('path/to/module');