Commit Graph

14 Commits

Author SHA1 Message Date
Geoffrey Booth 3108244c20 Fix stack trace (#4428)
* Revert aee27fbff0

* Patch Jison’s output so that it requires `fs` only if we’re truly in a CommonJS/Node environment, not a browser environment that may happen to have globals named `require` and `exports` (as would be the case if require.js is being used). Fixes #4391.

* Temporary fix for exceptions getting thrown when trying to generate a stack trace for a file that has been deleted since compilation; fixes #3890, but not well. A better solution would not try to recompile the file when trying to retrieve its stack trace.

* Save the test REPL history in the system temp folder, not in the CoffeeScript project folder

* Rewrite `getSourceMap` to never read a file from disk, and therefore not throw IO-related exceptions; source maps are either retrieved from memory, or the related source code is retrieved from memory to generate a new source map. Fixes #3890 the proper way.

* Add test to verify that stack traces reference the correct line number. Closes #4418.

* Get the parser working in the browser compiler again; rather than detecting a CommonJS environment generally, just check for `fs` before trying to use it

* Follow Node’s standard of 4-space indentation of stack trace data

* Better .gitignore

* Fix caching of compiled code and source maps; add more tests to verify correct line numbers in stack traces

* Better fallback value for the parser source

* Fix the stack traces and tests when running in a browser

* Update the browser compiler so that @murrayju doesn’t have any extra work to do to test this branch
2017-01-22 13:20:18 -08:00
Geoffrey Booth e620434a2e Docs improvements: content in Markdown, organization into subtemplates, fixed tests (#4401)
* Replace tiny bitmaps with base64-encoded URIs

* Optimize SVGs; replace logo PNG with SVG

* Modernize favicon

* Embed CSS; a bit unorthodox, but we’re a single page so there’s no point in separate .css files and their separate HTTP requests

* Documentation is now markdown, converted to HTML on compilation

* Render the examples when we’re rendering index.html; they compile so quickly that there’s no need to pre-render them and save the intermediate .js files

* Split apart index.html into components that Cakefile assembles, so that we can add in logic to include different files for v1 versus v2

* Split building index.html and building test.html into two tasks; collapse the parts of `releaseHeader` into one compact function

* Move include logic into templates

* Get error messages tests to work in the browser

* Update output index.html

* Split body into nav and body

* Watch subtemplates

* Revert "Split body into nav and body"

This reverts commit ec9e559ec0.

* Add marked

* Update gitignore

* Use idiomatic markdown output for code blocks (<pre><code>)

* Handle ids within the template, not in the Cakefile; remove marked’s auto-generated and conflicting ids

* Move the `codeFor` function into versioned folders, so that v1 and v2 docs can have different example code blocks/editors

* Update packages, including new highlight.js which supports our newer keywords and triple backticks (docs output is unchanged)
2016-12-15 21:05:44 -08:00
Jeremy Ashkenas 76a25dc797 ignore litcoffee files 2012-09-25 17:50:04 -05:00
Sam Stephenson d665c3a75f Add uglify-js and jison as development dependencies 2011-08-04 22:55:53 -05:00
satyr 72c83f5e43 updated tests toward fixing #653 2010-09-27 16:34:00 +09:00
Jeremy Ashkenas 7bb764b3e4 ignoring raw 2010-04-18 18:14:17 -04:00
Jeremy Ashkenas 5f94186b40 adding the compiled parser back into the repo (after all that) so that it can be used as the source for the narwhal package 2010-01-23 12:44:36 -05:00
Jeremy Ashkenas 80fbe02fda ignoring the top-down parser that doesn't work 2010-01-17 17:41:38 -05:00
Jeremy Ashkenas 9498ef9fe4 ignoring 'presentation' folder 2010-01-10 12:21:06 -05:00
Jeremy Ashkenas c49f2d8097 ignoring the generated parser.rb 2010-01-06 22:38:03 -05:00
Jeremy Ashkenas 3e24cef69f minor doc updates -- let's try pulling in the underscore test suite 2010-01-04 19:15:24 -05:00
Jeremy Ashkenas 50bdd2668c got lexer balancing parens, indent/outdents, brackets, and curlies 2009-12-28 21:02:40 -05:00
Jeremy Ashkenas c6f11fbfeb built the first gem -- works just fine 2009-12-16 23:10:03 -05:00
Jeremy Ashkenas 0d735a6c1b ignoring the parser debugging 2009-12-13 23:45:18 -05:00