transpile
transpile copied to clipboard
File structure
This is how the lib folder looks currently
├── amd_amd.js
├── amd_cjs.js
├── amd_slim.js
├── babel_compile.js
├── bfs.js
├── cjs_amd.js
├── cjs_cjs.js
├── cjs_steal.js
├── clean_traceur_compile.js
├── es6_amd.js
├── es6_cjs.js
├── es6_compiler.js
├── generate.js
├── get_ast.js
├── global_amd.js
├── global_slim.js
├── make_transforms_formats_graph.js
├── normalize_cjs.js
├── options_normalize.js
├── source_map_filename.js
├── steal_amd.js
└── traverse.js
My proposal is to separate converters from "other" modules and mimic the graph structure we used to determine whether it's possible to transpile a module from a, to b.
say what?
The file structure would look like this:
├── amd
│ ├── cjs.js
│ ├── global.js
│ └── steal.js
├── cjs
│ ├── cjs.js
│ └── steal.js
├── global
│ └── amd.js
└── steal
└── amd.js
where the folder name is the source format and the file inside is the "dest" format. We could replica the same structure in the tests.
the filenames not being distinct makes it harder to search is my only issue.
I don't think it would change things a lot: instead of searching for amd_cjs
you'd search for amd/cjs
.
ok, cool