index.js 463 B

1234567891011121314151617
  1. /**
  2. * pupper.js - Webpack Loader
  3. * @author Matheus Giovani <matheus@ad3com.com.br>
  4. * @license AGPL-3.0
  5. */
  6. const pupper = require("../..");
  7. /**
  8. * @param {string} source The source filename
  9. * @param {import("../../types/pupper").Compiler.Options} options Any options to be passed to the pupper compiler
  10. * @returns {String}
  11. */
  12. module.exports = (source, options) => {
  13. const contents = pupper.compileToStringSync(source, options);
  14. return contents;
  15. };