Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File structure #79

Open
m-mujica opened this issue May 22, 2017 · 3 comments
Open

File structure #79

m-mujica opened this issue May 22, 2017 · 3 comments

Comments

@m-mujica
Copy link
Contributor

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.

@matthewp
Copy link
Member

the filenames not being distinct makes it harder to search is my only issue.

@m-mujica
Copy link
Contributor Author

I don't think it would change things a lot: instead of searching for amd_cjs you'd search for amd/cjs.

giphy-downsized-large

@matthewp
Copy link
Member

ok, cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants