Skip to content

Commit

Permalink
Allow embedding of aniseed.autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed Feb 12, 2022
1 parent 4b76037 commit 45107fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fnl/aniseed/macros.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

;; Only require autoload if it's used.
(when (contains? mod-fns autoload-sym)
(table.insert result `(local ,autoload-sym (. (require :aniseed.autoload) :autoload)))))
(table.insert result `(local ,autoload-sym (. (require "aniseed.autoload") :autoload)))))

;; When we have some keys insert the key/vals pairs locals.
;; If this is empty we end up generating invalid Lua.
Expand Down
2 changes: 1 addition & 1 deletion lua/aniseed/macros.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

;; Only require autoload if it's used.
(when (contains? mod-fns autoload-sym)
(table.insert result `(local ,autoload-sym (. (require :aniseed.autoload) :autoload)))))
(table.insert result `(local ,autoload-sym (. (require "aniseed.autoload") :autoload)))))

;; When we have some keys insert the key/vals pairs locals.
;; If this is empty we end up generating invalid Lua.
Expand Down
1 change: 1 addition & 0 deletions scripts/embed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
mkdir -p "lua/$2"
rsync -avu --delete "deps/$1/${3:-lua/$1/}" "lua/$2/$1"
find "lua/$2" -type f -name "*.lua" -exec sed -i "s/\"$1\./\"$2.$1./g" {} \;
find "lua/$2" -type f -name "*.fnl" -exec sed -i "s/\"$1\./\"$2.$1./g" {} \;

0 comments on commit 45107fd

Please sign in to comment.