mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-13 16:57:54 -05:00
* Build both a legacy and modern browser compiler * Dynamic import example and documentation * Update the docs to use the modern browser compiler if the browser supports it * Update policy regarding Stage 3 features * This never made sense, and assigning a string to index 0 *of a string* throws in Module mode (and silently does nothing in Script mode) so remove this unneeded code that throws when compiling `fn for i from from iterable` in Module mode * Have browser-based tests use the ES module version if supported * Simplify building logic * Update output * For the ES module version of the browser compiler, don't automatically attach the runScripts event handler * Consistent comments * Fix comment
11 lines
284 B
CoffeeScript
11 lines
284 B
CoffeeScript
# Your browser must support dynamic import to run this example.
|
|
|
|
do ->
|
|
{ run } = await import('./browser-compiler-modern/coffeescript.js')
|
|
run '''
|
|
if 5 < new Date().getHours() < 9
|
|
alert 'Time to make the coffee!'
|
|
else
|
|
alert 'Time to get some work done.'
|
|
'''
|