karma-ini2js-preprocessor
v1.0.2
Published
Compiles INI files to JS source on the fly.
Downloads
10
Maintainers
Readme
karma-ini2js-preprocessor
preprocessor for converting INI files to JS test fixtures
Installation
The easiest way is to keep karma-ini2js-preprocessor
as a devDependency in
your package.json
.
{
"devDependencies": {
"karma": "~0.10",
"karma-ini2js-preprocessor": "~0.1"
}
}
You can simply do it by:
npm install karma-ini2js-preprocessor --save-dev
How does it work ?
This preprocessor converts INI files into JS objects and publishes them in the
global window.__ini__
so that they may be used for tests.
ex: config.ini
[config]
debug = true
address = http://altalang.com/
becomes
window.__ini__['config.ini'] = {
config: {
debug: true,
address: 'http://altalang.com/'
}
}
For more information on Karma see the homepage.