I'm trying to build an automatic builder for JS.Class to allows include it in my rails app through a gem. I want to give users the opportunity to include whole library with a single line (//= require js.class.all), however I don't know how can I run jsbuild to get ALL modules and include them. I don't know the name of all classes and I'm not sure if it's a good idea to manually list all files.
I mean that I would like to put the gem in my gemfile so I can easily keep js.class up to date and always be compiled for my project.
I'm almost there but I really don't know how to run jsbuild to include all modules, as I've said my only idea is "jsbuild JS.Module1 JS.Module2... --no-packages" but I don't know where to fetch a list of classes, so my idea was to use files, but they should be included in the right order and I don't know how to find except from parsing javascript.
Well, skipping test is ok. Yes I would like to bundle js. Class itself as a gem. At the moment I want to just include all, but the next step should be to inject jsbuild in asset pipeline and configure package with an yml file.
--
You received this message because you are subscribed to the Google Groups "jsclass-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsclass-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Well, skipping test is ok. Yes I would like to bundle js. Class itself as a gem. At the moment I want to just include all, but the next step should be to inject jsbuild in asset pipeline and configure package with an yml file.
but the next step should be to inject jsbuild in asset pipeline and configure package with an yml file.
Well, the biggest advantage is that I have just to edit a single
configuration file (an yml) to add other js.class packages, then the
gem will compile them for me, instead of going back to terminal,
compile everything again (and I have to "store" somewhere the last
line i've used to compile, for example if I used "jsbuild JS.Set" the
next time I have to use "jsbuild JS.Set JS.SomethingElse"), copy/paste
into project (this can be avoided with a simpler script) and run. Also
one important thing is that the gem should provide an helper where if
you are in a production environment, will use the "static" loading
(modules bundled into a file), but if you are in a development
environment (or even test) will load files dinamically using the
loader.
Well but my point was to simplify the job specifically for rails
users, I am doing a rails gem specifically because I would like to
make faster the download/keep updated/keep compiled with correct
modules.
Well, I've built a rakefile that download your gem, build with jake
Yes, so it auto-updates my directory with a simple command. If it's a
problem I can download it straight from the website, but I'm a fun of
autoupdate °°
In my last e-mail I wrote I were not going to use the gem so, still I
want a rakefile to handle updating for myself.
I'll let you know how's going. Anyway the "biggest" suggestion I can
give (you can ignore it), just build a repository for js.class builds
that is the same version as the website (and it only contains the
files in "build" directory), so people can write a script to update
their code in easier way (downloading from http and unzipping is just
more lines of code). Also you can avoid some bandwidth usage in this
way (but I imagine is not a problem for you).
I don't think it's painful to build JS.Class, but it's a bit harder to
understand how you handle the project with package manager for
production environment, that post fixed this "issue".