From 285d722811f78c24b28532f68db1beb4340f18bc Mon Sep 17 00:00:00 2001 From: David Fischer Date: Thu, 28 Jun 2018 14:32:07 -0700 Subject: [PATCH] Fix issues building static assets --- docs/development/standards.rst | 14 ++++++++------ package.json | 12 +++++++++--- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docs/development/standards.rst b/docs/development/standards.rst index bf3d6bb44e3..2d8ab3cb3ae 100644 --- a/docs/development/standards.rst +++ b/docs/development/standards.rst @@ -63,9 +63,6 @@ To install these tools and dependencies:: npm install -This will install locally to the project, not globally. You can install globally -if you wish, otherwise make sure ``node_modules/.bin`` is in your PATH. - Next, install front end dependencies:: bower install @@ -79,19 +76,24 @@ source file that will compile over your changes. To test changes while developing, which will watch source files for changes and compile as necessary, you can run `Gulp`_ with our development target:: - gulp dev + npm run dev Once you are satisfied with your changes, finalize the bundles (this will minify library sources):: - gulp build + npm run build If you updated any of our vendor libraries, compile those:: - gulp vendor + npm run vendor Make sure to check in both files under ``static`` and ``static-src``. +.. note:: + + We run Gulp through an ``npm`` script in order to ensure + that the correct version from ``package.json`` is used. + Making Changes -------------- diff --git a/package.json b/package.json index 2e409f9bf10..e803e76c36c 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,12 @@ "version": "0.0.1", "description": "Read the Docs build dependencies", "author": "Anthony Johnson ", + "scripts": { + "build": "gulp build", + "dev": "gulp dev", + "lint": "gulp lint", + "vendor": "gulp vendor" + }, "dependencies": { "bowser": "^1.9.3", "cssfilter": "0.0.8", @@ -22,12 +28,12 @@ "gulp-less": "^3.0.3", "gulp-rename": "^1.2.2", "gulp-run": "^1.6.6", - "gulp-uglify": "^1.2.0", + "gulp-uglify": "^3.0.0", "gulp-util": "^3.0.3", "gulp-watch": "^4.3.3", "less": "^2.7.3", - "vinyl-buffer": "^1.0.0", - "vinyl-source-stream": "^1.1.0" + "vinyl-buffer": "^1.0.1", + "vinyl-source-stream": "^2.0.0" }, "resolutions": { "natives": "1.1.3"