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

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 a team June 28, 2018 21:41
Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

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

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

Confirmed it's working here, too. 🎆

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

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 August 15, 2018 22:24
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.

build static assets
3 participants