maglove 0.6.6 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac4a4d4178023b6ef6d3b8c59db88d97029d121b
4
- data.tar.gz: 1a959b3e664855db05664b21101279048fa8e5a3
3
+ metadata.gz: c4e2e9a781d18a64e7f141302d3ecfe1b290d6f4
4
+ data.tar.gz: 8df539bc813f9a445c5e611bad09b169a4fdd06c
5
5
  SHA512:
6
- metadata.gz: 093a2a9fb7d0ec9dcf7a2d9f935fb1ace06e212e142a8673c89e836ca1ff47be5e2995011939ff1df17013703d1f4dc9f6c8ecf0b54c1ea2783cbfbb97657fe2
7
- data.tar.gz: abaac26ed8d5c8f89478b81f33ed0a109a4657f3a3ad19485ec0ab17509b7b565270185cedbb5e28f10bc8f58e8652e80504611f86af5d91d732066595dd7658
6
+ metadata.gz: c4516a01d653724481049490caa3ff5f5b3f4e67878520e9b0ca5b2f7dc9af6df15a6a0fe90b3df49d08264d6f23c2dcf723cacfb61af40fae242147aad1e82f
7
+ data.tar.gz: 0f96c25155e090f5b849456827309e0a7be10f6e345983a00999139f875108354aa0071a8ef4c0136f1480e3002005db19e1d61a9ac42e70a061776efbcc3540
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maglove (0.6.5)
4
+ maglove (0.7.0)
5
5
  activesupport (~> 4.2)
6
6
  bundler (~> 1.10)
7
7
  coffee-script (~> 2.4)
@@ -16,6 +16,7 @@ PATH
16
16
  logging (~> 2.0)
17
17
  minitar (~> 0.5)
18
18
  rubyzip (~> 1.1)
19
+ sass (~> 3.4)
19
20
  therubyracer (~> 0.12)
20
21
  tilt (~> 1.4)
21
22
  webrick (~> 1.3)
@@ -23,7 +24,7 @@ PATH
23
24
  GEM
24
25
  remote: https://rubygems.org/
25
26
  specs:
26
- activesupport (4.2.6)
27
+ activesupport (4.2.7)
27
28
  i18n (~> 0.7)
28
29
  json (~> 1.7, >= 1.7.7)
29
30
  minitest (~> 5.1)
@@ -42,7 +43,7 @@ GEM
42
43
  commonjs (0.2.7)
43
44
  diff-lcs (1.2.5)
44
45
  dotenv (2.1.1)
45
- execjs (2.6.0)
46
+ execjs (2.7.0)
46
47
  exifr (1.2.4)
47
48
  filewatcher (0.5.3)
48
49
  trollop (~> 2.0)
@@ -60,7 +61,7 @@ GEM
60
61
  image_size (~> 1.3)
61
62
  in_threads (~> 1.3)
62
63
  progress (~> 3.0, >= 3.0.1)
63
- image_optim_pack (0.2.1.20160413)
64
+ image_optim_pack (0.2.1.20160510)
64
65
  fspath (~> 2.1)
65
66
  image_optim (~> 0.19)
66
67
  image_size (1.4.2)
@@ -74,14 +75,16 @@ GEM
74
75
  little-plugger (~> 1.1)
75
76
  multi_json (~> 1.10)
76
77
  method_source (0.8.2)
77
- mini_portile2 (2.0.0)
78
+ mini_portile2 (2.1.0)
78
79
  minitar (0.5.4)
79
- minitest (5.8.4)
80
- multi_json (1.11.3)
81
- nokogiri (1.6.7.2)
82
- mini_portile2 (~> 2.0.0.rc2)
80
+ minitest (5.9.0)
81
+ multi_json (1.12.1)
82
+ nokogiri (1.6.8)
83
+ mini_portile2 (~> 2.1.0)
84
+ pkg-config (~> 1.1.7)
83
85
  parser (2.2.2.6)
84
86
  ast (>= 1.1, < 3.0)
87
+ pkg-config (1.1.7)
85
88
  powerpack (0.1.1)
86
89
  progress (3.1.1)
87
90
  pry (0.10.3)
@@ -111,6 +114,7 @@ GEM
111
114
  ruby-progressbar (~> 1.4)
112
115
  ruby-progressbar (1.7.5)
113
116
  rubyzip (1.2.0)
