Skip to content

Commit

Permalink
Fix code format by running yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
lukyth committed Mar 25, 2019
1 parent f1b5571 commit 6603999
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
8 changes: 4 additions & 4 deletions packages/core/parcel-bundler/src/Bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ class Bundler extends EventEmitter {
target === 'node'
? false
: typeof options.hmr === 'boolean'
? options.hmr
: watch;
? options.hmr
: watch;
const scopeHoist =
options.scopeHoist !== undefined ? options.scopeHoist : false;
return {
Expand Down Expand Up @@ -145,8 +145,8 @@ class Bundler extends EventEmitter {
typeof options.autoInstall === 'boolean'
? options.autoInstall
: process.env.PARCEL_AUTOINSTALL === 'false'
? false
: !isProduction,
? false
: !isProduction,
scopeHoist: scopeHoist,
contentHash:
typeof options.contentHash === 'boolean'
Expand Down
40 changes: 21 additions & 19 deletions packages/core/parcel-bundler/src/assets/VueAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,28 +214,30 @@ class VueAsset extends Asset {
}

compileStyle(generated, scopeId) {
return generated.filter(r => r.type === 'css').reduce((p, r, i) => {
let css = r.value;
let scoped = this.ast.styles[i].scoped;

// Process scoped styles if needed.
if (scoped) {
let {code, errors} = this.vue.compileStyle({
source: css,
filename: this.relativeName,
id: scopeId,
scoped
});
return generated
.filter(r => r.type === 'css')
.reduce((p, r, i) => {
let css = r.value;
let scoped = this.ast.styles[i].scoped;

// Process scoped styles if needed.
if (scoped) {
let {code, errors} = this.vue.compileStyle({
source: css,
filename: this.relativeName,
id: scopeId,
scoped
});

if (errors.length) {
throw errors[0];
}

if (errors.length) {
throw errors[0];
css = code;
}

css = code;
}

return p + css;
}, '');
return p + css;
}, '');
}

compileHMR(generated, optsVar) {
Expand Down

0 comments on commit 6603999

Please sign in to comment.