convert coffeescript to javascript support #69

Closed
enginespot opened this Issue Jun 8, 2013 · 5 comments

3 participants

@enginespot

currently I want to convert coffeescript to javascript ,and output the js file to some directory

I submit an issue to sublimetext ,
[question about relative path [sublime-build]]
http://www.sublimetext.com/forum/viewtopic.php?f=3&t=12670

I am not sure if sublime-better-coffeescript support it , if it support , I will use the plugin , output js file to some directory in one command

@lavrton
Collaborator

Plugin support this. Use compileDir and relativDir in config:

"compileDir" : "/home/user/Projects/some",
"relativeDir": "/home/user/Projects/some/coffee"
@aponxi
Owner

Yup, plugin already supports this! @lavrton is correct.

@aponxi aponxi closed this Jun 8, 2013
@enginespot

great, it works

but there is a question , the compileDir and relativeDir is absolute path , but sometimes , when I open a project , maybe my folder name is 'project', then if the config like

"compileDir" : "",
"relativeDir": "src"

or

"compileDir" : "project",
"relativeDir": "project/src"

then in other computer I can reuse the config file

@lavrton
Collaborator

You can set "compileDir" and "relativeDir" params inside project file "name.sublime-project". For example:

{
    "folders":
    [
        {
        "path": "/home/lavrton/Projects/slash/develop"
        }
    ],
    "settings": {
        "CoffeeScript": {
            "compileDir" : "/home/lavrton/Projects/slash/develop",
            "relativeDir": "/home/lavrton/Projects/slash/develop/client/scripts"
        }
    },
 "build_systems" :
    [
        {
            "name": "List",
            "cmd": ["ls"]
        }
    ]
}
@enginespot

in this case , the compileDir and also relativeDir is also absolute path, if I move sublime project to other computer , I also need to change the settings

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