exports[key] = val for key, val of require './coffee-script'
├── .gitignore ├── .nojekyll ├── CONTRIBUTING.md ├── Cakefile ├── JSX_TODO ├── LICENSE ├── README.md ├── bin ├── cake └── coffee ├── bower.json ├── docs ├── CNAME ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── apple-touch-icon.png ├── browserconfig.xml ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── index.html ├── jsxy │ └── index.html ├── manifest.json ├── mstile-150x150.png ├── safari-pinned-tab.svg ├── v1 │ ├── annotated-source │ │ ├── browser.html │ │ ├── cake.html │ │ ├── coffee-script.html │ │ ├── command.html │ │ ├── docco.css │ │ ├── grammar.html │ │ ├── helpers.html │ │ ├── index.html │ │ ├── lexer.html │ │ ├── nodes.html │ │ ├── optparse.html │ │ ├── public │ │ │ ├── fonts │ │ │ │ ├── aller-bold.eot │ │ │ │ ├── aller-bold.ttf │ │ │ │ ├── aller-bold.woff │ │ │ │ ├── aller-light.eot │ │ │ │ ├── aller-light.ttf │ │ │ │ ├── aller-light.woff │ │ │ │ ├── roboto-black.eot │ │ │ │ ├── roboto-black.ttf │ │ │ │ └── roboto-black.woff │ │ │ └── stylesheets │ │ │ │ └── normalize.css │ │ ├── register.html │ │ ├── repl.html │ │ ├── rewriter.html │ │ ├── scope.html │ │ └── sourcemap.html │ ├── browser-compiler │ │ └── coffee-script.js │ ├── index.html │ └── test.html └── v2 │ ├── annotated-source │ ├── browser.html │ ├── cake.html │ ├── coffeescript.html │ ├── command.html │ ├── docco.css │ ├── grammar.html │ ├── helpers.html │ ├── index.html │ ├── lexer.html │ ├── nodes.html │ ├── optparse.html │ ├── public │ │ ├── fonts │ │ │ ├── aller-bold.eot │ │ │ ├── aller-bold.ttf │ │ │ ├── aller-bold.woff │ │ │ ├── aller-light.eot │ │ │ ├── aller-light.ttf │ │ │ ├── aller-light.woff │ │ │ ├── roboto-black.eot │ │ │ ├── roboto-black.ttf │ │ │ └── roboto-black.woff │ │ └── stylesheets │ │ │ └── normalize.css │ ├── register.html │ ├── repl.html │ ├── rewriter.html │ ├── scope.html │ └── sourcemap.html │ ├── browser-compiler │ └── coffeescript.js │ ├── index.html │ └── test.html ├── documentation ├── examples │ ├── aliases.coffee │ ├── array_comprehensions.coffee │ ├── array_spread.coffee │ ├── async.coffee │ ├── breaking_change_bound_generator_function.coffee │ ├── breaking_change_destructuring_default_values.coffee │ ├── breaking_change_fat_arrow.coffee │ ├── breaking_change_function_parameter_default_values.coffee │ ├── breaking_change_super_in_non-class_methods_refactor_with_apply.coffee │ ├── breaking_change_super_in_non-class_methods_refactor_with_class.coffee │ ├── breaking_change_super_with_arguments.coffee │ ├── breaking_change_super_without_arguments.coffee │ ├── cake_tasks.coffee │ ├── chaining.coffee │ ├── classes.coffee │ ├── comment.coffee │ ├── comparisons.coffee │ ├── conditionals.coffee │ ├── constructor_destructuring.coffee │ ├── default_args.coffee │ ├── do.coffee │ ├── embedded.coffee │ ├── embedded_block.coffee │ ├── embedded_escaped.coffee │ ├── existence.coffee │ ├── existence_declared.coffee │ ├── existence_undeclared.coffee │ ├── expansion.coffee │ ├── expressions.coffee │ ├── expressions_assignment.coffee │ ├── expressions_comprehension.coffee │ ├── expressions_try.coffee │ ├── fat_arrow.coffee │ ├── functions.coffee │ ├── generator_iteration.coffee │ ├── generators.coffee │ ├── get_set.coffee │ ├── heredocs.coffee │ ├── heregexes.coffee │ ├── interpolation.coffee │ ├── jsx.coffee │ ├── jsxy_attributes.coffee │ ├── jsxy_capitalized_class_name.coffee │ ├── jsxy_dereference_noncapitalized_component_name.coffee │ ├── jsxy_dotted_element_name.coffee │ ├── jsxy_dynamic_class_names.coffee │ ├── jsxy_elements.coffee │ ├── jsxy_else.coffee │ ├── jsxy_expressions.coffee │ ├── jsxy_filters.coffee │ ├── jsxy_for.coffee │ ├── jsxy_if.coffee │ ├── jsxy_leading_dot_class_vs_chain.coffee │ ├── jsxy_nested_elements.coffee │ ├── jsxy_postfix_for.coffee │ ├── jsxy_postfix_if.coffee │ ├── jsxy_shorthand_elements.coffee │ ├── jsxy_switch.coffee │ ├── jsxy_text_content.coffee │ ├── jsxy_unless.coffee │ ├── jsxy_whitespace_operator.coffee │ ├── modules.coffee │ ├── modulo.coffee │ ├── multiple_return_values.coffee │ ├── object_comprehensions.coffee │ ├── object_extraction.coffee │ ├── object_spread.coffee │ ├── objects_and_arrays.coffee │ ├── objects_reserved.coffee │ ├── objects_shorthand.coffee │ ├── overview.coffee │ ├── parallel_assignment.coffee │ ├── patterns_and_splats.coffee │ ├── prototypes.coffee │ ├── range_comprehensions.coffee │ ├── scope.coffee │ ├── slices.coffee │ ├── soaks.coffee │ ├── splats.coffee │ ├── splices.coffee │ ├── static.coffee │ ├── strings.coffee │ ├── switch.coffee │ ├── switch_with_no_expression.coffee │ ├── tagged_template_literals.coffee │ ├── try.coffee │ ├── type_annotations.coffee │ └── while.coffee ├── images │ ├── icon.svg │ └── logo.svg ├── index.html ├── index_jsxy.html ├── jsxy │ └── code.coffee ├── sections │ ├── annotated_source.md │ ├── async_functions.md │ ├── books.md │ ├── breaking_change_fat_arrow.md │ ├── breaking_changes.md │ ├── breaking_changes_argument_parsing_and_shebang_lines.md │ ├── breaking_changes_bound_generator_functions.md │ ├── breaking_changes_classes.md │ ├── breaking_changes_default_values.md │ ├── breaking_changes_jsx_and_the_less_than_and_greater_than_operators.md │ ├── breaking_changes_literate_coffeescript.md │ ├── breaking_changes_super_extends.md │ ├── cake.md │ ├── chaining.md │ ├── changelog.md │ ├── chat.md │ ├── classes.md │ ├── coffeescript_2.md │ ├── command_line_interface.md │ ├── comments.md │ ├── comparisons.md │ ├── conditionals.md │ ├── contributing.md │ ├── destructuring.md │ ├── embedded.md │ ├── es2015plus_output.md │ ├── examples.md │ ├── existential_operator.md │ ├── expressions.md │ ├── fat_arrow.md │ ├── functions.md │ ├── generators.md │ ├── heregexes.md │ ├── installation.md │ ├── introduction.md │ ├── jsx.md │ ├── jsxy.md │ ├── language.md │ ├── lexical_scope.md │ ├── literate.md │ ├── loops.md │ ├── modules.md │ ├── nodejs_usage.md │ ├── objects_and_arrays.md │ ├── operators.md │ ├── overview.md │ ├── prototypal_inheritance.md │ ├── resources.md │ ├── screencasts.md │ ├── scripts.md │ ├── slices.md │ ├── source_maps.md │ ├── splats.md │ ├── strings.md │ ├── switch.md │ ├── tagged_template_literals.md │ ├── test.md │ ├── try.md │ ├── type_annotations.md │ ├── unsupported.md │ ├── unsupported_get_set.md │ ├── unsupported_let_const.md │ ├── unsupported_named_functions.md │ └── usage.md ├── test.html ├── v1 │ ├── body.html │ ├── body_jsxy.html │ ├── code.coffee │ ├── docs.coffee │ ├── docs.css │ ├── scripts.html │ ├── styles.html │ └── tomorrow.css └── v2 │ ├── body.html │ ├── code.coffee │ ├── code.html │ ├── docs.coffee │ ├── docs.css │ ├── navbar.html │ ├── scripts.html │ ├── sidebar.html │ ├── styles.html │ ├── try.html │ └── twilight.css ├── jsx_examples ├── greeting.coffee ├── mailbox.coffee ├── name_form.coffee ├── table_items.coffee └── toggle.coffee ├── lib └── coffeescript │ ├── browser.js │ ├── cake.js │ ├── coffeescript.js │ ├── command.js │ ├── grammar.js │ ├── helpers.js │ ├── index.js │ ├── lexer.js │ ├── nodes.js │ ├── optparse.js │ ├── parser.js │ ├── register.js │ ├── repl.js │ ├── rewriter.js │ ├── scope.js │ └── sourcemap.js ├── package-lock.json ├── package.json ├── register.js ├── repl.js ├── src ├── browser.coffee ├── cake.coffee ├── coffeescript.coffee ├── command.coffee ├── grammar.coffee ├── helpers.coffee ├── index.coffee ├── lexer.coffee ├── nodes.coffee ├── optparse.coffee ├── register.coffee ├── repl.coffee ├── rewriter.coffee ├── scope.litcoffee └── sourcemap.litcoffee └── test ├── argument_parsing.coffee ├── arrays.coffee ├── assignment.coffee ├── async.coffee ├── booleans.coffee ├── classes.coffee ├── cluster.coffee ├── comments.coffee ├── compilation.coffee ├── comprehensions.coffee ├── control_flow.coffee ├── error_messages.coffee ├── eval.coffee ├── exception_handling.coffee ├── formatting.coffee ├── function_invocation.coffee ├── functions.coffee ├── generators.coffee ├── helpers.coffee ├── importing.coffee ├── importing ├── .coffee ├── .coffee.md ├── .import.coffee ├── .import.coffee.md ├── .import2 ├── import.coffee ├── import.coffee.md ├── import.extension.coffee ├── import.extension.coffee.md ├── import.extension.js ├── import.js ├── import.litcoffee ├── import.unknownextension ├── import2 ├── index.coffee.md ├── shebang.coffee ├── shebang_extra_args.coffee ├── shebang_initial_space.coffee └── shebang_initial_space_extra_args.coffee ├── interpolation.coffee ├── invocation_argument_parsing.coffee ├── javascript_literals.coffee ├── jsx.coffee ├── literate.litcoffee ├── literate_tabbed.litcoffee ├── location.coffee ├── modules.coffee ├── numbers.coffee ├── objects.coffee ├── operators.coffee ├── option_parser.coffee ├── parser.coffee ├── ranges.coffee ├── regexps.coffee ├── repl.coffee ├── scope.coffee ├── slicing_and_splicing.coffee ├── soaks.coffee ├── sourcemap.coffee ├── strict.coffee ├── strings.coffee ├── support └── helpers.coffee └── tagged_template_literals.coffee /.gitignore: -------------------------------------------------------------------------------- 1 | raw 2 | presentation 3 | test.coffee 4 | test*.coffee 5 | test.litcoffee 6 | test*.litcoffee 7 | test/*.js 8 | parser.output 9 | /node_modules 10 | npm-debug.log* 11 | yarn.lock 12 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helixbass/coffeescript-jsxy/f2dd087810f5823b4fd626f6d5cde66ece44f10c/.nojekyll -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to contribute to CoffeeScript 2 | 3 | * Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffeescript/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. 4 | 5 | * Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffeescript/tree/master/test). 6 | 7 | * Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffeescript/tree/master/src). If you’re just getting started with CoffeeScript, there’s a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide). 8 | 9 | * In your pull request, do not add documentation to `index.html` or re-build the minified `coffeescript.js` file. We’ll do those things before cutting a new release. You _should,_ however, commit the updated compiled JavaScript files in `lib`. -------------------------------------------------------------------------------- /JSX_TODO: -------------------------------------------------------------------------------- 1 | - allow interpolated string attribute values eg %h1( id="recipe-#{ x }" ) 2 | - allow simple unquoted attribute values eg %p( key=i ) (or is this confusing/not preferable to HTML allowing unquoted attribute values?) 3 | - handle inline element (with or without body?) followed by indent eg: 4 | if isSomething %abc 5 | x 6 | - refine attribute error reporting so that eg %h1( x=[abc] ) will specifically tell you the attribute value is what's wrong 7 | - refactor attribute value nested lexing to share code with matchWithInterpolations() 8 | - compile empty element to eg instead of ? is there a semantic difference to JSX and/or HTML? 9 | - className and other attribute-name translations (automatically camelCase, that's what JSX wants?) 10 | - allow line-ending inline comments after inline elements eg %h1 # this is an h1 tag 11 | - allow normal Coffeescript (line) comments inside (indented) element body 12 | - support object spread operator (pre and post ...'s?) in all 3 types of attributes 13 | - handle no-value attributes in () and <> attributes (implicit value is true?) 14 | - support haml-style nested object attributes? eg ng: { click: ... } - or is that ambiguous w/ possible object-literal value of top-level attribute? 15 | - handle comments inside object attributes? 16 | - don't wrap string literal object attribute values in braces eg %h1{ a: 'b' } >>
Loader for CoffeeScript as a Node.js library.
119 | 120 |exports[key] = val for key, val of require './coffee-script'
#{hljs.highlight('coffeescript', cs).value}
"
24 | # jshtml = "#{hljs.highlight('javascript', js).value}
"
25 | cshtml = "#{escapeHtml cs}
"
26 | jshtml = "#{escapeHtml js}
"
27 | # append = if executable is yes then '' else "alert(#{executable});".replace /"/g, '"'
28 | # if executable and executable isnt yes
29 | # cs.replace /(\S)\s*\Z/m, "$1\n\nalert #{executable}"
30 | # run = if executable is yes then 'run' else "run: #{executable}"
31 | # name = "example#{counter}"
32 | # script = ""
33 | # load = if showLoad then " " else ''
34 | # button = if executable then """ """ else ''
35 | "