munge 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/munge.rb +32 -31
- data/lib/munge/application.rb +7 -7
- data/lib/munge/bootloader.rb +0 -11
- data/lib/munge/cli.rb +3 -3
- data/lib/munge/cli/commands/build.rb +17 -21
- data/lib/munge/cli/commands/clean.rb +28 -33
- data/lib/munge/cli/commands/init.rb +1 -1
- data/lib/munge/cli/commands/server.rb +3 -3
- data/lib/munge/cli/dispatch.rb +56 -13
- data/lib/munge/config.rb +2 -2
- data/lib/munge/{system.rb → conglomerate.rb} +21 -14
- data/lib/munge/{system → conglomerate}/collection.rb +5 -26
- data/lib/munge/{system → conglomerate}/item_factory.rb +1 -1
- data/lib/munge/{system → conglomerate}/item_factory/content_parser.rb +1 -1
- data/lib/munge/{system → conglomerate}/item_factory/item_identifier.rb +1 -1
- data/lib/munge/conglomerate/processor.rb +138 -0
- data/lib/munge/conglomerate/reader.rb +33 -0
- data/lib/munge/{system → conglomerate}/router.rb +3 -3
- data/lib/munge/{system → conglomerate}/router/itemish.rb +1 -1
- data/lib/munge/{errors.rb → error.rb} +1 -25
- data/lib/munge/{extras → extra}/livereload.rb +5 -5
- data/lib/munge/{extras → extra}/livereload/messaging.rb +1 -1
- data/lib/munge/{extras → extra}/livereload/server.rb +1 -1
- data/lib/munge/{extras → extra}/livereload/update_client.rb +1 -1
- data/lib/munge/{extras → extra}/livereload/update_server.rb +1 -1
- data/lib/munge/{extras → extra}/livereload/vendor/livereload.js +0 -0
- data/lib/munge/{formatters → formatter}/default.rb +1 -1
- data/lib/munge/{formatters → formatter}/dots.rb +1 -1
- data/lib/munge/{formatters → formatter}/silent.rb +1 -1
- data/lib/munge/function/clean.rb +18 -0
- data/lib/munge/function/write.rb +68 -0
- data/lib/munge/go/sass.rb +5 -5
- data/lib/munge/go/sass/asset_urls.rb +2 -2
- data/lib/munge/{helpers → helper}/asset_paths.rb +1 -1
- data/lib/munge/{helpers → helper}/asset_tags.rb +1 -1
- data/lib/munge/{helpers → helper}/capture.rb +1 -1
- data/lib/munge/helper/data.rb +21 -0
- data/lib/munge/helper/define_module.rb +13 -0
- data/lib/munge/{helpers → helper}/find.rb +3 -3
- data/lib/munge/{helpers → helper}/link.rb +3 -3
- data/lib/munge/{helpers → helper}/livereload.rb +1 -1
- data/lib/munge/helper/rendering.rb +51 -0
- data/lib/munge/{helpers → helper}/tag.rb +4 -8
- data/lib/munge/item.rb +4 -5
- data/lib/munge/load.rb +60 -0
- data/lib/munge/pre_init.rb +10 -7
- data/lib/munge/{routers → router}/add_directory_index.rb +1 -1
- data/lib/munge/{routers → router}/auto_add_extension.rb +1 -1
- data/lib/munge/{routers → router}/fingerprint.rb +1 -1
- data/lib/munge/{routers → router}/remove_index_basename.rb +1 -1
- data/lib/munge/version.rb +1 -1
- data/lib/munge/vfs/dry_run.rb +28 -0
- data/lib/munge/vfs/filesystem.rb +44 -0
- data/lib/munge/vfs/memory.rb +33 -0
- data/lib/munge/write_manager/all.rb +11 -11
- data/lib/munge/write_manager/only_needed.rb +9 -9
- data/munge.gemspec +25 -17
- data/seeds/boot.rb +21 -0
- data/seeds/boot.yml +10 -0
- data/seeds/config.rb +7 -0
- data/seeds/layouts/blog_archives.html.erb +1 -1
- data/seeds/layouts/blog_index.html.erb +1 -1
- data/seeds/layouts/default.html.erb +1 -1
- data/seeds/lib/routing.rb +8 -8
- data/seeds/lib/sass.rb +1 -1
- data/seeds/lib/view_helpers.rb +3 -11
- data/seeds/rules.rb +1 -1
- data/seeds/src/home/index.html.erb +1 -1
- metadata +64 -46
- data/lib/munge/cleaner.rb +0 -31
- data/lib/munge/helpers/rendering.rb +0 -100
- data/lib/munge/init.rb +0 -45
- data/lib/munge/io/dry_run.rb +0 -31
- data/lib/munge/io/filesystem.rb +0 -38
- data/lib/munge/io/noop.rb +0 -27
- data/lib/munge/runner.rb +0 -68
- data/lib/munge/system/processor.rb +0 -52
- data/lib/munge/system/readers/filesystem.rb +0 -52
- data/lib/munge/transformers/tilt_transformer.rb +0 -40
- data/lib/munge/util/import.rb +0 -15
- data/seeds/setup.rb +0 -3
@@ -1,40 +0,0 @@
|
|
1
|
-
module Munge
|
2
|
-
module Transformers
|
3
|
-
class TiltTransformer
|
4
|
-
def initialize(system)
|
5
|
-
@system = system
|
6
|
-
@registry = []
|
7
|
-
@demands = Hash.new { Hash.new }
|
8
|
-
end
|
9
|
-
|
10
|
-
def name
|
11
|
-
:tilt
|
12
|
-
end
|
13
|
-
|
14
|
-
def call(item, content, renderer = nil)
|
15
|
-
scope = Scope.new(@system.clone, @demands)
|
16
|
-
@registry.each { |helpers| scope.extend(helpers) }
|
17
|
-
|
18
|
-
scope.render_with_layout(item, content_engines: renderer, content_override: content)
|
19
|
-
end
|
20
|
-
|
21
|
-
def register(helper)
|
22
|
-
@registry.push(helper)
|
23
|
-
end
|
24
|
-
|
25
|
-
def demand(tilt_template, **options)
|
26
|
-
@demands[tilt_template] = @demands[tilt_template].merge(options)
|
27
|
-
end
|
28
|
-
|
29
|
-
class Scope
|
30
|
-
def initialize(system, tilt_options)
|
31
|
-
@system = system
|
32
|
-
@tilt_options = tilt_options
|
33
|
-
end
|
34
|
-
|
35
|
-
attr_reader :system
|
36
|
-
attr_reader :tilt_options
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
data/lib/munge/util/import.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
module Munge
|
2
|
-
module Util
|
3
|
-
module Import
|
4
|
-
# Loads file into current scope. Similar to `load "filename.rb"`
|
5
|
-
#
|
6
|
-
# @param absolute_file_path [String]
|
7
|
-
# @param execution_context [Binding]
|
8
|
-
# @return [void]
|
9
|
-
def import_to_context(absolute_file_path, execution_context)
|
10
|
-
contents = File.read(absolute_file_path)
|
11
|
-
execution_context.eval(contents, absolute_file_path)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
data/seeds/setup.rb
DELETED