Coder Social home page Coder Social logo

Comments (8)

aponxi avatar aponxi commented on June 22, 2024

Hey, thanks for the idea. I usually just compile when i'm packaging the application so I don't know what kind of approach would be most practical with this. Do you think "rules" for compiling for specific files would be a good option or would it be overkill?

  1. In example you have a src/foo.coffee that you want to be compiled with --bar args but you want src/foo2.coffee to be compiled with --baz args.
  2. Or should there be a global compiling options that you can set which make coffees always compiled with --bar args and to baz dir.

I'm guessing the first one is more like a Cakefile thing so just having the option to specify compile dir and args would suffice?

Also could you give me a couple alternative examples on how you want it to work please? From what I understand just specifying relative dirs such as ../lib or ../../lib would suffice right?

I'm just brainstorming with you to plan extensiblity in the future. If all you want is something simple just let me know :)

from sublime-better-coffeescript.

feugy avatar feugy commented on June 22, 2024

I think you should begin with the second solution: ability to specify -o and -c options of the coffee-script compiler.

Relative path seems a good option (please take care of portability) because dealing with absolute path when you work in teams is a real pain.

I guess that people who wants more customization will write their own cake file, as you mention it in the documentation.

from sublime-better-coffeescript.

aponxi avatar aponxi commented on June 22, 2024

Thank you for your response :)

I am now adding the arg options... But one thing isn't clear to me, when you say you want to specify -c option what exactly do you mean? From what I see it goes like coffee -c script.coffee. if you have the ability to specify -c option's argument then it would mean that you want to be able to compile a specific file when you hit alt+shift+c is that what you want?

Doing -o some/dir is easy though, I can add an option that says compileDir and if it is set to a directory it will add -o that/directory; if it is False or not string it will compile it into the same dir (as it is now).

from sublime-better-coffeescript.

aponxi avatar aponxi commented on June 22, 2024
  • As far as right now I was only able to make relative path to the file that is being compiled. Trying to work on a way to get the project's folder.
  • Output dir option works only if directory is present, gonna write a function that makes dir.

from sublime-better-coffeescript.

feugy avatar feugy commented on June 22, 2024

Forget about the -c option: your plugin takes the saved file to compile it, which is the right thing to do.

As I used the other Sublime Text Coffee plugin, which do not compile coffee, I configured a custom build to compile all my coffee script after save (thank to SublimeOnSaveBuild). That's why I needed the -c, to specify a directory, and not a file.

But as you're only compiling the saved file, there is no need of it.

from sublime-better-coffeescript.

aponxi avatar aponxi commented on June 22, 2024

@feugy please let me know if there are any problems :) it should be working

from sublime-better-coffeescript.

feugy avatar feugy commented on June 22, 2024

Works perfectly for me except one thing: the error reporting.
When one of the file does not compile (not necessarly the saved one), no error is reported on console.

from sublime-better-coffeescript.

aponxi avatar aponxi commented on June 22, 2024

@feugy it should be saying Compilation Failed/Succeeded in the status bar

from sublime-better-coffeescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.