yarrow 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/yarrow/assets/pipeline.rb +51 -0
- data/lib/yarrow/assets.rb +1 -3
- data/lib/yarrow/version.rb +1 -1
- data/lib/yarrow.rb +7 -7
- metadata +13 -15
- data/lib/yarrow/assets/compiler.rb +0 -0
- data/lib/yarrow/assets/manifest.rb +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Mzg5NmM3ZGE3ZDk5N2Q1Mjc5NTNiMDg4M2YyYmY5NDk5MThkMzYxZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjA1ODIyMWU4Yzg2NjljNDY4MjEyODIzNGZhNmY1YjBjZTI4ZmNlMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTk2NDU5ZDE1MDI4NWU2YjI2NmRjNzcwNDE0MjhiNGJhYjViNTMyMjk1YjRl
|
10
|
+
MzkxZjVhMjc2ZGE5ODE2OTNiM2UxNWFmN2E4NDViMmI2ZDRmY2M2MGQ3NWMy
|
11
|
+
YTZkNDg1NGU4NjdmNDZkZmE5NWZhYjg5NzU2OGVmZWM1MTU5ZTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWU0MWY0OTE1ZDA5OGZjZWI1ODgyMjExN2VkZDU5ZmQxMmIxZWM0MTA3MGJh
|
14
|
+
Zjc4YzgxMWI0NTgyYmY3OTg3MGI3MTVlNzY4ZjA1YjExNjgwN2FkN2MzZTQy
|
15
|
+
ZTBhOTkxMWQ4NDQ2OWJhZjg0ZTIyOTc4ODVmZDE3YWNjNzk5OTk=
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require "pathname"
|
2
|
+
require "fileutils"
|
3
|
+
require "sprockets"
|
4
|
+
|
5
|
+
module Yarrow
|
6
|
+
module Assets
|
7
|
+
class Pipeline
|
8
|
+
|
9
|
+
attr_reader :input_dir, :output_dir, :bundles, :assets
|
10
|
+
|
11
|
+
# TODO: handle configuration
|
12
|
+
def initialize(options = {})
|
13
|
+
@input_dir = Dir.pwd + "/assets"
|
14
|
+
@output_dir = Dir.pwd + "/web/ui"
|
15
|
+
|
16
|
+
raise "#{@input_dir} is not a directory" unless File.directory? @input_dir
|
17
|
+
end
|
18
|
+
|
19
|
+
def compile(assets=[])
|
20
|
+
manifest =Sprockets::Manifest.new(environment, manifest_file_path)
|
21
|
+
assets.each do |asset|
|
22
|
+
manifest.compile(asset)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def environment
|
27
|
+
@environment ||= create_environment
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def manifest_file_path
|
33
|
+
"#{@output_dir}/manifest.json"
|
34
|
+
end
|
35
|
+
|
36
|
+
def create_environment
|
37
|
+
environment = Sprockets::Environment.new(@input_dir)
|
38
|
+
# configure javascript
|
39
|
+
environment.append_path 'js'
|
40
|
+
|
41
|
+
# configure stylesheets
|
42
|
+
environment.append_path 'css'
|
43
|
+
environment.css_compressor = :scss
|
44
|
+
|
45
|
+
environment
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
data/lib/yarrow/assets.rb
CHANGED
data/lib/yarrow/version.rb
CHANGED
data/lib/yarrow.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require "hashie"
|
2
2
|
require "yaml"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
require_relative "yarrow/version"
|
5
|
+
require_relative "yarrow/configuration"
|
6
|
+
require_relative "yarrow/console_runner"
|
7
|
+
require_relative "yarrow/generator"
|
8
|
+
require_relative "yarrow/content_map"
|
9
|
+
require_relative "yarrow/assets"
|
10
|
+
require_relative "yarrow/tools/front_matter"
|
11
11
|
|
12
12
|
# Dir[File.dirname(__FILE__) + "/yarrow/generators/*.rb"].each do |generator|
|
13
13
|
# require generator
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yarrow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rickerby
|
@@ -25,35 +25,35 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: sprockets
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ! '>='
|
@@ -88,8 +88,6 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- bin/yarrow
|
91
|
-
- lib/yarrow/assets/compiler.rb
|
92
|
-
- lib/yarrow/assets/manifest.rb
|
93
91
|
- lib/yarrow/assets/pipeline.rb
|
94
92
|
- lib/yarrow/assets.rb
|
95
93
|
- lib/yarrow/configuration.rb
|
File without changes
|
File without changes
|