-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixing js minimization and removing sourcemaps in production #100
Conversation
gulpfile.babel.js
Outdated
)); | ||
|
||
// Scan your HTML for assets & optimize them | ||
gulp.task('html', gulp.series(() => { | ||
return gulp.src('app/**/*.html') | ||
.pipe($.useref({ | ||
searchPath: '{.tmp,app}', | ||
noAssets: true | ||
noAssets: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this is doing anything for us.
.pipe($.size({ title: 'scripts' })) | ||
.pipe($.sourcemaps.write('.')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why this was running twice, but we don't need it for production deploys.
--- | ||
|
||
1. Use the API Gateway endpoint to get the lastest value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I like lastest
as a word
'./app/scripts/sections/*.js', | ||
'./app/scripts/main.js' | ||
]) | ||
], {base: './app/scripts/'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with some of this specific gulp configuration, but running it locally it seems like it works 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had updated gulp in a previous PR. There was an issue with changing the relative paths of the js files if the base
was not provided.
@@ -18,7 +18,7 @@ | |||
}, | |||
conversations: { | |||
// count must be an integer | |||
fallbackConversationCount: 4873330, | |||
fallbackConversationCount: 5680775, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of just ignoring all files ending in .sh
, other than that this seems okay to me
No description provided.