Skip to content

Commit

Permalink
fix(build): prevent hanging when only building
Browse files Browse the repository at this point in the history
  • Loading branch information
fathyb committed Dec 12, 2017
1 parent df956a5 commit 5465994
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/frontend/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export = class TSAsset extends JSAsset {
}

public async parse(code: string) {
const {options} = this
let result: TranspileResult

// if we are in the main thread let's transpile and check
// at the same time
if(!process.send) {
// if we are not watching let's transpile and check at the same time
if(!options.watch) {
const [check] = await typeCheck(this.name)

result = check.transpile()
Expand Down
3 changes: 2 additions & 1 deletion src/modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ declare module 'parcel-bundler/src/assets/JSAsset' {
class JSAsset {
public name: string
public contents?: string
public options?: any

constructor(name: string, pkg: string, options: any)

Expand All @@ -24,7 +25,7 @@ declare module 'enhanced-resolve/lib/getInnerRequest' {

interface Callback {
(err?: Error, result?: any): void;

log?: any;
stack?: any;
missing?: any;
Expand Down

0 comments on commit 5465994

Please sign in to comment.