Skip to content

Commit

Permalink
Use NPM versions in builds
Browse files Browse the repository at this point in the history
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
kevin-brown committed Nov 27, 2015
1 parent 32b6eae commit af97cc9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 649 deletions.
14 changes: 7 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
Loading

0 comments on commit af97cc9

Please sign in to comment.