0

Is it possible to have a Sublime Text JavaScript Build System with jQuery support?

Screenshot below is JavaScript only example of the build, on top of the NodeJS. Would be very nice to write some jQuery code and be able to evaluate it straight away, hence my question.

Sublime JavaScript build system

There is plenty examples for javascript/ruby/php/python etc.. - not sure that having jQuery one is even possible? Any suggestions much appreciated.

http://logicmason.com/2013/adding-a-js-build-system-to-sublime/comment-page-1/ http://addyosmani.com/blog/custom-sublime-text-build-systems-for-popular-tools-and-languages/

Iladarsda
  • 10,640
  • 39
  • 106
  • 170
  • While I find your question interesting, I'm not so sure if it actually fits in the SO context… – nietonfir May 28 '14 at 21:00
  • What do you mean by a build system with jQuery support? From what (little) I know of JS, your code has nothing to do with jQuery, so that's misleading. If you're talking about Node, don't you list the requirement for jQuery in the source just like any other library and it's included automatically? – MattDMo May 28 '14 at 21:04
  • @MattDMo - would be nice to write some jQuery and evaluate straight away - using the build system. please note the screenshot is only for the presentation purposes. – Iladarsda May 28 '14 at 21:06
  • What package are you using for your build system? There isn't a JS build included in Sublime... – MattDMo May 28 '14 at 21:07
  • @MattDMo maybe there is away to load/include jQuery source before evaluating? – Iladarsda May 28 '14 at 21:07
  • @MattDMo - no plugins, I've created new build system on top on node as per here http://logicmason.com/2013/adding-a-js-build-system-to-sublime/comment-page-1/ – Iladarsda May 28 '14 at 21:08
  • shouldn't `var $ = require("jquery");` do the trick? – MattDMo May 28 '14 at 21:16
  • @MattDMo - nope, that would be very nice `Error: Cannot find module 'jquery'` – Iladarsda May 28 '14 at 21:21
  • @MattDMo this works - http://pastebin.com/MgDpZ5ev – Iladarsda May 28 '14 at 21:42

1 Answers1

0

I attempted to workaround by pasting the entire minified jquery at the start of my editor and building with node. It executes console.log but not $.get

blaha
  • 2,685
  • 4
  • 16
  • 19