Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.NONPCI_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.NONPCI_AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: build `prod`
run: ./build/build.sh
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ dist/
node_modules/
website/public/
website/static/
.hugo_build.lock
.yarn*
19 changes: 0 additions & 19 deletions babel.config.js

This file was deleted.

56 changes: 1 addition & 55 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
const gulp = require('gulp');
const autoprefixer = require('gulp-autoprefixer');
const clean = require('gulp-clean');
const exec = require('child_process').exec;
const cleanCSS = require('gulp-clean-css');
const uglify = require('gulp-terser');
const concat = require('gulp-concat');
const imagemin = require('imagemin');

const argv = require('minimist')(process.argv.slice(2));

Expand All @@ -30,51 +24,7 @@ const config = {
}
}

function uglifyCSS() {
return gulp.src('src/css/*.css')
.pipe(autoprefixer({
cascade: false
}))
.pipe(cleanCSS({ compatibility: 'ie8' }))
.pipe(gulp.dest('website/static/css'))
};

function prepJS() {
return gulp.src(['src/js/typed.js', 'src/js/main.js'])
.pipe(concat('jsbundle.js'))
.pipe(uglify())
.pipe(gulp.dest('website/static/js'))
};

function prepFonts() {
return gulp.src('src/fonts/*')
.pipe(gulp.dest('website/static/fonts'))
}

function prepBinaries() {
return gulp.src('src/*.pdf', 'src/*.txt')
.pipe(gulp.dest('website/static'))
}

function appBundle() {
return gulp.src('dist/appBundle.js')
.pipe(gulp.dest('website/static/js'))
};

function imageMIN() {
return imagemin(['src/img/**/*'],
{
destination: 'website/static/img',
}
)
}

function hugoClean() {
return gulp.src('website/public', { read: false })
.pipe(clean());
};

function hugoBuild() {
function build() {
const baseUrl = config[argv.env] ? config[argv.env].baseUrl : config['production'].baseUrl;
const command = 'hugo -v -b "' + baseUrl + '" --source=website';

Expand All @@ -83,9 +33,6 @@ function hugoBuild() {
});
};

const hugoPrep = gulp.parallel(uglifyCSS, prepJS, prepFonts, prepBinaries, imageMIN);
const build = gulp.series(hugoPrep, hugoBuild);

function publish() {
const options = config[argv.env].aws;
const publisher = awspublish.create(options);
Expand All @@ -97,6 +44,5 @@ function publish() {
.pipe(invalidate(options));
};

exports.update = hugoPrep;
exports.build = build;
exports.deploy = gulp.series(build, publish);
22 changes: 5 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
{
"name": "gateway_api_docs",
"version": "1.0.0",
"version": "2.0.0",
"description": "",
"main": "index.js",
"browsersList": ["last 2 versions"],
"browsersList": [
"last 2 versions"
],
"dependencies": {
"@babel/runtime": "^7.4.5",
"auth0-js": "^9.11.0",
"core-js": "3",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-clean-css": "^4.0.0",
"gulp-concat": "^2.6.0",
"imagemin":"^7.0.0"
"gulp-awspublish": "^8.0.0"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@babel/plugin-transform-runtime": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/register": "^7.4.4",
"child_process": "^1.0.2",
"concurrent-transform": "^1.0.0",
"gulp-awspublish": "^4.0.0",
"gulp-clean": "^0.4.0",
"gulp-cloudfront-invalidate": "^0.1.5",
"gulp-terser": "^2.1.0",
"minimist": "^1.2.0"
},
"scripts": {
Expand Down
Loading