Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc site improvements and add r6operators package #160

Merged
merged 5 commits into from
Mar 7, 2020
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Clone the repository, install all dependencies, build and serve the project.

Open `http://localhost:8080` in your favorite browser.

### Building the project for a release

Use the `gulp build` command to build a static version of the website to the "dist" folder. This will prepare all the site assets and optimise them to be hosted in an AWS S3 storage bucket.

## How to contribute

I am hoping that this project will be a fun place for open source newcomers (like myself). Feel free to take a look at the issues or come up with your own improvements for the project. I am happy to review pull requests and I can answer questions you might have.
Expand Down
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ phases:
- cd dist && aws s3 sync --cache-control max-age=86400 --acl public-read --delete . "${S3_BUCKET_URL}"
- echo Finished sync.
- echo Invalidating CloudFront Edge Cache...
- aws cloudfront create-invalidation --distribution-id "${DISTRIBUTION_ID}" --paths /*
- aws cloudfront create-invalidation --distribution-id "${DISTRIBUTION_ID}" --paths '/*'
- echo Finished invalidating CloudFront Edge Cache.
30 changes: 17 additions & 13 deletions gulpfile.js/gulp/node_modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,29 @@

var conf = require('./conf'),
connect = require('gulp-connect'),
gulp = require('gulp');

function node_modules_fonts() {
gulp = require('gulp'),
gulpif = require('gulp-if'),
imagemin = require('gulp-imagemin');

function node_modules_r6operators_png() {
return gulp.src([
'node_modules/font-awesome/fonts/*.*'
'node_modules/r6operators/lib/icons/png/*.*'
])
.pipe(gulp.dest(conf.paths.dist + '/fonts'))
.pipe(gulp.dest(conf.paths.dist + '/img/png'))
.pipe(connect.reload());
};
function node_modules_styles() {
return gulp.src(conf.paths.src + '/styles/bootstrap.min.css')
.pipe(gulp.dest(conf.paths.dist + '/css'))
};

function node_modules_styles2() {
return gulp.src(conf.paths.src + '/styles/font-awesome.min.css')
.pipe(gulp.dest(conf.paths.dist + '/css'))
function node_modules_r6operators_svg() {
return gulp.src([
'node_modules/r6operators/lib/icons/svg/*.*'
])
.pipe(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))
.pipe(gulp.dest(conf.paths.dist + '/img/svg'))
.pipe(connect.reload());
};

const node_modules = gulp.series(node_modules_fonts, node_modules_styles, node_modules_styles2);
const node_modules = gulp.series(
node_modules_r6operators_png,
node_modules_r6operators_svg);

exports.default = node_modules;
Loading