karma-yate-preprocessor

0.1.1 • Public • Published

karma-yate-preprocessor

Build Status

Preprocessor to build yate template through yate on the fly.

Installation

The easiest way is to keep karma-yate-preprocessor as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-yate-preprocessor": "~0.1"
  }
}

You can simple do it by:

npm install karma-yate-preprocessor --save-dev

Configuration

Following code shows the default configuration...

// karma.conf.js
module.exports = function(config) {
    config.set({
        frameworks: ['yate'],
        preprocessors: {
            '**/*.yate': ['yate']
        }
    });
};

Example

describe('yate', function() {
    it('should compile yate template', function() {
        expect(yr.run('main', {})).to.be.eql('Hello World!');
    });
 
    it('should compile yate template with mode', function() {
        expect(yr.run('main', {}, "test")).to.be.eql('Hello World From Mode!');
    });
});

Playground

http://maksimr.github.io/yate/

Readme

Keywords

none

Package Sidebar

Install

npm i karma-yate-preprocessor

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • maksimr