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

Conversation

Projects
None yet
3 participants
@davidfischer
Contributor

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 rtfd/core Jun 28, 2018

@davidfischer davidfischer referenced this pull request Jun 28, 2018

Closed

build static assets #4280

@agjohnson

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

This comment has been minimized.

Member

ericholscher commented Jun 29, 2018

Confirmed it's working here, too. 🎆

@davidfischer davidfischer merged commit ff9b6ba into master Jun 29, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@davidfischer

This comment has been minimized.

Contributor

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