Permalink
Browse files

Use NPM versions in builds

This changes the Grunt script to automatically pull the locations of the
NPM versions of the Almond loader and jQuery mousewheel plugin. This
means we no longer need to include these vendor files in our repository,
as the builds will automatically pull from the existing NPM files.
  • Loading branch information...
1 parent 32b6eae commit af97cc99963f7d2a7e321b74751314073419a626 @kevin-brown kevin-brown committed Nov 27, 2015
Showing with 7 additions and 649 deletions.
  1. +7 −7 Gruntfile.js
  2. +0 −421 vendor/almond-0.2.9.js
  3. +0 −221 vendor/jquery.mousewheel.js
View
@@ -4,7 +4,7 @@ module.exports = function (grunt) {
'jquery.select2',
'almond',
- 'jquery.mousewheel' // shimmed for non-full builds
+ 'jquery-mousewheel' // shimmed for non-full builds
];
fullIncludes = [
@@ -256,9 +256,9 @@ module.exports = function (grunt) {
include: includes,
namespace: 'S2',
paths: {
- almond: '../../vendor/almond-0.2.9',
- jquery: 'jquery.shim',
- 'jquery.mousewheel': 'jquery.mousewheel.shim'
+ 'almond': require.resolve('almond').slice(0, -3),
+ 'jquery': 'jquery.shim',
+ 'jquery-mousewheel': 'jquery.mousewheel.shim'
},
wrap: {
startFile: 'src/js/banner.start.js',
@@ -275,9 +275,9 @@ module.exports = function (grunt) {
include: fullIncludes,
namespace: 'S2',
paths: {
- almond: '../../vendor/almond-0.2.9',
- jquery: 'jquery.shim',
- 'jquery.mousewheel': '../../vendor/jquery.mousewheel'
+ 'almond': require.resolve('almond').slice(0, -3),
+ 'jquery': 'jquery.shim',
+ 'jquery-mousewheel': require.resolve('jquery-mousewheel').slice(0, -3)
},
wrap: {
startFile: 'src/js/banner.start.js',
Oops, something went wrong.

0 comments on commit af97cc9

Please sign in to comment.