theoretical task

alfons-task
Codinget 4 years ago
parent d31e5a9615
commit d22335d569
  1. 3
      Alfons.moon
  2. 24
      bin/task.moon
  3. 2522
      out/task

@ -1,6 +1,7 @@
tasks: tasks:
build: => build: =>
sh "moon bin/moonbuild.moon -jy" load 'moonbuild'
tasks.moonbuild j: true
release: => release: =>
error "no version provided" unless @v error "no version provided" unless @v
tasks.build! tasks.build!

@ -0,0 +1,24 @@
-- load everything we need
import loadfile from require 'moonscript.base'
Context = require 'moonbuild.context'
DepGraph = require 'moonbuild.core.DAG'
tasks:
moonbuild: =>
args = {
nparallel: @parallel or @j
quiet: @quiet or @q
buildfile: @buildfile or @b
force: @force or @f
}
ctx = Context!
ctx\load (loadfile args.buildfile or 'Build.moon'), @
ctx\init!
dag = DepGraph ctx, #@ == 0 and ctx.defaulttargets or @
executor = do
Executor = do
ok, Executor = pcall -> require 'moonbuild.core.multiprocessexecutor'
ok and Executor or require 'moonbuild.core.singleprocessexecutor'
args.nparallel = Executor\getmaxparallel! if args.nparallel == true
Executor dag, args.nparallel
executor\execute args

2522
out/task

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save