117
+ sass (3.4.22)
114
118
  slop (3.6.0)
115
119
  therubyracer (0.12.2)
116
120
  libv8 (~> 3.16.14.0)
@@ -132,4 +136,4 @@ DEPENDENCIES
132
136
  rubocop (~> 0.32)
133
137
 
134
138
  BUNDLED WITH
135
- 1.11.2
139
+ 1.12.4
data/bin/maglove CHANGED
@@ -8,6 +8,7 @@ Dotenv.load
8
8
  # Set up Hamloft
9
9
  Hamloft.register_template(:tumblr, MagLove::Template::Tumblr)
10
10
  Tilt.mappings["haml"] = [MagLove::Tilt::HamlTemplate]
11
+ Tilt.mappings["sass"] = [MagLove::Tilt::SassTemplate]
11
12
  Tilt.mappings["less"] = [MagLove::Tilt::LessTemplate]
12
13
  Tilt.mappings["yml"] = [MagLove::Tilt::YamlTemplate]
13
14
  Tilt.mappings["coffee"] = [MagLove::Tilt::CoffeeTemplate]
@@ -15,12 +15,13 @@
15
15
  div#__inspector a:hover{color:#FFFFFF !important;background:#000000 !important;}
16
16
  div#__inspector a:first-child{border-left:none !important;}
17
17
  div#__bs_notify__{border-radius:0 !important;right:inherit !important;left:8px !important;height:32px !important;top:8px !important;line-height:32px !important;padding:0px 26px !important;color:#171717 !important;z-index:1000000 !important;background:#FFF !important;}
