You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
580 B

4 years ago
  1. const { rollup } = require("rollup");
  2. const { terser } = require("rollup-plugin-terser");
  3. const resolve = require('rollup-plugin-node-resolve');
  4. const { writeFileSync } = require('fs');
  5. (async () => {
  6. const bundle = await rollup({
  7. input: __dirname + "/../src/jquery.rss.js",
  8. plugins: [resolve(), terser()]
  9. });
  10. const { output } = await bundle.generate({ format: 'iife', name: 'RSS' });
  11. const outputPath = `${__dirname}/../dist/jquery.rss.min.js`;
  12. writeFileSync(outputPath, output[0].code);
  13. console.log(`${outputPath} was updated!`);
  14. })();