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

Fixing js minimization and removing sourcemaps in production #100

Merged
merged 4 commits into from
Mar 24, 2021

Conversation

jfairchild
Copy link
Contributor

No description provided.

));

// 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
Copy link
Contributor Author

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('.'))
Copy link
Contributor Author

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.

@jfairchild jfairchild requested a review from a team February 2, 2021 20:08
@jfairchild jfairchild requested a review from wdoug March 23, 2021 15:30
.gitignore Outdated Show resolved Hide resolved
---

1. Use the API Gateway endpoint to get the lastest value.
Copy link
Contributor

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/config.js Outdated Show resolved Hide resolved
'./app/scripts/sections/*.js',
'./app/scripts/main.js'
])
], {base: './app/scripts/'})
Copy link
Contributor

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 🤷

Copy link
Contributor Author

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,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated 👍

@jfairchild jfairchild requested a review from wdoug March 23, 2021 20:06
Copy link
Contributor

@wdoug wdoug left a 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

@jfairchild jfairchild merged commit 6145aa4 into v2 Mar 24, 2021
@jfairchild jfairchild deleted the jeff/fix-js-min branch March 24, 2021 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants