Skip to content

Commit bb0b147

Browse files
Guillaume ChauAkryum
authored andcommitted
fix: code style
1 parent 008bf46 commit bb0b147

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/vue-sass/vue-sass.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,21 @@ function resolveImport (dependencyManager) {
1818
let currentDirectory = path.dirname(prev === 'stdin' ? this.options.outFile : prev)
1919
resolvedFilename = path.resolve(currentDirectory, url)
2020
}
21-
const importPaths = [ resolvedFilename ]
22-
const pjson = require("package.json") // can not be moved outside. Reqired here to get the package.json of the project that is being run
21+
const importPaths = [resolvedFilename]
22+
const pkg = require('package.json') // can not be moved outside. Reqired here to get the package.json of the project that is being run
2323

2424
try {
2525
// get the package.json config option and create paths for the requested file.
26-
pjson.vue.css.loaderOptions.sass.includePaths.forEach( (str) => {
26+
pkg.vue.css.sass.includePaths.forEach((str) => {
2727
importPaths.push(path.resolve(str, url))
2828
})
2929
} catch (e) {
3030
// Ignore error. package.json option is not set.
3131
}
3232

33-
const resolvedNames = importPaths.map( discoverImportPath ).filter((fileName) => fileName !== null && typeof fileName !== "undefined");
33+
const resolvedNames = importPaths.map(discoverImportPath).filter(
34+
fileName => fileName !== null && typeof fileName !== 'undefined'
35+
)
3436

3537
if (resolvedNames.length < 1) {
3638
done(new Error('Unknown import (file not found): ' + url))

0 commit comments

Comments
 (0)