karma-ini2js-preprocessor

1.0.2 • Public • Published

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.

Package Sidebar

Install

npm i karma-ini2js-preprocessor

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • bwells