Skip to content

Commit

Permalink
Merge pull request #383 from jtangelder/update/dependencies
Browse files Browse the repository at this point in the history
Update/dependencies
  • Loading branch information
jhnns authored Feb 21, 2017
2 parents 42bfebb + 47cead4 commit 770722b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
10 changes: 3 additions & 7 deletions lib/normalizeOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const os = require("os");
const utils = require("loader-utils");
const cloneDeep = require("clone-deep");
const path = require("path");
const proxyCustomImporters = require("./proxyCustomImporters");

Expand All @@ -17,12 +18,7 @@ const proxyCustomImporters = require("./proxyCustomImporters");
* @returns {Object}
*/
function normalizeOptions(loaderContext, content, webpackImporter) {
const options = loaderContext.query && typeof loaderContext.query === "object" ?
// Make a copy of the query object
// @see https://github.com/jtangelder/sass-loader/issues/368#issuecomment-278330164
Object.assign({}, loaderContext.query) :
utils.parseQuery(loaderContext.query);

const options = cloneDeep(utils.getOptions(loaderContext)) || {};
const resourcePath = loaderContext.resourcePath;

options.data = options.data ? (options.data + os.EOL + content) : content;
Expand Down Expand Up @@ -73,7 +69,7 @@ function normalizeOptions(loaderContext, content, webpackImporter) {
options.importer.push(webpackImporter);

// `node-sass` uses `includePaths` to resolve `@import` paths. Append the currently processed file.
options.includePaths = options.includePaths ? [].concat(options.includePaths) : [];
options.includePaths = options.includePaths || [];
options.includePaths.push(path.dirname(resourcePath));

return options;
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@
"webpack": "^2.0.0"
},
"dependencies": {
"async": "^2.0.1",
"loader-utils": "^0.2.15",
"async": "^2.1.5",
"clone-deep": "^0.2.4",
"loader-utils": "^1.0.1",
"lodash.tail": "^4.1.1",
"pify": "^2.3.0"
},
"devDependencies": {
"bootstrap-sass": "^3.3.5",
"css-loader": "^0.26.1",
"eslint": "^3.15.0",
"eslint": "^3.16.0",
"eslint-config-peerigon": "^9.0.0",
"eslint-plugin-jsdoc": "^2.4.0",
"file-loader": "^0.10.0",
Expand All @@ -49,7 +50,7 @@
"should": "^11.2.0",
"style-loader": "^0.13.1",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.3.0",
"webpack-merge": "^2.6.1"
"webpack-dev-server": "^2.4.1",
"webpack-merge": "^3.0.0"
}
}

0 comments on commit 770722b

Please sign in to comment.