18
- :javascript
19
- window.ThemeApi.init({deviceId: 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE', appId: 'com.magloft.maglove', apiHost: 'www.magloft.com'}) if window.ThemeApi
20
-
21
18
  %body
22
19
  = contents
23
20
  #__inspector
24
21
  - templates.each do |template|
25
22
  %a{href: "/#{template}"}
26
23
  = template
24
+ :javascript
25
+ if(window.ThemeApi) {
26
+ window.ThemeApi.init({deviceId: 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE', appId: 'com.magloft.maglove', apiHost: 'www.magloft.com'});
27
+ }
@@ -10,6 +10,7 @@ module MagLove
10
10
  "haml" => "html",
11
11
  "twig" => "html",
12
12
  "less" => "css",
13
+ "scss" => "css",
13
14
  "coffee" => "js",
14
15
  "yml" => "json"
15
16
  }
@@ -9,9 +9,13 @@ module MagLove
9
9
  asset = theme_asset("theme.coffee", options.theme)
10
10
  debug("▸ created #{asset.logical_path}") if asset.write!
11
11
  end
12
-
13
- task :less, theme: "!" do |args, options|
14
- asset = theme_asset("theme.less", options.theme)
12
+
13
+ task :css, theme: "!" do |args, options|
14
+ if File.exists?(theme_path("theme.scss", options.theme))
15
+ asset = theme_asset("theme.scss", options.theme)
16
+ else
17
+ asset = theme_asset("theme.less", options.theme)
18
+ end
15
19
  debug("▸ created #{asset.logical_path}") if asset.write!
16
20
  end
17
21
 
@@ -7,7 +7,7 @@ module MagLove
7
7
 
8
8
  task :compile, theme: ENV["THEME"], sync: "NO", bucket: "localhost:3002" do |args, options|
9
9
  info("▸ compiling theme #{options.theme}")
10
- invoke_tasks(["core:validate", "core:clean", "compile:coffee", "compile:less", "compile:yaml", "compile:templates", "copy:base_images", "copy:images", "copy:thumbs", "compress:theme"], options)
10
+ invoke_tasks(["core:validate", "core:clean", "compile:coffee", "compile:css", "compile:yaml", "compile:templates", "copy:base_images", "copy:images", "copy:thumbs", "compress:theme"], options)
11
11
 
12
12
  if options.sync == "YES"
13
13
  error!("▸ SYNC error: please specify a bucket to use (cdn.magloft.com, test-cdn.magloft.com)") if options.bucket == "localhost:3001"
@@ -26,7 +26,7 @@ module MagLove
26
26
  info("▸ watching theme #{options.theme}")
27
27
  watch_config({
28
28
  "compile:coffee" => [theme_path("**/*.{coffee,js}", options.theme), theme_base_path("**/*.{coffee,js}", options.theme)],
29
- "compile:less" => [theme_path("**/*.{less,css}", options.theme), theme_base_path("**/*.{less,css}", options.theme)],
29
+ "compile:css" => [theme_path("**/*.{less,scss,css}", options.theme), theme_base_path("**/*.{less,scss,css}", options.theme)],
30
30
  "compile:templates" => [theme_path("**/*.{haml,twig,html}", options.theme)],
31
31
  "copy:base_images" => theme_base_path("images/**/*.{jpg,jpeg,gif,png,svg}", options.theme),
32
32
  "copy:images" => theme_path("images/**/*.{jpg,jpeg,gif,png,svg}", options.theme)
@@ -0,0 +1,32 @@
1
+ module Sass::Script::Functions
2
+ def asset(url)
3
+ assert_type url, :String
4
+ Sass::Script::Value::String.new("url(\"#{::Hamloft::Options.defaults[:asset_uri]}/#{url.value}\")")
5
+ end
6
+ declare(:asset, [:url])
7
+ end
8
+
9
+ module MagLove
10
+ module Tilt
11
+ class SassTemplate < ::Tilt::Template
12
+ self.default_mime_type = 'theme/html'
13
+
14
+ def prepare
15
+ @options = options.merge({
16
+ style: :nested,
17
+ load_paths: [],
18
+ cache: false,
19
+ cache_location: nil,
20
+ syntax: :sass,
21
+ filesystem_importer: Sass::Importers::Filesystem
22
+ })
23
+ end
24
+
25
+ def evaluate(scope, locals, &block)
26
+ prepared_data = "@base: \"#{locals[:base_path].sub("src/", "../../")}\";\n#{data}"
27
+ engine = Sass::Engine.new(prepared_data, @options)
28
+ @output ||= engine.render
29
+ end
30
+ end
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module MagLove
2
- VERSION = "0.6.6"
2
+ VERSION = "0.7.0"
3
3
  end
data/lib/maglove.rb CHANGED
@@ -11,6 +11,7 @@ require "logging"
11
11
  require "coffee_script"
12
12
  require "therubyracer"
13
13
  require "less"
14
+ require "sass"
14
15
  require "commander"
15
16
  require "image_optim"
16
17
  require "zlib"
@@ -21,6 +22,7 @@ require "maglove/version"
21
22
  require "maglove/tilt/twig_template"
22
23
  require "maglove/tilt/haml_template"
23
24
  require "maglove/tilt/less_template"
25
+ require "maglove/tilt/sass_template"
24
26
  require "maglove/tilt/coffee_template"
25
27
  require "maglove/tilt/js_template"
26
28
  require "maglove/tilt/yaml_template"
data/maglove.gemspec CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.add_runtime_dependency "minitar", "~> 0.5"
26
26
  s.add_runtime_dependency "therubyracer", "~> 0.12"
27
27
  s.add_runtime_dependency "less", "~> 2.6"
28
+ s.add_runtime_dependency "sass", "~> 3.4"
28
29
  s.add_runtime_dependency "webrick", "~> 1.3"
29
30
  s.add_runtime_dependency "commander", "~> 4.3"
30
31
  s.add_runtime_dependency "filewatcher", "~> 0.5"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maglove
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-05 00:00:00.000000000 Z
11
+ date: 2016-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '2.6'
181
+ - !ruby/object:Gem::Dependency
182
+ name: sass
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '3.4'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '3.4'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: webrick
183
197
  requirement: !ruby/object:Gem::Requirement
@@ -397,6 +411,7 @@ files:
397
411
  - lib/maglove/tilt/haml_template.rb
398
412
  - lib/maglove/tilt/js_template.rb
399
413
  - lib/maglove/tilt/less_template.rb
414
+ - lib/maglove/tilt/sass_template.rb
400
415
  - lib/maglove/tilt/twig_template.rb
401
416
  - lib/maglove/tilt/yaml_template.rb
402
417
  - lib/maglove/version.rb
@@ -421,9 +436,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
421
436
  version: 2.4.7
422
437
  requirements: []
423
438
  rubyforge_project:
424
- rubygems_version: 2.5.1
439
+ rubygems_version: 2.6.6
425
440
  signing_key:
426
441
  specification_version: 4
427
442
  summary: MagLove - MagLoft Theme Toolkit.
428
443
  test_files: []
429
- has_rdoc: