Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python mode dropdown and block color #163

Open
wants to merge 337 commits into
base: text-paste
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
337 commits
Select commit Hold shift + click to select a range
cd44112
Merge pull request #144 from joshlory/get-from-text-location-zero
Bjvanminnen Feb 10, 2016
a667ebd
ability to scroll cursor to end of document
Bjvanminnen Feb 18, 2016
4189efe
choose whether to scroll blocks or text to end based on current mode
Bjvanminnen Feb 22, 2016
1b4b828
Merge pull request #146 from droplet-editor/scrollCursorToEndOfDocument
Bjvanminnen Feb 22, 2016
4ad64b5
@redrawMain() already calls @redrawHighlights()
Feb 27, 2016
eb2bbdb
Don't need to redraw the cursor canvas when redrawing highlights
Feb 27, 2016
d8aab2b
Lasso select and deselect only need to redraw the highlights canvas
Feb 27, 2016
5bb6f45
expansion callback called repeatedly during drag
cpirich Mar 3, 2016
c86fa8a
getClasses fix
cpirich Mar 3, 2016
860a907
add any-drop to expansion function blocks, pass block to expansion fu…
cpirich Mar 3, 2016
ce5d635
replace nil with null
cpirich Mar 3, 2016
a5bc7da
revert getClasses change for MemberExpression
cpirich Mar 4, 2016
e02ba9e
adjust palette block expansion test
cpirich Mar 4, 2016
805aae9
Merge pull request #147 from droplet-editor/expand_expansion
cpirich Mar 4, 2016
ec6ef74
add NEVER_PAREN to both sides of AssignmentExpression
cpirich Mar 8, 2016
3265357
Merge pull request #148 from droplet-editor/expand_expansion
cpirich Mar 8, 2016
8487cd1
Merge pull request #150 from joshlory/highlight-canvas-cleanup
Bjvanminnen Mar 18, 2016
287e6f1
Lock grunt-contrib-connect to the last version that supports npm 0.10
Mar 28, 2016
24a1aa4
Merge pull request #154 from joshlory/fix-travis
Mar 28, 2016
38972ed
Firefox doesn't have a global event object
Mar 29, 2016
7676099
Fix unit tests
Mar 29, 2016
086af90
Code review feedback: pass `isDebugMode` instead of `event`
Mar 29, 2016
0e92507
Merge pull request #151 from joshlory/firefox-global-event
Mar 30, 2016
f0fa89a
Redraw when an add- or subtract-button click is handled
Apr 6, 2016
8c10597
Merge pull request #155 from joshlory/button-redraw-main
Apr 6, 2016
e3f661e
expose changePaletteGroup method, allow groups to have ids
cpirich Apr 21, 2016
da2ea20
add comment before new method
cpirich Apr 21, 2016
bab414c
Merge pull request #156 from droplet-editor/changePalette
cpirich Apr 21, 2016
5fcb307
Merge branch 'master' into code-dot-org
cpirich May 6, 2016
1719143
support for JavaScript parameter buttons in function calls
cpirich May 10, 2016
57c91be
change how single line comment blocks are handled
cpirich May 10, 2016
5918397
allow param buttons on unknown functions, add minArgs, maxArgs options
cpirich May 11, 2016
7ffa893
sync package.json with master - fix html tests
cpirich May 11, 2016
6500437
automatically create param arrows if minArgs or maxArgs is present
cpirich May 11, 2016
0ce7abd
sync package.json with master - fix html tests
cpirich May 11, 2016
c376291
Merge pull request #157 from droplet-editor/JavaScript_parameter_buttons
cpirich May 11, 2016
25593c6
Bug fixes - properly parent text tokens, don't reparse comments, don'…
cpirich May 11, 2016
9138efa
merge code-dot-org
cpirich May 11, 2016
5867939
repair merge
cpirich May 11, 2016
91a8b51
Merge pull request #159 from droplet-editor/comment_changes
cpirich May 11, 2016
0fb00f1
paramButtons: respect lockZeroParamFunctions and only create buttons …
cpirich May 13, 2016
94b34f0
Merge pull request #160 from droplet-editor/param_buttons_improvements
cpirich May 13, 2016
2aa9b5a
allow objectDropdown in known.anyobj, allow changing socket in dropdo…
cpirich May 13, 2016
ed27c50
Merge pull request #161 from droplet-editor/objectDropdown_and_dropdo…
cpirich May 13, 2016
3ac4938
python mode dropdown menu and block color (WIP)
Jun 2, 2016
577f634
function names in modeOptions detected as block name, python mode demo
Jun 6, 2016
75d1b3e
Mark TODOs
dabbler0 Jun 13, 2016
b969147
Initial refactor for multiple sessions
dabbler0 Jun 13, 2016
43a49af
implement handleButton for extending if/elses
Jun 13, 2016
f7ddb4d
Make sessions bind to ace editor sessions
dabbler0 Jun 13, 2016
aec63bf
Remove extraneous log
dabbler0 Jun 13, 2016
91ad88f
Allow accepting ace editor as construction argument
dabbler0 Jun 13, 2016
10f9eb8
A couple bug fixes for ace initialization
dabbler0 Jun 13, 2016
6a6b04c
Merge pull request #129 from droplet-editor/code-dot-org
dabbler0 Jun 14, 2016
1894142
Palette wrapper prep for button
dabbler0 Jun 14, 2016
59ce0b0
Merge branch 'sessions' of github.com:droplet-editor/droplet into ses…
dabbler0 Jun 14, 2016
f251a80
Attach sessions to ace sessions
dabbler0 Jun 14, 2016
64e7b69
Merge branch 'sessions' of github.com:droplet-editor/droplet into ses…
dabbler0 Jun 14, 2016
cd69fd6
Typo
dabbler0 Jun 14, 2016
ff96f51
Fix live mode switch sessions
dabbler0 Jun 14, 2016
c5027b2
Fix tests theoretically?
dabbler0 Jun 14, 2016
3f68631
Add socket parse contexts to fix most live reparsing bugs
dabbler0 Jun 14, 2016
3f896ef
Support root-level #include and expression #defines
dabbler0 Jun 15, 2016
6475342
Color comments
dabbler0 Jun 15, 2016
39aaa9e
Add paren wrapping
dabbler0 Jun 15, 2016
5c367db
Implement paren rule system and add paren rules for math expressions
dabbler0 Jun 15, 2016
d25659b
Add live reparse contexts for Indents
dabbler0 Jun 15, 2016
502bb47
Bug fixes: contexts in cloning Sockets, @options.extraBottomHeight, p…
dabbler0 Jun 15, 2016
b1a05e6
Draft of comment-style directives
dabbler0 Jun 15, 2016
36b8dca
fix text-paste with the hiddenInput value not updating
Jun 16, 2016
caf926f
Finish pipeline for comment style directives
dabbler0 Jun 16, 2016
cbf1ffa
Fix parseContext of handwritten blocks
dabbler0 Jun 16, 2016
c46a6cb
Fix bugs with the new pipeline
dabbler0 Jun 16, 2016
fde7aa5
Fix all the tests
dabbler0 Jun 16, 2016
e55b3f4
New rule pipeline and fix lone indents
dabbler0 Jun 17, 2016
d724912
Make an attempt at grouping multiline comments
dabbler0 Jun 17, 2016
74407db
Fixed a nasty view bug
dabbler0 Jun 17, 2016
baa1e72
Fix SpecialMethodCall ambiguity
dabbler0 Jun 17, 2016
796e2f7
Clean up reparse() method to avoid locations problems. Note: breaks C…
dabbler0 Jun 17, 2016
6eef106
Fix scrollbar bug
dabbler0 Jun 20, 2016
165d4af
Fix droplet-main-scroller-intermediary css
dabbler0 Jun 20, 2016
414ed0b
Fix string fixer
dabbler0 Jun 20, 2016
09ce98d
Actually fix string fixer
dabbler0 Jun 20, 2016
a3fd4ed
Small color rule adjustment
dabbler0 Jun 20, 2016
171c7b5
Fix tests
dabbler0 Jun 20, 2016
01d659d
Indent droppability rules
dabbler0 Jun 20, 2016
50532c3
Fix to reparse context necessitated by indent parse contexts
dabbler0 Jun 20, 2016
252ddab
Fix drop rules to avoid ambiguities with parens
dabbler0 Jun 20, 2016
50d0cc7
Add test for sessions
dabbler0 Jun 20, 2016
7056bb9
Add test for absorbCache() bug and fix other absorbCache() bug
dabbler0 Jun 20, 2016
ba848d1
Refactor quotes and round-trip empty indents
dabbler0 Jun 20, 2016
b245def
Fix a bug with that empty-indent thing
dabbler0 Jun 20, 2016
34fa5a6
Add empty string and options for including them or not
dabbler0 Jun 21, 2016
706429c
Add extra pipeline options for preserving empty sockets on round-trip…
dabbler0 Jun 21, 2016
da34cc0
Forbid melting if it would destroy sockets
dabbler0 Jun 21, 2016
f90e104
Fix bug
dabbler0 Jun 21, 2016
40cdce6
Fix test
dabbler0 Jun 21, 2016
9f56434
Add, and fix for, ANTLR reparse rule test. Note: breaks other ANTLR g…
dabbler0 Jun 21, 2016
884fc7c
Better droppability for lists
dabbler0 Jun 21, 2016
6b3c0a7
Classes for empty lines
dabbler0 Jun 21, 2016
c4418ce
Remove extraneous check
dabbler0 Jun 22, 2016
04abf25
Update README
dabbler0 Jun 22, 2016
ba81286
Whoops add commas
dabbler0 Jun 22, 2016
9880b7e
Add and fix for droppability rule stress test
dabbler0 Jun 22, 2016
f13407c
Add C freeze test
dabbler0 Jun 23, 2016
d7b0636
Add comment consolidation freeze test
dabbler0 Jun 23, 2016
918030a
Add paren test for C
dabbler0 Jun 23, 2016
0dbf643
Add freeze populator code to tests
dabbler0 Jun 23, 2016
582bdd3
Add freeze populator code to tests
dabbler0 Jun 23, 2016
e06d213
Preliminary merge.
dabbler0 Jun 23, 2016
693fcd9
Fix some of the conflict-induced errors in the merge
dabbler0 Jun 23, 2016
fe72513
Some more bug fixes
dabbler0 Jun 24, 2016
413c703
To the point where the controller can render
dabbler0 Jun 24, 2016
3fed59a
Fix old weird bevel bug yay
dabbler0 Jun 24, 2016
7565061
Fix floating blocks and lasso select style
dabbler0 Jun 24, 2016
76f8d8c
Fix some of the tests
dabbler0 Jun 24, 2016
8de21a8
Fix all the tests
dabbler0 Jun 27, 2016
935cb77
Some cleanup
dabbler0 Jul 5, 2016
fc7e80d
Fix dropdowns
dabbler0 Jul 5, 2016
31e497a
Actually fix all the tests.
dabbler0 Jul 5, 2016
1124dc4
Add some comments on modifications to the C ANTLR grammar
dabbler0 Jul 5, 2016
72cceae
Some C mode cleanup
dabbler0 Jul 5, 2016
c68bb99
Some documentation
dabbler0 Jul 5, 2016
77a1b24
Some documentation
dabbler0 Jul 5, 2016
87f013b
Some C mode cleanup
dabbler0 Jul 5, 2016
4bf6952
Add some comments on modifications to the C ANTLR grammar
dabbler0 Jul 5, 2016
402e6aa
Some more documentation
dabbler0 Jul 5, 2016
9e6c609
Fix typo
dabbler0 Jul 5, 2016
3bbeb2f
Fix anothertypo
dabbler0 Jul 5, 2016
4e204cf
Whoops, restore old C shape rules
dabbler0 Jul 5, 2016
4f4eab3
Merge
dabbler0 Jul 5, 2016
6328f88
Fix merge bug
dabbler0 Jul 5, 2016
0893854
Fix highlight focus bug
dabbler0 Jul 6, 2016
6c0ba4f
Fix socket highlight areas for large paddings
dabbler0 Jul 6, 2016
705aa62
C if/elseif/else amalgamation
dabbler0 Jul 6, 2016
5bab63f
Fix canvas-clearing bug with session switches
dabbler0 Jul 6, 2016
cef7055
Merge pull request #169 from droplet-editor/c_support
davidbau Jul 6, 2016
d40cb99
FIx some small visual bugs
dabbler0 Jul 6, 2016
14cb6a4
Fix visual bug with cursor
dabbler0 Jul 6, 2016
0935880
Merge branch 'svg-grouping' into c_if_else
dabbler0 Jul 6, 2016
d4e5fcf
Add pipeline for mutation buttons
dabbler0 Jul 6, 2016
d129f15
Remove extraneous debug
dabbler0 Jul 6, 2016
5c31bff
Symmetric braces
dabbler0 Jul 7, 2016
af440bf
Remove extraneous debug
dabbler0 Jul 7, 2016
c3ee2d1
Merge branch 'master' into svg-grouping
dabbler0 Jul 7, 2016
2e9ee4a
Fix socketing typo bug
dabbler0 Jul 7, 2016
a4b3031
Merge branch 'master' into svg-grouping
dabbler0 Jul 7, 2016
e4bf847
Center text vertically
dabbler0 Jul 7, 2016
a9ac0a3
Add color defaults
dabbler0 Jul 7, 2016
2f01fdb
Semicolon adaption
dabbler0 Jul 7, 2016
492c4b3
Fix rememberedSocket indexing error when floating blocks are deleted
dabbler0 Jul 8, 2016
7da9544
Fix rememberedSocket indexing error when floating blocks are deleted
dabbler0 Jul 8, 2016
08959e3
Add color defaults
dabbler0 Jul 7, 2016
9a9c25c
Absorb quotes into #include
dabbler0 Jul 8, 2016
bb1f611
Merge
dabbler0 Jul 8, 2016
2b8a23e
Merge
dabbler0 Jul 8, 2016
f035c68
Fix empty indent problem
dabbler0 Jul 8, 2016
e6fcb62
Add color rule for equality
dabbler0 Jul 8, 2016
da5962d
Merge branch 'master' into svg-grouping
dabbler0 Jul 8, 2016
620dce1
Fix bug with top-left corner beveling interacting with dedupe()
dabbler0 Jul 8, 2016
514da5d
Small thing with the top nubby for puzzle-piece fit
dabbler0 Jul 8, 2016
f656832
Don't allow dropping on the empty main tree if it's not allowed.
dabbler0 Jul 8, 2016
58057d5
Merge
dabbler0 Jul 8, 2016
59279a1
Crucial treewalker bug fixes
dabbler0 Jul 8, 2016
ee87610
Merge branch 'master' into svg-grouping
dabbler0 Jul 8, 2016
efb5929
Fix new tests
dabbler0 Jul 8, 2016
7f53a8b
Merge branch 'master' into svg-grouping
dabbler0 Jul 8, 2016
8e94445
Fix stylesheet for inclusion in non-absolute pages
dabbler0 Jul 8, 2016
1eadb69
Parse contexts for documents
dabbler0 Jul 8, 2016
9aad4e6
Css change for phantomJS needed apparently
dabbler0 Jul 11, 2016
287b303
Fix for tests
dabbler0 Jul 11, 2016
bfa7674
Add necessary annotation pipeline
dabbler0 Jul 11, 2016
cd4577a
Fix tests
dabbler0 Jul 11, 2016
01118e6
Merge pull request #175 from droplet-editor/clamped-bottom
dabbler0 Jul 11, 2016
04eecb4
Merge branch 'svg-grouping' into c_if_else
dabbler0 Jul 11, 2016
38600de
Merge
dabbler0 Jul 11, 2016
89a6a25
Expand out test data so git diffs work well in the future
dabbler0 Jul 11, 2016
ee1175a
Merge branch 'svg-grouping' of github.com:droplet-editor/droplet into…
dabbler0 Jul 11, 2016
e56c1f0
Merge again
dabbler0 Jul 11, 2016
05d6a78
Merge branch 'svg-grouping' into c_if_else
dabbler0 Jul 11, 2016
1c9afed
Add +/- buttons for functions and plumbing for potentially paren unwr…
dabbler0 Jul 11, 2016
cdc38cc
+/- buttons for declarator lists
dabbler0 Jul 11, 2016
6dbf7a9
Initializers and comma expressions
dabbler0 Jul 11, 2016
3f8d44d
Add button for if even when no else
dabbler0 Jul 11, 2016
fe888f2
Allow flexible button config
dabbler0 Jul 11, 2016
cfad85f
+/- buttons for functions
dabbler0 Jul 11, 2016
dc39662
Subtract button for if/else, and vertical glyphs
dabbler0 Jul 11, 2016
a6f87c8
Usability improvements, and dual buttons for declarations
dabbler0 Jul 12, 2016
809a104
Fix a bug with dragging mutation buttons
dabbler0 Jul 12, 2016
7778591
Undo capture for mutation buttons
dabbler0 Jul 12, 2016
df0617a
Move from parse annotations to droplet tree inspection for +/- buttons
dabbler0 Jul 12, 2016
d5228dd
Move more to structure examination
dabbler0 Jul 12, 2016
e9ba713
Move back to parsing for declarations to fix a bug
dabbler0 Jul 12, 2016
f4a7506
View socket bug fix
dabbler0 Jul 12, 2016
67056a2
Center glyphs in buttons
dabbler0 Jul 12, 2016
f1a097b
python mode adaptation to the updated tree walker (WIP)
Jul 13, 2016
c1b7a16
Merge branch 'master' of https://github.com/droplet-editor/droplet in…
Jul 13, 2016
8689eea
python block drop encourage/discourage at document level (WIP)
Jul 13, 2016
44f27de
Merge pull request #173 from droplet-editor/include-quotes
dabbler0 Jul 13, 2016
9feb227
Fix css as needed for tests
dabbler0 Jul 13, 2016
43430de
Merge pull request #180 from droplet-editor/floating-parse-context
dabbler0 Jul 13, 2016
3642c4f
Create test for semicolon adaptation
dabbler0 Jul 13, 2016
2812045
Make undo stack test (rememberedSocket TODO)
dabbler0 Jul 13, 2016
973df66
Add rememberedSocket to test
dabbler0 Jul 13, 2016
61c1572
Merge pull request #183 from droplet-editor/floating-remembered-socke…
dabbler0 Jul 13, 2016
228e5f1
Merge pull request #177 from droplet-editor/semicolon-adaptation
dabbler0 Jul 13, 2016
42cd6ec
Merge with upstream
dabbler0 Jul 13, 2016
1ec6e1e
python mode block drop to/from indent issue
Jul 13, 2016
8d699f3
Merge branch 'master' of https://github.com/droplet-editor/droplet in…
Jul 13, 2016
4af0832
Remove extraneous file?
dabbler0 Jul 14, 2016
97c37e4
Move to new architecture for droppability rules and shapes
dabbler0 Jul 14, 2016
cc52ddf
Fix bug where you can't drag something if it matches the context exactly
dabbler0 Jul 14, 2016
2d4cc64
Add parenthesis rules
dabbler0 Jul 14, 2016
c997d11
Rewrite parser priorities for sizeof() to avoid weird paren case and …
dabbler0 Jul 14, 2016
6faf556
Flesh out enough more colors that the palette works
dabbler0 Jul 14, 2016
0f4bd2d
Add node contexts for paren-unwrapping purposes
dabbler0 Jul 15, 2016
e6e6d9f
Fix nodeContext annotations for trailingText
dabbler0 Jul 15, 2016
c8f26ee
I actually don't know what changed
dabbler0 Jul 15, 2016
c28dc85
Update build to report errors
dabbler0 Jul 15, 2016
5972ee5
Move JavaScript to the new infrastructure, for the most part
dabbler0 Jul 18, 2016
1281efb
Move CoffeeScript over to new infrastructure as well for the most part
dabbler0 Jul 18, 2016
0fd6abe
Handle buttons and such
dabbler0 Jul 18, 2016
8cb7f3f
Fix all tests but one, which requires new infrastructure
dabbler0 Jul 18, 2016
73a376a
Clean up reparsing
dabbler0 Jul 19, 2016
ef83eab
Clean up error handling
dabbler0 Jul 19, 2016
68e639e
Fix all the tests for the new serialization method
dabbler0 Jul 19, 2016
4f4900d
Merge pull request #184 from droplet-editor/svg-grouping
dabbler0 Jul 19, 2016
bc81625
Merge upstream
dabbler0 Jul 19, 2016
395a7e6
Oops, finish merging
dabbler0 Jul 19, 2016
b2a6aff
Add necessary droppability graph file
dabbler0 Jul 19, 2016
a9838c3
Fix coffee precedences
dabbler0 Jul 19, 2016
b08dc64
Fix the rest of the tests
dabbler0 Jul 19, 2016
f4004af
Fix typo
dabbler0 Jul 19, 2016
8fe78ce
Merge
dabbler0 Jul 19, 2016
0e23a77
Fix some merge conflicts and a typo
dabbler0 Jul 19, 2016
883ec5e
Fix tests for phantomjs
dabbler0 Jul 19, 2016
008f00d
Fix for tests
dabbler0 Jul 19, 2016
25cd0ce
Merge branch 'master' of https://github.com/droplet-editor/droplet in…
Jul 20, 2016
7f6bed0
Add some additional tests exercising the new rules
dabbler0 Jul 20, 2016
74acf89
Merge branch 'graph-based-droppability' into container-buttons
dabbler0 Jul 20, 2016
6dee597
Fix visual bug with buttons disappearing sometimes
dabbler0 Jul 20, 2016
6d26d59
Don't put an add button on struct declarations
dabbler0 Jul 20, 2016
4a84d0f
python mode basic tests; demo page minor bug fixed
Jul 20, 2016
7a14256
Allow type changing during block reparsing
dabbler0 Jul 21, 2016
012eeee
typo fixed
Jul 25, 2016
8db958a
tweaks to the treewalker (fixes the C mode unit tests)
Jul 25, 2016
1d6482f
Merge branch 'container-buttons' of https://github.com/droplet-editor…
Aug 8, 2016
f3941bd
adapting python mode to the container-buttons branch
Aug 8, 2016
e0d08ff
python mode: tests fixed, subtract button, pass stmt not working yet
Aug 17, 2016
ce34e2d
dropdown menu arrow icon color fixed
Aug 17, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ browserify = require 'browserify'
coffeeify = require 'coffeeify'
watchify = require 'watchify'


livereload = require 'tiny-lr'

path = require 'path'
fs = require 'fs'

if process.env.LANGUAGE
ignoredLanguages = ["./src/languages/!(#{process.env.LANGUAGE}).coffee"]

serveNoDottedFiles = (connect, options, middlewares) ->
# Avoid leaking .git/.svn or other dotted files from test servers.
middlewares.unshift (req, res, next) ->
Expand Down Expand Up @@ -68,13 +72,14 @@ module.exports = (grunt) ->
reporter: 'list'
compilers:
'coffee': 'coffee-script/register'
timeout: 10000
timeout: 20000

browserify:
build:
files:
'dist/droplet-full.js': ['./src/main.coffee']
options:
ignore: ignoredLanguages
transform: ['coffeeify']
browserifyOptions:
standalone: 'droplet'
Expand All @@ -89,11 +94,13 @@ module.exports = (grunt) ->
'''
test:
files:
'test/js/ctest.js': ['test/src/ctest.coffee']
'test/js/tests.js': ['test/src/tests.coffee']
'test/js/uitest.js': ['test/src/uitest.coffee']
'test/js/jstest.js': ['test/src/jstest.coffee']
'test/js/cstest.js': ['test/src/cstest.coffee']
'test/js/htmltest.js': ['test/src/htmltest.coffee']
'test/js/pytest.js': ['test/src/pytest.coffee']
options:
transform: ['coffeeify']
browserifyOptions:
Expand Down Expand Up @@ -188,7 +195,9 @@ module.exports = (grunt) ->
b.require './src/main.coffee'
b.transform coffeeify

w = watchify(b)
w = watchify(b, {
poll: true
})

# Compile once through first
stream = fs.createWriteStream 'dist/droplet-full.js'
Expand All @@ -205,17 +214,20 @@ module.exports = (grunt) ->
w.on 'update', ->
console.log 'File changed...'
stream = fs.createWriteStream 'dist/droplet-full.js'
try
w.bundle().pipe stream
stream.once 'close', ->
console.log 'Rebuilt.'
lrserver.changed {
body: {
files: ['dist/droplet-full.js']
}

w.bundle().on('error', (e) ->
console.log 'ERROR'
console.log '-----'
console.log e
).pipe(stream).once 'close', ->
console.log 'Rebuilt.'
lrserver.changed {
body: {
files: ['dist/droplet-full.js']
}
catch e
console.log 'BUILD FAILED.'
console.log e.stack
}


grunt.loadNpmTasks 'grunt-keepalive'
grunt.registerTask 'testserver', ['connect:testserver', 'watchify']
grunt.registerTask 'serve', ['connect:testserver', 'keepalive']
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,32 @@ MyParser.handleButton = (text, command, block) ->
# Return 'text' is you don't want to change anything
return text
```

View Options
------------
You can pass a `viewSettings` object into the options to configure various aspects of the renderer.

```javascript
{
viewSettings: {
padding: 5, // Padding around each block
indentWidth: 20, // Width of the left side of indent C-shaped blocks
indentTongueHeight: 20, // Height of the bottom of indent C-shaped blocks when there is no other text on that bottom line (used mainly in Python/Coffee modes)
tabOffset: 10, // Distance from the left side of the puzzle-piece tab to the left side of the block
tabWidth: 15, // Width of the bottom of the tab (from top point to top point)
tabHeight: 4, // Height of the tab
tabSideWidth: 1, / 4 // Fraction the width that is taken up by the sides of the tab (larger means flatter/fatter slanted sides)
emptySocketWidth: 20, // Size of a socket with no text in it
emptyLineHeight: 25, // Height of a line with no blocks on it
shadowBlur: 5, // Blur factor for the drop shadow when dragging
colors: { // Color aliases used in various places elsewhere; changing these will change lots of colors
error: '#ff0000',
comment: '#c0c0c0', // currently grayish
return: '#fff59d', // currently yellowish
control: '#ffcc80', // currently orangeish
value: '#a5d6a7', // currently greenish
command: '#90caf9' // currently blueish
}
}
}
```
Loading