1
0
mirror of https://github.com/GenderDysphoria/GenderDysphoria.fyi.git synced 2025-11-25 20:42:40 +00:00

Site JS is now compiled inside of content. No more gulp streams.

This commit is contained in:
Jocelyn Badgley (Twipped)
2020-02-28 10:27:52 -08:00
parent 695637c3e7
commit 823f662743
13 changed files with 105 additions and 633 deletions

View File

@@ -2,12 +2,6 @@ const { src } = require('gulp');
const awspublish = require('gulp-awspublish');
const awsrouter = require('gulp-awspublish-router');
const parallelize = require('concurrent-transform');
// const cloudfront = require('gulp-cloudfront-invalidate-aws-publish');
const debug = require('./lib/debug');
// const path = require('path');
// const ROOT = path.dirname(__dirname);
const DEST = 'dist';
var credentials = require('../aws.json');
@@ -44,7 +38,7 @@ const routes = {
module.exports = exports = function s3deploy () {
var publisher = awspublish.create(credentials);
return src(`${DEST}/**/*`)
return src('dist/**/*')
.pipe(awsrouter({
cache: {
gzip: true,
@@ -61,18 +55,3 @@ module.exports = exports = function s3deploy () {
states: [ 'create', 'update', 'delete' ],
}));
};
exports.dryrun = function s3DryRun () {
return src(`${DEST}/**/*`)
.pipe(awsrouter({
cache: {
gzip: true,
cacheTime: 1800, // 30 minutes on client
sharedCacheTime: 86400, // one day on server
},
routes,
}))
.pipe(debug('s3'))
;
};