Skip to content

Commit

Permalink
Replace local jQuery with NPM version
Browse files Browse the repository at this point in the history
Amends build steps to copy thw file from node_modules to deploy/public
where it gets concatenated as before.

Removes local version of the file

Adds file location to config/paths.json
  • Loading branch information
Jani Kraner committed Feb 8, 2018
1 parent 6928303 commit 4f05a9d
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 63 deletions.
1 change: 1 addition & 0 deletions config/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"iframeresizer": "node_modules/iframe-resizer/",
"clipboard": "node_modules/clipboard/dist/",
"html5shiv": "node_modules/html5shiv/dist/",
"jquery": "node_modules/jquery/dist/",
"source": "src/",
"components": "src/components/",
"images": "src/images/",
Expand Down
6 changes: 6 additions & 0 deletions lib/metalsmith.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ module.exports = metalsmith(__dirname) // __dirname defined by node.js: name of
destination: 'javascripts/vendor'
}))

// copy static assets from node_modules/jquery/dist
.use(assets({
source: '../' + paths.jquery,
destination: 'javascripts/vendor'
}))

// concatenate javascript files
.use(concat({
files: [
Expand Down
Loading

0 comments on commit 4f05a9d

Please sign in to comment.