Implement lean packaging of tilt #160

Closed
wants to merge 5 commits into
from

Projects

None yet

3 participants

@ujifgc
ujifgc commented Jan 14, 2013

Gemfile:

# register with all available template engines, default option
gem 'tilt'

Gemfile:

# register with no loaded templates, expert option
gem 'tilt', :require => 'tilt/lean'

boot.rb:

# require only needed template engines, no bloating, fast load
require 'tilt/haml'
require 'tilt/sass'
@rkh
Collaborator
rkh commented Jan 14, 2013

Thanks for the pull request, I think this is the right direction. Though I think this should be arranged slightly differently: What's currently in tilt should move to tilt/lean, dropping the flag. What's currently in tilt/all should move to tilt (requiring tilt/lean first), tilt-lean should be dropped. Otherwise you mess with anyone requiring tilt and assuming to have all templates available.

@ujifgc
ujifgc commented Jan 14, 2013

On it.

ujifgc added some commits Jan 15, 2013
@ujifgc ujifgc Implement lean packaging of tilt
    Gemfile:
    gem 'tilt' # with all available template engines
    gem 'tilt', :require => ['tilt/lean', 'tilt/haml] # only with haml
5629203
@ujifgc ujifgc Merge branch 'master' into mean
Restructure new templates to conform with lean packaging

Conflicts:
	lib/tilt.rb
06d48ca
@ujifgc
ujifgc commented Mar 3, 2013

Restructured new template engines to conform with lean packaging.

Could I please have some clever comments to know if I'm on the right path?

@judofyr
Collaborator
judofyr commented Mar 12, 2013

I wrote some notes on making it more general in #178.

I'm going to look at this (and #178) after 1.4 is released.

@ujifgc
ujifgc commented Apr 7, 2013

Merged current master

@ujifgc ujifgc Merge branch 'master' into mean
Conflicts:
	CHANGELOG.md
	lib/tilt.rb
	tilt.gemspec
ee6dcec
@judofyr judofyr added a commit that referenced this pull request May 1, 2013
@judofyr judofyr Refactor into Tilt::Mapping:
- Allow multiple mappings with Tilt::Mapping
- Replace global state with a Tilt::Mapping-instance
- Implement lazy loading (#160, #178)
- Remove initialize_template_engine and engine_initialized?
432ae80
@judofyr
Collaborator
judofyr commented May 2, 2013

Thanks for your ideas and code. Tilt 2.0 will be lean by default (require 'tilt' will not load any template classes) :)

I'm not going to merge this specific pull request because we want to solve this together with #178. Follow that issue for updates.

See also #187 for the current proposal for how to solve #178.

@judofyr judofyr closed this May 2, 2013
@ujifgc
ujifgc commented May 2, 2013

Excellent, thank you. I'm looking forward to see the lean tilt.
On May 2, 2013 12:52 PM, "Magnus Holm" notifications@github.com wrote:

Thanks for your ideas and code. Tilt 2.0 will be lean by default (require
'tilt' will not load any template classes) :)

I'm not going to merge this specific pull request because we want to solve
this together with #178 #178.
Follow that issue for updates.

See also #187 #187 for the
current proposal for how to solve #178#178
.


Reply to this email directly or view it on GitHubhttps://github.com/rtomayko/tilt/pull/160#issuecomment-17326991
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment