Skip to content

Instantly share code, notes, and snippets.

@Paxa
Created August 31, 2010 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Paxa/558732 to your computer and use it in GitHub Desktop.
Save Paxa/558732 to your computer and use it in GitHub Desktop.
# to build
jsbundle check # - will fetch all libs
jsbundle build # - will compile and locate ersilt files
We have js libs on github
Our Jsfile (yeah like Gemfile :)) will looks like yaml file, or ruby dsl
I all js files should be compiled in to files: libs.js and application.js
application will be changed on every deploy, but libs will be changing only then you require new lib
rubygems-like server should store information about libs and compiled versions of then
In future it should handle with package.yml and mootools-forge like header comments to calculate and fetch dependences
lib 'mootools' do
repo 'http://github.com/mootools/mootools-core.git'
tag '1.2.4'
end
lib 'mootools-more' do
repo 'http://github.com/mootools/mootools-more.git'
tag '1.2.4'
end
# or just
lib 'mootools', '1.2.4'
# this can be used only for libs registered on our server
# to build application.js
application do
in 'public/javascripts' do
use 'application.js', 'classes/*.js', 'views/*.js'
ignore 'classes/*_spec.js'
end
end
build do
compress_with :jsmin, :gzip
put_at 'public/javascripts'
application 'all.js.gz'
libs 'libs.js.gz'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment