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

CLI: Custom output file names #3526

Closed
am11 opened this issue Jun 30, 2014 · 4 comments
Closed

CLI: Custom output file names #3526

am11 opened this issue Jun 30, 2014 · 4 comments

Comments

@am11
Copy link

am11 commented Jun 30, 2014

In many node-based source-to-source trans-compilers, there is an option to specify custom output filename-with-path.

In CoffeeScript the --output switch takes target folder, meaning you cannot specify custom filename! We are facing a hard time with it in editor extension. Can you please add a condition:

if(fs.lstatSync(custom_target_filename_with_custom_path_and_custom_extension).isDirectory())
    // continue with current logic
else if(fs.existsSync(custom_target_filename_with_custom_path_and_custom_extension))
    // use path.basename(custom_target) and
    // PLEASE "custom_target + .map" for map filename
    // (do not change extension for .map, just append it)

Considering that Less, Sass (node-sass), LiveScript and SweetJS, all produce targetName.TargetExtension.map. Less and Sass: target.css.map and LiveScript, TypeScript and SweetJs target.js.map.

So please follow the conventions or at least give us sufficient options so we can configure output file names.

To recapitulate, the compiler should:

  • Accept custom path with custom extension for target file.
  • Accept custom path for map file.
  • Produce map file with double extension: myCoffee.js.map
@yjo
Copy link

yjo commented Jul 14, 2014

👍

1 similar comment
@hoosierhobbyist
Copy link

+1

@chocolateboy
Copy link

  1. 👍
  2. This is a duplicate of CLI: Allow user to set output filename #2870.
  3. A workaround is to use: coffee -p source.coffee > output.js

@GeoffreyBooth
Copy link
Collaborator

Closing in favor of #2870.

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

No branches or pull requests

5 participants