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

Fix issues building static assets #4311

Merged
merged 1 commit into from Jun 29, 2018
Merged

Conversation

@davidfischer
Copy link
Contributor

@davidfischer davidfischer commented Jun 28, 2018

This makes a few changes to how our static assets are built that fixes some version incompatibility issues.

  • Run gulp through an NPM script which ensures that the version from node_modules/.bin/ is used
  • Upgrade vinyl and gulp-uglify

Testing

After pulling these changes, you'll need to run

$ npm install               # updates dependencies
$ npm run build             # outputs compiled files

After running this, git status should show the following as modified (at least):

modified:   readthedocs/builds/static/builds/js/detail.js
modified:   readthedocs/core/static/core/js/readthedocs-doc-embed.js
modified:   readthedocs/core/static/core/js/site.js
modified:   readthedocs/gold/static/gold/js/gold.js
modified:   readthedocs/projects/static/projects/js/import.js
modified:   readthedocs/projects/static/projects/js/tools.js

I tested this under a couple different Node/NPM version combinations:

  • Node v10.5.0 with NPM 6.1.0 (latest released version)
  • Node v8.11.3 with NPM 5.6.0 (latest LTS version)

Fixes #4280

@davidfischer davidfischer requested a review from Jun 28, 2018
Copy link
Contributor

@agjohnson agjohnson left a comment

Looks great! Thanks for digging into the error.

Super trivial, but for consistency, our tox js lint step could be updated to use the npm call as well.

@ericholscher
Copy link
Member

@ericholscher ericholscher commented Jun 29, 2018

Confirmed it's working here, too. 🎆

@davidfischer davidfischer merged commit ff9b6ba into master Jun 29, 2018
1 check passed
@davidfischer
Copy link
Contributor Author

@davidfischer davidfischer commented Jun 29, 2018

Super trivial, but for consistency, our tox js lint step could be updated to use the npm call as well.

I did this in #4312.

@stsewd stsewd deleted the davidfischer/static-asset-fix branch Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants