Skip to content

Commit

Permalink
enable reload when necessary (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhanseng authored and goto-bus-stop committed May 30, 2018
1 parent a608940 commit ec4ca37
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,16 @@ function Bankai (entry, opts) {
})

// Insert nodes into the graph.
var documentDependencies = [ 'assets:list', 'manifest:bundle', 'styles:bundle', 'scripts:bundle' ]

if (opts.reload) {
documentDependencies.push('reload:bundle')
this.graph.node('reload', reloadNode)
}
this.graph.node('assets', assetsNode)
this.graph.node('documents', [ 'assets:list', 'manifest:bundle', 'styles:bundle', 'scripts:bundle', 'reload:bundle' ], documentNode)
this.graph.node('documents', documentDependencies, documentNode)
this.graph.node('manifest', manifestNode)
this.graph.node('scripts', scriptNode)
this.graph.node('reload', reloadNode)
this.graph.node('service-worker', [ 'assets:list', 'styles:bundle', 'scripts:bundle', 'documents:list' ], serviceWorkerNode)
this.graph.node('styles', [ 'scripts:style', 'scripts:bundle' ], styleNode)

Expand Down

0 comments on commit ec4ca37

Please sign in to comment.