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

Accept local coffee installs #216

Open
binarykitchen opened this issue Jun 1, 2015 · 3 comments · May be fixed by #234
Open

Accept local coffee installs #216

binarykitchen opened this issue Jun 1, 2015 · 3 comments · May be fixed by #234

Comments

@binarykitchen
Copy link

Currently that plugin won't work with local coffee binaries, located inside node_modules/bin of your project.

In CoffeeScript.sublime-settings I added that line "binDir": "node_modules/.bin", yet, I get the error FileNotFoundError: [Errno 2] No such file or directory: 'coffee'. Do I really have to npm-install coffee globally?

@markalfred
Copy link
Contributor

You could define an absolute path to the binary on a per-project basis, so you could have one default binDir in your CoffeeScript.sublime-settings, then a project-specific binDir in your projectname.sublime-project file. To define project-specific coffeescript settings, add them to a "CoffeeScript" section of the "settings" portion of your .sublime-project file.

For instance, for the project sublime-better-coffeescript, I'd have the following file:

/users/markalfred/repos/sublime-better-coffeescript/project.sublime-project:

{
  "folders":
  [
    {
      "follow_symlinks": true,
      "path": "."
    }
  ],
  "settings":
  {
    "CoffeeScript":
    {
      "binDir": "/users/markalfred/repos/sublime-better-coffeescript/node_modules/.bin"
    }
  }
}

This should override your global binDir for this particular project. Let me know if this works for you

@binarykitchen
Copy link
Author

yes, this worked

@binarykitchen
Copy link
Author

no, this is still not good enough. it should accept relative paths:

  "settings":
  {
    "CoffeeScript":
    {
      "binDir": "./node_modules/.bin"
    }
  }

because the .sublime-project file is shared among developers and everyone has a different absolute path. and "./node_modules/.bin" doesn't work.

@binarykitchen binarykitchen reopened this Oct 14, 2015
@gbouthenot gbouthenot linked a pull request Jun 29, 2016 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants