mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-30 23:06:18 +00:00
Don’t need this
This commit is contained in:
parent
5cd2083e4d
commit
5d53e9248b
@ -25,10 +25,6 @@ exports.scss = scssTask;
|
||||
var jsTask = require('./scripts');
|
||||
exports.js = jsTask;
|
||||
|
||||
var jsRollupTask = require('./rollup');
|
||||
exports.jsr = jsRollupTask;
|
||||
|
||||
|
||||
var cleanTask = require('./clean');
|
||||
exports.clean = cleanTask;
|
||||
|
||||
|
@ -1,72 +0,0 @@
|
||||
|
||||
const path = require('path');
|
||||
const { src, dest } = require('gulp');
|
||||
const rollup = require('gulp-better-rollup');
|
||||
const { string } = require('rollup-plugin-string');
|
||||
const resolveNodeModules = require('rollup-plugin-node-resolve');
|
||||
const commonJs = require('rollup-plugin-commonjs');
|
||||
const json = require('rollup-plugin-json');
|
||||
// const alias = require('rollup-plugin-alias');
|
||||
|
||||
const minify = require('gulp-minify');
|
||||
const rev = require('gulp-rev');
|
||||
const asyncthrough = require('./lib/through');
|
||||
|
||||
|
||||
const ROOT = path.dirname(__dirname);
|
||||
const DEST = 'dist/js';
|
||||
|
||||
function rollupPipe () {
|
||||
return src('js-rollup/*.js')
|
||||
.pipe(rollup({
|
||||
// There is no `input` option as rollup integrates into the gulp pipeline
|
||||
plugins: [
|
||||
string({
|
||||
include: '**/*.html',
|
||||
}),
|
||||
resolveNodeModules(),
|
||||
commonJs(),
|
||||
json(),
|
||||
],
|
||||
external: [ 'jquery', 'lodash', 'underscore' ],
|
||||
}, {
|
||||
// Rollups `sourcemap` option is unsupported. Use `gulp-sourcemaps` plugin instead
|
||||
format: 'iife',
|
||||
globals: {
|
||||
jquery: '$',
|
||||
lodash: '_',
|
||||
backbone: 'Backbone',
|
||||
underscore: '_',
|
||||
},
|
||||
}));
|
||||
};
|
||||
|
||||
module.exports = exports = function rollupJS () {
|
||||
return rollupPipe()
|
||||
.pipe(dest(DEST));
|
||||
};
|
||||
|
||||
exports.prod = function rollupJSForProd () {
|
||||
return rollupPipe()
|
||||
.pipe(minify({
|
||||
ext: { min: '.js' },
|
||||
noSource: true,
|
||||
}))
|
||||
.pipe(dest(DEST))
|
||||
.pipe(rev())
|
||||
.pipe(dest(DEST))
|
||||
.pipe(asyncthrough(async (stream, file) => {
|
||||
// Change rev's original base path back to the public root so that it uses the full
|
||||
// path as the original file name key in the manifest
|
||||
var base = path.resolve(ROOT, 'dist');
|
||||
file.revOrigBase = base;
|
||||
file.base = base;
|
||||
|
||||
stream.push(file);
|
||||
}))
|
||||
.pipe(rev.manifest({
|
||||
merge: true, // Merge with the existing manifest if one exists
|
||||
}))
|
||||
.pipe(dest('.'))
|
||||
;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user