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

Build Into One File #57

Open
aaronfrost opened this issue Jan 19, 2015 · 3 comments
Open

Build Into One File #57

aaronfrost opened this issue Jan 19, 2015 · 3 comments

Comments

@aaronfrost
Copy link
Owner

@mciparelli we should probably support building into one file. The reason being that because we have sourcemap support, if people concat their own files, then their sourcemaps are worthless, as they don't correspond to the actual original source file. So, if people specify a "concat" options or whatever, we should then concat their files, and then compile the files.

Thoughts?

@mciparelli
Copy link
Collaborator

I would still consider calling some Traceur API to recursively load dependencies (recursiveModuleCompileToSingleFile?). That would allow grunt-traceur users to specify a source file as an entrance to their application and the respective output file. Just loading that file would make the app run for them. Now until such thing is decided in here: google/traceur-compiler#1626 we definitely could add some option to concat before compiling (which has actually nothing to do with recursive compilation of dependencies, ha). Or even better maybe do it automatically if (src.length > dest.length), but then that won't work for every modules Traceur option, so I suppose we should check if the user is using a modules option that allows for manyToOne compilation in order to be able to warn them when they try to compile many files into one for, say, register which I think doesn't support many modules per-file.

@mciparelli
Copy link
Collaborator

@aaronfrost would you prefer this concat to happen automatically when it detects src > 1 or should the user specify a concat option?
Would you warn in console to the user that is trying to do a manyToOne compilation indicating that the contents will be concatted before transpiled?

@gso
Copy link

gso commented Apr 19, 2015

I am myself coding one class per module, hence --out is needed for a deployment build (currently run a shell script).

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

3 participants