Socket
Book a DemoInstallSign in
Socket

karma-ember-rocks-traceur

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-ember-rocks-traceur

A Karma plugin. Compile ES6 script on the fly using traceur-compiler for ember-rocks

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

karma-ember-rocks-traceur

Preprocessor to compile ES6 JavaScript on the fly using traceur-compiler for Ember Rocks.

Installation

Install karma-ember-rocks-traceur as a devDependency for your project:

npm install karma --save-dev
npm install karma-ember-rocks-traceur --save-dev

Configuration

The following example configuration shows some of the required settings for enabling Traceur support. Traceur compiles source files into either AMD or Node.js modules. Since Karma is testing in a browser you need to configure RequireJS.

// karma.conf.js
module.exports = function(config) {
  config.set({
    // at a minimum need requirejs + emberRocksTraceur
    frameworks: ['mocha', 'requirejs', 'emberRocksTraceur'],

    preprocessors: {
      'src/**/*.es6': ['emberRocksTraceur']
    },

    files: [
      {pattern: 'src/**/*.es6', included: false},
      {pattern: 'test/**/*Spec.es6', included: false},
      'test/test-main.js'
    ],

    // default configuration, not required
    traceurPreprocessor: {
      // options passed to the traceur-compiler
      // see traceur --longhelp for list of options
      options: {
        sourceMaps: false,
        modules: 'amd'
      }
    }
  });
};

Supported Karma Launchers

Traceur is an ES6 to ES5 transpiler, and as such, does not support older browsers without ES5 support like IE8 or PhantomJS. (This is the case for any Traceur-compiled code, not just that produced by karma-ember-rocks-traceur.)

For more information on Karma see the homepage.

Karma Ember Rocks Traceur was based on Karma Ember Rocks Traceur to be using the ember-rocks;

Keywords

karma-plugin

FAQs

Package last updated on 22 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.