0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
svelte/test/setup.js
2017-06-02 22:04:36 -04:00

10 lines
230 B
JavaScript

const nodeVersionMatch = /^v(\d)/.exec(process.version);
const legacy = +nodeVersionMatch[1] < 6;
const babelrc = require("../package.json").babel;
if (legacy) {
require("babel-register")(babelrc);
} else {
require("reify");
}