Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

andyearnshaw/intern-systemjs-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

intern-systemjs-loader

This package provides a wrapper around the SystemJS module loader so that it can be used with Intern. It hooks the loader to provide some of Intern/Dojo's hybrid plugin-modules. Transpilers such as Babel or TypeScript can be configured to enable writing tests and source files without requiring a pre-compile step.

This loader is a work-in-progress and not all reporters/configuration options have been thoroughly tested.

Installing and configuration

Install with NPM:

npm install intern-systemjs-loader

Then, modify your Intern configuration to use the loader:

    loaders: {
      'host-node': require.nodeRequire && require.nodeRequire.resolve('intern-systemjs-loader'),
      'host-browser': 'node_modules/intern-systemjs-loader/main.js'
    }

Using Babel to transform ES modules and JSX code

Simply npm install systemjs-plugin-babel, then specify the loaderOptions configuration in your intern.js file:

    loaderOptions: {
        transpiler: 'plugin-babel',
    },

    excludeInstrumentation: true

Disabling instrumentation of any ES modules is necessary as Istanbul fails hard if it tries to cover them.

Several modules, including plugin-babel, react and fbjs are pre-mapped to their respective locations within node_modules. This is done for convenience, they can be overridden using the map and packages configuration options.

About

Use SystemJS as the loader for Intern 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published