Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

altalang/karma-ini2js-preprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Compiles INI files to JS source on the fly

Resources

License

Stars

Watchers

Forks

Packages

No packages published