1604 Commits

Author SHA1 Message Date
Sebastian McKenzie
43ee3b77f3 add SequenceExpression and UnaryExpression builders 2014-11-04 12:47:39 +11:00
Sebastian McKenzie
9ef826b53e move visitor-keys from traverse to types 2014-11-04 12:47:27 +11:00
Sebastian McKenzie
6519ceaa63 move util.getIds to types.getIds 2014-11-04 12:47:03 +11:00
Sebastian McKenzie
d28496006e implement Scope so we can keep track of references to avoid collisions when generating ids 2014-11-04 12:46:47 +11:00
Sebastian McKenzie
5f9710e61f add explanation for gross Error.captureStackTrace polyfill 2014-11-04 12:45:17 +11:00
Sebastian McKenzie
c4cadd8a64 add text/6to5 to browser compilation script types 2014-11-04 09:13:50 +11:00
Sebastian McKenzie
d3c5b8ef0b automatic browser <script type="text/ecmascript-6"> compilation - closes #97 2014-11-04 08:56:48 +11:00
Sebastian McKenzie
120df2c611 make browser api backwards compatible 2014-11-04 08:22:44 +11:00
Sebastian McKenzie
719d23eb3b add Error.captureStackTrace polyfill so browser build will work in non-v8 environments - fixes #107 2014-11-04 08:19:13 +11:00
Sebastian McKenzie
0f5a141c91 change acorn-ast-types to ast-types 2014-11-04 08:04:41 +11:00
Sebastian McKenzie
fca3a0c56f generator: add ensureSemicolon and printBlock methods 2014-11-04 08:04:32 +11:00
Sebastian McKenzie
e88505aba6 better ExportDeclaration generation 2014-11-04 08:04:22 +11:00
Sebastian McKenzie
500a0bdfb6 better whitespace for blocks and methods 2014-11-04 08:04:11 +11:00
Sebastian McKenzie
2a0efceef5 change behaviour of tests and browser testing/build 2014-11-04 08:03:52 +11:00
Sebastian McKenzie
6f230de01c fix maybeReplace wrong node callback bug 2014-11-03 21:17:56 +11:00
Sebastian McKenzie
3c3746b21f fix transformer alias types key 2014-11-03 21:17:42 +11:00
Sebastian McKenzie
f49f057b33 generator: add trim option to isLast 2014-11-03 21:17:17 +11:00
Sebastian McKenzie
e3b9a0dd38 update alias-functions transformer to use types 2014-11-03 21:16:15 +11:00
Sebastian McKenzie
6e5917e537 make array comprehensions use for-of unless using an array literal - fixes #98 2014-11-03 21:15:49 +11:00
Sebastian McKenzie
816c1d304b remove builders and move them to automatially generated types 2014-11-03 21:13:35 +11:00
Sebastian McKenzie
718e342e86 fix classes supername transformer inference 2014-11-03 18:22:57 +11:00
Sebastian McKenzie
600513bcab add ignore module formatter - closes #119 2014-11-03 18:18:51 +11:00
Sebastian McKenzie
620e5791af use t.is* methods to nicen up code 2014-11-03 18:10:52 +11:00
Sebastian McKenzie
47ee2cc99f simplify err.loc references 2014-11-03 17:53:08 +11:00
Sebastian McKenzie
6cc70f7465 compare code instead of ast for transformation tests 2014-11-03 17:52:59 +11:00
Sebastian McKenzie
20484c66c5 add types.inherits method that inherits loc, range, start, end etc 2014-11-03 17:52:50 +11:00
Sebastian McKenzie
171bcad870 make transformation tests compare output instead of ast 2014-11-03 17:52:15 +11:00
Sebastian McKenzie
c963c30107 fix errorWithNode line mapping 2014-11-03 17:50:25 +11:00
Sebastian McKenzie
795183569d fix export default assignment bug 2014-11-03 14:40:47 +11:00
Sebastian McKenzie
9a3c973280 add removeLastNewline to generator and add newlines to generated nodes 2014-11-03 14:40:33 +11:00
Sebastian McKenzie
95f3ca6348 Merge branch 'master' into code-generator
Conflicts:
	lib/6to5/transformers/classes.js
	test/fixtures/transformation/source-maps/class/expected.js
	test/fixtures/transformation/source-maps/class/source-mappings.json
2014-11-03 13:38:44 +11:00
Sebastian McKenzie
c17878913b add classProps declaration to simplify/nicen up class property defining - closes #88 2014-11-03 13:36:23 +11:00
Sebastian McKenzie
f3d371869d Merge branch 'master' into code-generator
Conflicts:
	lib/6to5/register.js
2014-11-03 12:22:07 +11:00
Sebastian McKenzie
89ecd46b77 move _moduleFormatter transformer before useStrict transformer and remove duplicate use strict removing - fixes #114 2014-11-03 12:20:47 +11:00
Sebastian McKenzie
9f8e8d96a8 simplify hasParans for NewExpression 2014-11-03 12:15:57 +11:00
Sebastian McKenzie
6d961c1857 faster traverse.hasType with array of nodes 2014-11-03 12:15:27 +11:00
Sebastian McKenzie
e13a650d05 remove IfStatement making consequent and alternate blocks 2014-11-03 11:17:36 +11:00
Sebastian McKenzie
3cd7ed69a3 remove useless blank template 2014-11-03 11:16:48 +11:00
Sebastian McKenzie
93c6d69e21 make transformation tests ignore whitespace 2014-11-03 11:15:06 +11:00
Sebastian McKenzie
57d3c836bd register: add additional blacklistTests 2014-11-03 11:14:52 +11:00
Sebastian McKenzie
115282d57b generator: add _push method to simplify buffer pushing and location tracking 2014-11-03 11:13:37 +11:00
Sebastian McKenzie
72d924d85b generator: fix NewExpression arguments 2014-11-03 11:12:30 +11:00
Sebastian McKenzie
6838062279 move util.errorWithNode to File 2014-11-03 11:11:37 +11:00
Sebastian McKenzie
bc79cec15a add NewExpression support to needsParans 2014-11-03 11:11:07 +11:00
Sebastian McKenzie
85f0f6fb14 add whitespace option and move util.errorWithNode to File 2014-11-03 11:09:58 +11:00
amsul
ddbb522392 Updated blacklist option to replace reference 2014-11-01 19:36:10 -04:00
amsul
288cfd1f00 Added ability to register 6to5 with a blacklist
Currently, to achieve this, I have to use this workaround:

```js
var to5 = require('6to5')
delete to5.transform.transformers.generators
require('6to5/register')
```

After this simple change, I can make it much nicer:

```js
require('6to5/register')({
    blacklist: ['generators']
})
```

Cheers!
2014-11-01 14:15:52 -04:00
Sebastian McKenzie
435b9434ea don't mess with the indentation of TemplateElements 2014-11-01 23:26:48 +11:00
Sebastian McKenzie
2409b017db generator: remove parans around ConditionalExpression 2014-11-01 23:08:50 +11:00
Sebastian McKenzie
99f2864048 generator: remove redundant print call 2014-11-01 23:08:33 +11:00