1.0.2 • Published 7 years ago

karma-ini2js-preprocessor v1.0.2

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

karma-ini2js-preprocessor Build Status

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.