Skip to content

JavaScript Setup

James Richford edited this page Jan 18, 2017 · 3 revisions

Use with JavaScript

Good news everybody, we're on NPM.

npm install alsatian

Alsatian's power is partly in the use of decorators which currently has no official Babel support for decorators (see babel issue) but you can use a plugin!

Add transform-decorators-legacy plugin

npm install babel-plugin-transform-decorators-legacy --save-dev

Then update your .babelrc

{
  ...
  "plugins": ["transform-decorators-legacy"]
  ...
}

You should now be able to use Alsatian decorators as in all the examples, Hooray!