Atom Package: https://atom.io/packages/coffee-autocompile
Add the parameters on the first line (or the second line if the file contains a shebang) of the Coffee-script file.
out(string)1 2: path of JS file to create
bare(bool): pass the
--bareoption to the Coffee-script compiler
sourcemap(bool): create a sourcemap
1 If the
compileIfNoOutSpecified setting is enabled, this may be omitted. The file will then be saved in the same directory as the source file. If the file has the
.coffee extension it will be removed, and the
.js extension will always be appended.
2 The output filename may contain
$2, which will be replaced by the input basename and extension, respectively. So a file named
in.coffee and is configured with
# out: $1.$2.js will compile to
Coffee autocompile will check if Coffee-script is installed in the (parent) directory of the Coffee-script file and use that one to compile the file. If no local installation is found, it uses the bundled Coffee-script module.
Compile the CoffeeScript file to main.js in the same directory as the source file
# out: ./main.js
Compress the file and saves to the absolute path /path/to/main.min.js
# out: /path/to/main.min.js, compress: true
Save a sourcemap in the same directory as the output file (the parent directory of the source file)
# out: ../main.js, sourcemap: true
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.