Skip to content

Commit

Permalink
Basic Maketile support (#99)
Browse files Browse the repository at this point in the history
* `filename.args` adds arguments to command line, parsed like a shell
* `Maketile.args` loaded automatically if no other files
* Rudamentary `Maketile.coffee` and `Maketile.js` autoloading
  (but no API support yet)
  • Loading branch information
edemaine committed Oct 14, 2022
1 parent 627de5c commit b65cc17
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 59 deletions.
1 change: 1 addition & 0 deletions examples/auto/Maketile.args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-f error.coffee auto.txt grid.asc
20 changes: 20 additions & 0 deletions examples/test/Maketile.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-f # force rebuild

## Run 'at' example with and without --uneven option
( at.coffee at.asc )
( '--uneven' at.coffee at.asc ) # ''s just to test that ''s work

( context.coffee context.asc )

( escape.txt escape.csv )

( css-escape.css css-escape.txt css-escape.asc )

( mapping.coffee mapping.ssv )
( mappings.coffee -O mappings mapping.ssv )

( set.coffee set.asc )

## Test )'s ability to reset share object
( ( share-provider.js share-user.js ) share-undefined.js )
( ( -s data=Success! share-user.js ) share-undefined.js )
6 changes: 4 additions & 2 deletions examples/test/at.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
keepUneven = svgtiler.getSettings().keepUneven
console.log 'Testing with --uneven =', keepUneven
keepUneven = null
svgtiler.onInit ->
keepUneven = svgtiler.getSettings().keepUneven
console.log 'Testing with --uneven =', keepUneven

->
console.assert undefined == @at(0, -4).key == @at(0, -5).key, 'row -1'
Expand Down
10 changes: 6 additions & 4 deletions examples/test/share-undefined.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
if (share.data == null)
console.log('Success!!');
else
console.log('FAILURE!!');
svgtiler.onInit(() => {
if (share.data == null)
console.log('Success!!');
else
console.log('FAILURE!!');
});
4 changes: 3 additions & 1 deletion examples/test/share-user.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
console.log(share.data);
svgtiler.onInit(() => {
console.log(share.data);
});
1 change: 1 addition & 0 deletions examples/unicode/Maketile.args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-f maze.txt maze.asc
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"babel-plugin-module-deps": "0.1.1",
"coffeescript": "2.7.0",
"csv-parse": "5.0.4",
"glob": "8.0.3",
"grapheme-splitter": "1.0.4",
"image-size": "1.0.1",
"pirates": "4.0.5",
Expand Down
Loading

0 comments on commit b65cc17

Please sign in to comment.