Commit Graph

45 Commits

Author SHA1 Message Date
AKFish
8407dd885a [CS2] Module should be require-able in non-Node environments like Webpack and Browserify (#4546)
* Add webpack support

* Move Node.js-only code from src/coffee-script.coffee to src/index.coffee
* Use lib/coffee-script/index.js as npm package's "main" script
* Export CoffeeScript from src/browser.coffee
* Set package.json's "browser" field to lib/coffee-script/browser.js (used by webpack as entry point)
* Use lib/coffee-script/browser.js as bower package's "main" script

* Use NOP moduleMain when generating parser with Jison

* Remove legacy debug code from browser.coffee

* Improve comments, style

* Fix path

* Remove stub that was only to avoid breaking browser tests; compensate for the lack of stub when running the browser tests in Node

* Update output

* Add test:webpack task to Cakefile

* Update output files

* Run browser tests against webpack build

* Fix newline at end of file

* Export webpack test bundle as CommonJS module

* Remove build:webpack task

* Save webpack build to tmpdir; suppress build output unless it fails
2017-05-13 21:20:36 -07:00
Geoffrey Booth
a5cb8cd7c3 Rebuild release 2017-02-20 16:07:44 -08:00
Geoffrey Booth
7de06c3dcb Ensure unique source maps’ sourceURL; closes #4126 2017-02-20 15:46:48 -08:00
Geoffrey
4cc701a9da Remove hyphen in coffee-script 2017-02-12 17:00:05 -08:00
Dylan Piercey
347a625525 Add inline sourcemap support 2016-01-23 12:58:22 -07:00
Cotton Hou
cc1b056b03 optionally to read data-src out from <script> 2015-03-09 15:37:09 +08:00
Jeremy Ashkenas
db87d817e8 Merge pull request #3012 from imcotton/parallel-loading
Script loading parallelized in browser
2013-10-20 14:10:40 -07:00
Cotton Hou
92208fec44 simplify logic and changing less from before 2013-06-28 09:28:20 +08:00
Cotton Hou
cdc603c794 remove logic redundancy 2013-06-28 09:28:20 +08:00
Cotton Hou
46d8902004 parallelized script loading in browser, yet order remain 2013-06-28 09:28:20 +08:00
Casey Leask
19767a0f10 Updated the Source Maps syntax 2013-06-26 12:34:21 +00:00
Hao-kang Den
b2d6997eff encode unicode src, test added 2013-03-21 09:04:23 +08:00
Hao-kang Den
e091c9d6b4 quick-fix with a different approach 2013-03-20 15:23:33 +08:00
Romain Beauxis
1e99f887e7 More explicit window context in src/browser.coffee. 2013-03-18 11:16:26 -05:00
Jeremy Ashkenas
a3e8de338a CoffeeScript 1.6.2 2013-03-18 13:06:33 +08:00
Michael Ficarra
417008a030 be a little more descriptive, as per @epidemian's suggestion 2013-03-17 21:53:46 -05:00
Michael Ficarra
84c44c0099 small stylistic change and optimisation to code from #2847 2013-03-17 21:50:20 -05:00
Hao-kang Den
011d7dc245 better naming by @michaelficarra 2013-03-18 10:23:33 +08:00
Hao-kang Den
b2aa1798b1 safer browser check 2013-03-18 09:31:12 +08:00
Hao-kang Den
5fb047930e fixed lineno 2013-03-18 09:31:12 +08:00
Hao-kang Den
c24e957f17 use btoa as base64 encoder, inspired by @ashtuchkin 2013-03-18 09:31:12 +08:00
Sean B. Palmer
881ae5528d Add support for text/literate-coffeescript in the browser 2013-02-28 10:15:20 +00:00
Philipp von Weitershausen
78423e9a14 Fix #2534: Address @jashkenas review comment. 2012-09-07 12:53:37 -07:00
Philipp von Weitershausen
ec59a626f2 Fix #2534: Don't pass a string argument to the XMLHttpRequest constructor. 2012-09-05 00:09:18 -07:00
Michael Ficarra
44e1ccec7e eval's options argument should default to {}, even in the browser 2012-03-02 22:51:38 -05:00
Trevor Burnham
de9970412a Making bare the default for eval in the browser (fixes #2148) 2012-02-27 12:13:46 -05:00
Jeremy Ashkenas
cda95afd3e tweaking documentation 2011-12-18 13:41:33 -05:00
Michael Ficarra
11544f2717 fixes #1832: speed up CoffeeScript.eval in browser script 2011-11-08 19:56:00 -05:00
Michael Ficarra
a0efdac8ce removed trailing whitespace in source files 2011-06-02 02:00:47 -04:00
Jeremy Ashkenas
5fd82e829b fixing test.html 2011-05-01 08:28:00 -04:00
Jeremy Ashkenas
a91509ba72 reintroducing a variant of kit's in-order script loading fix. 2011-04-30 13:48:54 -04:00
Jeremy Ashkenas
0dfe2429bc reverted @kitgoncharov's commits that broke the browser runner. 2011-04-30 13:33:28 -04:00
Jeremy Ashkenas
f1ad2e1fae Revert "Fix a typo in browser.coffee."
This reverts commit 6793eb383c.
2011-04-30 13:32:26 -04:00
Kit Goncharov
6793eb383c Fix a typo in browser.coffee. 2011-04-11 13:50:27 -06:00
Kit Goncharov
2caceda8c4 Enforce script execution order in browser.coffee. 2011-04-11 13:38:38 -06:00
Jeremy Ashkenas
bb05e07e4e light refactors + tweaks 2010-11-04 22:53:07 -04:00
satyr
371282fe7a defarg: (options = {}) where possible 2010-10-26 19:14:03 +09:00
satyr
79148d2940 refactored loop variable caching 2010-10-22 02:07:00 +09:00
satyr
88cc1ee35d 765: -b/--bare <- --no-wrap 2010-10-14 04:09:56 +09:00
satyr
c0ec479e60 browser: exposed require for debugging 2010-10-12 17:10:39 +09:00
Sam Stephenson
f360fba47f Add test:browser task for running the test suite against the merged browser script. 2010-10-11 09:42:13 -05:00
Jeremy Ashkenas
269f4e8da8 Tweaks to browser.coffee 2010-09-21 22:31:59 -04:00
satyr
481c3d536b made browser.coffee override Node dependent exported methods 2010-09-22 01:05:00 +09:00
satyr
e4b7d06f35 removed browser specific hacks from src/* by making "rake browser" provide fake require and exports 2010-09-21 18:37:44 +09:00
Jeremy Ashkenas
493780efab separate out browser.coffee from the core coffee-script module. 2010-09-04 06:39:01 -04:00