diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-04-14 09:21:00 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-04-14 09:21:00 +0000 |
| commit | 5faab5d81cc5ed36824a52a273e83eb20240cb2e (patch) | |
| tree | dba10fadf4cdad0f5524df642fab83f6310a8574 | |
| parent | move spec out of spec/core (diff) | |
| download | alive-5faab5d81cc5ed36824a52a273e83eb20240cb2e.tar.gz alive-5faab5d81cc5ed36824a52a273e83eb20240cb2e.zip | |
move lib to alv-lib module
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | alv-lib/logic.moon (renamed from lib/logic.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/math.moon (renamed from lib/math.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/midi.moon (renamed from lib/midi.moon) | 2 | ||||
| -rw-r--r-- | alv-lib/midi/core.moon (renamed from lib/midi/core.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/midi/launchctl.moon (renamed from lib/midi/launchctl.moon) | 2 | ||||
| -rw-r--r-- | alv-lib/osc.moon (renamed from lib/osc.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/pilot.moon (renamed from lib/pilot.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/random.moon (renamed from lib/random.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/sc.moon (renamed from lib/sc.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/string.moon (renamed from lib/string.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/time.moon (renamed from lib/time.moon) | 0 | ||||
| -rw-r--r-- | alv-lib/util.moon (renamed from lib/util.moon) | 0 | ||||
| -rw-r--r-- | alv/builtin.moon | 10 | ||||
| -rw-r--r-- | alv/config.ld | 4 | ||||
| -rw-r--r-- | alv/extensions.md | 6 | ||||
| -rw-r--r-- | extra/docs.moon | 2 |
17 files changed, 17 insertions, 17 deletions
@@ -1,5 +1,5 @@ -MODULES=$(wildcard lib/*.moon) lib/midi/launchctl.moon -MODREFS=$(MODULES:lib/%.moon=docs/reference/%.html) +MODULES=$(wildcard alv-lib/*.moon) alv-lib/midi/launchctl.moon +MODREFS=$(MODULES:alv-lib/%.moon=docs/reference/%.html) CORE=$(wildcard alv/*.moon alv/**/*.moon) $(wildcard alv/*.md) DEPS=alv/version.moon extra/docs.moon extra/layout.moon extra/dom.moon @@ -17,10 +17,10 @@ docs/%.html: docs/%.md $(DEPS) @echo "building page $<" moon extra/docs.moon $@ markdown $< -docs/reference/%.html: lib/%.moon $(DEPS) +docs/reference/%.html: alv-lib/%.moon $(DEPS) @echo "building docs for $<" @mkdir -p `dirname $@` - moon extra/docs.moon $@ module lib.$(subst /,.,$*) $(subst /,.,$*) + moon extra/docs.moon $@ module alv-lib.$(subst /,.,$*) $(subst /,.,$*) docs/reference/index.html: $(MODREFS) $(DEPS) moon extra/docs.moon $@ reference $(MODULES) diff --git a/lib/logic.moon b/alv-lib/logic.moon index 62de1c1..62de1c1 100644 --- a/lib/logic.moon +++ b/alv-lib/logic.moon diff --git a/lib/math.moon b/alv-lib/math.moon index 6f5f3fb..6f5f3fb 100644 --- a/lib/math.moon +++ b/alv-lib/math.moon diff --git a/lib/midi.moon b/alv-lib/midi.moon index e83b05d..88d9547 100644 --- a/lib/midi.moon +++ b/alv-lib/midi.moon @@ -1,5 +1,5 @@ import ValueStream, EventStream, Op, Input, val, evt from require 'alv.base' -import input, output, inout, apply_range from require 'lib.midi.core' +import input, output, inout, apply_range from require 'alv-lib.midi.core' gate = ValueStream.meta meta: diff --git a/lib/midi/core.moon b/alv-lib/midi/core.moon index ddb1e8a..ddb1e8a 100644 --- a/lib/midi/core.moon +++ b/alv-lib/midi/core.moon diff --git a/lib/midi/launchctl.moon b/alv-lib/midi/launchctl.moon index 42837f0..90e8956 100644 --- a/lib/midi/launchctl.moon +++ b/alv-lib/midi/launchctl.moon @@ -1,5 +1,5 @@ import ValueStream, EventStream, Op, Input, val, evt from require 'alv.base' -import apply_range, bit from require 'lib.midi.core' +import apply_range, bit from require 'alv-lib.midi.core' import bor, lshift from bit color = (r, g) -> bit.bor 12, r, (bit.lshift g, 4) diff --git a/lib/osc.moon b/alv-lib/osc.moon index b7e25e7..b7e25e7 100644 --- a/lib/osc.moon +++ b/alv-lib/osc.moon diff --git a/lib/pilot.moon b/alv-lib/pilot.moon index 0d6eefb..0d6eefb 100644 --- a/lib/pilot.moon +++ b/alv-lib/pilot.moon diff --git a/lib/random.moon b/alv-lib/random.moon index 8c4d096..8c4d096 100644 --- a/lib/random.moon +++ b/alv-lib/random.moon diff --git a/lib/sc.moon b/alv-lib/sc.moon index 2857392..2857392 100644 --- a/lib/sc.moon +++ b/alv-lib/sc.moon diff --git a/lib/string.moon b/alv-lib/string.moon index faa7ab3..faa7ab3 100644 --- a/lib/string.moon +++ b/alv-lib/string.moon diff --git a/lib/time.moon b/alv-lib/time.moon index 2589d96..2589d96 100644 --- a/lib/time.moon +++ b/alv-lib/time.moon diff --git a/lib/util.moon b/alv-lib/util.moon index dc133e4..dc133e4 100644 --- a/lib/util.moon +++ b/alv-lib/util.moon diff --git a/alv/builtin.moon b/alv/builtin.moon index 23412bf..98b4198 100644 --- a/alv/builtin.moon +++ b/alv/builtin.moon @@ -98,7 +98,7 @@ require_ = ValueStream.meta name = result\const! L\trace @, "loading module #{name}" - scope = ValueStream.wrap require "lib.#{name\unwrap 'str'}" + scope = ValueStream.wrap require "alv-lib.#{name\unwrap 'str'}" Result :value import_ = ValueStream.meta @@ -117,8 +117,8 @@ current scope." for child in *tail name = (child\quote scope)\unwrap 'sym' - value = ValueStream.wrap require "lib.#{name}" - scope\set name, Result :value -- (require "lib.#{name})\unwrap 'scope' + value = ValueStream.wrap require "alv-lib.#{name}" + scope\set name, Result :value Result! import_star = ValueStream.meta @@ -137,8 +137,8 @@ Requires modules `sym1`, `sym2`, … and merges them into the current scope." for child in *tail name = (child\quote scope)\unwrap 'sym' - value = ValueStream.wrap require "lib.#{name}" - scope\use value\unwrap 'scope' -- (require "lib.#{name}")\unwrap 'scope' + value = ValueStream.wrap require "alv-lib.#{name}" + scope\use value\unwrap 'scope' Result! diff --git a/alv/config.ld b/alv/config.ld index 01160f8..6867a56 100644 --- a/alv/config.ld +++ b/alv/config.ld @@ -1,5 +1,5 @@ -project = 'alive internals' title = 'developer docs' +project = 'alive internals' description = "`alive` developer documentation" full_description = [[This section documents the *implementation* of the alive @@ -12,5 +12,5 @@ If you are looking for the language reference for users, head over to the format = 'discount' style = 'docs' template = 'docs' -topics={'alv/extensions.md'} dir = 'docs/internals' +topics = {'alv/extensions.md'} diff --git a/alv/extensions.md b/alv/extensions.md index 82a4d10..89d1a89 100644 --- a/alv/extensions.md +++ b/alv/extensions.md @@ -2,9 +2,9 @@ Extensions for `alive` are implemented in [Lua][lua] or [MoonScript][moonscript] (which runs as Lua). When an `alive` module is [`(require)`][builtins-req]d, -alive looks for a Lua module `lib.[module]`. You can simply add a new file with -extension `.lua` or `.moon` in the `lib` directory of your alive installation or -somewhere else in your `LUA_PATH`. +alive looks for a Lua module `alv-lib.[module]`. You can simply add a new file +with extension `.lua` or `.moon` in the `alv-lib` directory of your alive +installation or somewhere else in your `LUA_PATH`. To write extensions, a number of classes and utilities are required. All of these are exported in the `base` module. diff --git a/extra/docs.moon b/extra/docs.moon index aee7970..6ed5ea0 100644 --- a/extra/docs.moon +++ b/extra/docs.moon @@ -58,7 +58,7 @@ spit OUT, switch command p autoref "These modules can be imported using [require][], " .. "[import][] and [import*][]." ul for file in *arg[3,] - path = file\match '^lib/(.*)%.moon$' + path = file\match '^alv%-lib/(.*)%.moon$' name = path\gsub '/', '.' li a (code name), href: "#{path}.html" } |
