* Correct tagged template literal test.
Should use Coffeescript form of interpolated
strings, not Javascript!
* First pass at docs for tagged template literals.
* Correct alerted variable.
* Add note re checking runtime for tagged template literals
* Fixed broken example.
* Consistent style
* Clarify that CoffeeScript isn’t handling the tagged template literal, the runtime is; fix CoffeeScript spelling
* Collapse notes about generator functions and tagged template literals into the same sentence
* Make tagged template literals example into a function
* Make text less clunky.
* More clarity on what CoffeeScript is doing versus what the runtime is doing, and emphasize runtimes vs Babel/Traceur
* Documentation of `for...from` for iterating over generator functions
* Add note that the CoffeeScript compiler does not, in fact, generate JavaScript that runs in every JavaScript runtime 😢
* Docs shorthand object notation
A simple but slightly more imaginative example of shorthand object notation.
Closes#1808.
Signed-off-by: Daniel Bayley <daniel.bayley@me.com>
* Update for new documentation folder structure
* Fix typo
* The generated JavaScript for the examples in the docs ends up within index.html, so we don’t need the intermediate generated .js files committed in the repo; also, even while .gitignored they should be under `docs`, with the rest of the generated files, not under `documentation`, where the source files are.
* Add “Existential Operator” to the table of contents. Closes#4361
* Updated output due to newer version of highlight.js
* Generated the JavaScript for the docs examples should be synchronous, so that index.html isn’t generated before the JavaScript is
* In “Try CoffeeScript,” if you press the tab key it should type a tab character. Closes#3342.
* Rename doc example folders from `js` and `coffee` to just `examples`
* Add missing `yield` to the list of keywords to highlight until highlight.js catches up; update the class used to match highlight.js’ `keyword`
* `cake doc:site` should watch the example files too, not just index.html.js
* Remove examples folder, including underscore.coffee; remove link to annotated underscore.coffee
The example code in documentation/coffee/*.coffee accidentally had duplicate
compiled .js versions committed: Both as documentation/js/*.js and as
documentation/coffee/*.js.
The former is generated when running `cake doc:site`, while the latter has no
cake task to be generated. Removing the former and then re-compiling index.html
results in all the code examples being missing in the resulting HTML, while
removing the latter makes no difference.
In conclusion, documentation/coffee/*.js must be the unnecessary duplicates.
They are removed by this commit.
This was done by first checking all files in the repository root by hand, and
then by doing the following:
$ npm i get-stdin@4
$ cat clean.coffee
fs = require 'fs'
stdin = require 'get-stdin'
stdin (text) ->
for file in text.trim().split('\n')
contents = fs.readFileSync file
.toString().replace /\s*$/, '\n'
fs.writeFileSync file, contents
return
$ ls !(node_modules)/**/*.coffee | coffee clean.coffee