-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Maketile.{js,coffee} exported rules (#99)
Existing files or matching globs still take priority over rules, to avoid loading Maketile when possible.
- Loading branch information
Showing
8 changed files
with
74 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
for lang in ['css', 'styl'] | ||
exports[lang] = do (lang) -> -> | ||
svgtiler """ | ||
-f css-anim.#{lang} | ||
( shapes.coffee css-anim.csv ) | ||
( ascii.coffee ascii.asc ) | ||
""" | ||
|
||
export default exports.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export coffee = -> | ||
svgtiler '-f map.coffee *.asc' | ||
export js = -> | ||
svgtiler '-f map.jsx *.asc' | ||
export graph = -> | ||
svgtiler '-f -O graph-\* map.coffee graph.coffee *.asc' | ||
|
||
export default -> | ||
coffee() | ||
js() | ||
graph() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
palettes = ['castle', 'overworld', 'underground', 'underwater'] | ||
|
||
## Define individual palette rules and a default rule that builds them all. | ||
for palette in palettes | ||
exports[palette] = do (palette) -> -> | ||
svgtiler "-f -s palette=#{palette} -O *_#{palette} mario.coffee door.tsv" | ||
|
||
export default -> | ||
for palette in palettes | ||
exports[palette]() | ||
|
||
## Example definition of just the "everything" rule. | ||
export simple = -> | ||
for palette in palettes | ||
svgtiler "-f -s palette=#{palette} -O *_#{palette} mario.coffee door.tsv" | ||
|
||
export singleRule = -> | ||
## Example definition using just s single call to svgtiler() | ||
export singleCall = -> | ||
svgtiler ''' | ||
-f | ||
( -s palette=castle -O *_castle mario.coffee door.tsv ) | ||
( -s palette=overworld -O *_overworld mario.coffee door.tsv ) | ||
( -s palette=underground -O *_underground mario.coffee door.tsv ) | ||
( -s palette=underwater -O *_underwater mario.coffee door.tsv ) | ||
''' | ||
|
||
### | ||
castle: | ||
svgtiler -f -s palette=castle -O \*_castle mario.coffee door.tsv | ||
overworld: | ||
svgtiler -f -s palette=overworld -O \*_overworld mario.coffee door.tsv | ||
underground: | ||
svgtiler -f -s palette=underground -O \*_underground mario.coffee door.tsv | ||
underwater: | ||
svgtiler -f -s palette=underwater -O \*_underwater mario.coffee door.tsv | ||
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
langs = ['cjsx', 'jsx', 'coffee'] | ||
|
||
for lang in langs | ||
exports[lang] = do (lang) -> -> | ||
svgtiler "-f outlines.#{lang} *.asc" | ||
|
||
export default -> | ||
for lang in langs | ||
exports[lang]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export txt = -> | ||
svgtiler '-f -P --bg black NES_level7.txt example.asc' | ||
|
||
export coffee = -> | ||
svgtiler '-f -P NES_level7.coffee example.asc' | ||
|
||
export default -> | ||
txt() | ||
coffee() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
langs = ['coffee', 'txt'] | ||
|
||
for lang in langs | ||
exports[lang] = do (lang) -> -> | ||
svgtiler "-f --tw 50 --th 50 tilt.#{lang} *.asc *.csv" | ||
|
||
export default -> | ||
for lang in langs | ||
exports[lang]() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-f witness.coffee *.ssv *.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters