UNPKG

@ima/cli

Version:

IMA.js CLI tool to build, develop and work with IMA.js applications.

16 lines (15 loc) 494 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const preprocess_1 = require("preprocess"); /** * Runs source through https://www.npmjs.com/package/preprocess package. * * @param {string} source Module source. * @returns {string} */ const PreprocessLoader = function (source) { const { context } = this.getOptions(); const done = this.async(); done(null, (0, preprocess_1.preprocess)(source, context, 'js')); }; exports.default = PreprocessLoader;