in-css
v0.0.2
Published
a css modular management and loader.
Downloads
6
Readme
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
- directly use
InCss.use('module1', 'module2', 'module3');
- 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');