pure-sass 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +28 -3
  3. data/app/assets/stylesheets/pure/all.css.sass +7 -7
  4. data/app/assets/stylesheets/pure/base/{_normalize-context.css.sass → normalize-context.css.sass} +0 -0
  5. data/app/assets/stylesheets/pure/base/{_normalize.css.sass → normalize.css.sass} +0 -0
  6. data/app/assets/stylesheets/pure/base.css.sass +2 -2
  7. data/app/assets/stylesheets/pure/buttons/{_buttons-core.css.sass → buttons-core.css.sass} +0 -0
  8. data/app/assets/stylesheets/pure/buttons/{_buttons.css.sass → buttons.css.sass} +0 -0
  9. data/app/assets/stylesheets/pure/buttons.css.sass +2 -2
  10. data/app/assets/stylesheets/pure/forms/{_forms-core.css.sass → forms-core.css.sass} +0 -0
  11. data/app/assets/stylesheets/pure/forms/{_forms-r.css.sass → forms-r.css.sass} +0 -0
  12. data/app/assets/stylesheets/pure/forms/{_forms.css.sass → forms.css.sass} +0 -0
  13. data/app/assets/stylesheets/pure/forms.css.sass +3 -2
  14. data/app/assets/stylesheets/pure/grids/{_grids-core.css.sass → grids-core.css.sass} +0 -0
  15. data/app/assets/stylesheets/pure/grids/{_grids-r.css.sass → grids-r.css.sass} +0 -0
  16. data/app/assets/stylesheets/pure/grids/{_grids-units.css.sass → grids-units.css.sass} +0 -0
  17. data/app/assets/stylesheets/pure/grids.css.sass +3 -2
  18. data/app/assets/stylesheets/pure/menus/{_menus-core.css.sass → menus-core.css.sass} +0 -0
  19. data/app/assets/stylesheets/pure/menus/{_menus-paginator.css.sass → menus-paginator.css.sass} +0 -0
  20. data/app/assets/stylesheets/pure/menus/{_menus-r.css.sass → menus-r.css.sass} +0 -0
  21. data/app/assets/stylesheets/pure/menus/{_menus.css.sass → menus.css.sass} +0 -0
  22. data/app/assets/stylesheets/pure/menus.css.sass +4 -2
  23. data/app/assets/stylesheets/pure/tables/{_tables.css.sass → tables.css.sass} +0 -0
  24. data/app/assets/stylesheets/pure/tables.css.sass +1 -2
  25. data/lib/pure/sass/version.rb +1 -1
  26. data/lib/pure/sass.rb +4 -1
  27. metadata +16 -24
  28. data/app/assets/stylesheets/pure/_all.css.sass +0 -7
  29. data/app/assets/stylesheets/pure/_base.css.sass +0 -2
  30. data/app/assets/stylesheets/pure/_buttons.css.sass +0 -2
  31. data/app/assets/stylesheets/pure/_defaults.css.sass +0 -0
  32. data/app/assets/stylesheets/pure/_forms.css.sass +0 -2
  33. data/app/assets/stylesheets/pure/_grids.css.sass +0 -2
  34. data/app/assets/stylesheets/pure/_menus.css.sass +0 -2
  35. data/app/assets/stylesheets/pure/_tables.css.sass +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a7cf046ca1f3d921b0db746ceea962dc6b3a9fc
4
- data.tar.gz: df2dc176b76e84168a64dfe9a4f5e1a971498d33
3
+ metadata.gz: c37439e1e2d7af2ea0d45f72eae56a6cc398d97f
4
+ data.tar.gz: f05428253c29da1a3d29143eaffe7eeef5a992f5
5
5
  SHA512:
6
- metadata.gz: b9d38ad9a855b1b03265f3f4603d66377dc4d5289f87d275132097e2ffccf1a48278e7e195912bf9ff98f59d491b18e264c6d36bf83893d32204acdf787123f1
7
- data.tar.gz: 884e8de0d2260b372cc91d171972fd6d2992fb47e8451778e281084ff1477b8ee8527d2077cf415548646ad0de43b677ff0002c416bbde1267fb3191fc004933
6
+ metadata.gz: 1078363aca87826cafb5ab87c830389ab4b0fc1315365d101e96201f6eaa9bcff5b7a02014c84d7f649ac09776a4ce02c40326ed97a7c9ee98ab2c91643f6030
7
+ data.tar.gz: 62ca01f38277a7ac34be53ea98d6fb5f16ab6c136ccdd323a0e6d946c2138b0b52d662f078e3d2af3d0d32163d7c8ac888193d4f532d3b70b084334f9467dd25
data/Rakefile CHANGED
@@ -7,23 +7,48 @@ namespace :upstream do
7
7
  def generate_sass_dependencies
8
8
  find_upstream_css_files.map do |source|
9
9
  mod, base = source.scan(/purecss\/src\/([a-z_]+)\/.+\/([a-z_-]+).css\Z/)[0]
10
- "app/assets/stylesheets/pure/#{mod}/_#{base}.css.sass"
10
+ "app/assets/stylesheets/pure/#{mod}/#{base}.css.sass"
11
11
  end
12
12
  end
13
13
 
14
+ def sass_files
15
+ %w[ all defaults base buttons forms grids menus tables ]
16
+ end
17
+
18
+ def generate_top_level_dependencies
19
+ sass_files.map { |p| "app/assets/stylesheets/pure/#{p}.css.sass" }
20
+ end
21
+
14
22
  def find_upstream_css_files
15
23
  Dir['vendor/upstream/purecss/src/*/css/**/*.css']
16
24
  end
17
25
 
18
26
  desc "Import CSS files from upstream and convert them to SASS"
19
- task :import => generate_sass_dependencies
27
+ task :import => generate_sass_dependencies + generate_top_level_dependencies
20
28
 
21
29
  desc "Update upstream CSS files"
22
30
  task :update do
23
31
  sh "git submodule update vendor/upstream/purecss/"
24
32
  end
25
33
 
26
- rule(/.*\.css\.sass\Z/ => [proc { |t| t.sub(/\A.*\/([a-z_-]+)\/_([a-z_-]+)\.css\.sass\Z/, 'vendor/upstream/purecss/src/\1/css/\2.css') }]) do |t|
34
+ generate_top_level_dependencies.each do |path|
35
+ file path do
36
+ if File.basename(path) == 'all.css.sass'
37
+ File.write(path, (sass_files - ['all']).map { |f| "@import \"#{f}\"\n" }.join)
38
+ else
39
+ dir_path = path.gsub(/\.css\.sass\Z/, '')
40
+ mod = File.basename(dir_path)
41
+ File.open(path, "w") do |file|
42
+ Dir["#{dir_path}/*.sass"].each do |sass|
43
+ file.puts "@import \"#{mod}/#{File.basename(sass).gsub(/\.css\.sass\Z/, '')}\""
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ rule(/.*\.css\.sass\Z/ => [proc { |t| t.sub(/\A.*\/([a-z_-]+)\/([a-z_-]+)\.css\.sass\Z/, 'vendor/upstream/purecss/src/\1/css/\2.css') }]) do |t|
51
+ sh "mkdir -p #{File.dirname(t.name).inspect}"
27
52
  sh "sass-convert -C -F css -T sass #{t.source.inspect} #{t.name.inspect}"
28
53
  end
29
54
  end
@@ -1,7 +1,7 @@
1
- //= require ./_defaults
2
- //= require_tree ./base
3
- //= require_tree ./buttons
4
- //= require_tree ./forms
5
- //= require_tree ./grids
6
- //= require_tree ./menus
7
- //= require_tree ./tables
1
+ @import "defaults"
2
+ @import "base"
3
+ @import "buttons"
4
+ @import "forms"
5
+ @import "grids"
6
+ @import "menus"
7
+ @import "tables"
@@ -1,2 +1,2 @@
1
- //= require ./_defaults
2
- //= require_tree ./base
1
+ @import "base/normalize-context"
2
+ @import "base/normalize"
@@ -1,2 +1,2 @@
1
- //= require ./_defaults
2
- //= require_tree ./buttons
1
+ @import "buttons/buttons-core"
2
+ @import "buttons/buttons"
@@ -1,2 +1,3 @@
1
- //= require ./_defaults
2
- //= require_tree ./forms
1
+ @import "forms/forms-core"
2
+ @import "forms/forms-r"
3
+ @import "forms/forms"
@@ -1,2 +1,3 @@
1
- //= require ./_defaults
2
- //= require_tree ./grids
1
+ @import "grids/grids-core"
2
+ @import "grids/grids-r"
3
+ @import "grids/grids-units"
@@ -1,2 +1,4 @@
1
- //= require ./_defaults
2
- //= require_tree ./menus
1
+ @import "menus/menus-core"
2
+ @import "menus/menus-paginator"
3
+ @import "menus/menus-r"
4
+ @import "menus/menus"
@@ -1,2 +1 @@
1
- //= require ./_defaults
2
- //= require_tree ./tables
1
+ @import "tables/tables"
@@ -1,5 +1,5 @@
1
1
  module Pure
2
2
  module Sass
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
data/lib/pure/sass.rb CHANGED
@@ -2,6 +2,9 @@ require "pure/sass/version"
2
2
 
3
3
  module Pure
4
4
  module Sass
5
- # Your code goes here...
5
+ if defined? Rails::Engine
6
+ class Engine < Rails::Engine
7
+ end
8
+ end
6
9
  end
7
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pure-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Harton
@@ -153,37 +153,29 @@ files:
153
153
  - LICENSE.txt
154
154
  - README.md
155
155
  - Rakefile
156
- - app/assets/stylesheets/pure/_all.css.sass
157
- - app/assets/stylesheets/pure/_base.css.sass
158
- - app/assets/stylesheets/pure/_buttons.css.sass
159
- - app/assets/stylesheets/pure/_defaults.css.sass
160
- - app/assets/stylesheets/pure/_forms.css.sass
161
- - app/assets/stylesheets/pure/_grids.css.sass
162
- - app/assets/stylesheets/pure/_menus.css.sass
163
- - app/assets/stylesheets/pure/_tables.css.sass
164
156
  - app/assets/stylesheets/pure/all.css.sass
165
157
  - app/assets/stylesheets/pure/base.css.sass
166
- - app/assets/stylesheets/pure/base/_normalize-context.css.sass
167
- - app/assets/stylesheets/pure/base/_normalize.css.sass
158
+ - app/assets/stylesheets/pure/base/normalize-context.css.sass
159
+ - app/assets/stylesheets/pure/base/normalize.css.sass
168
160
  - app/assets/stylesheets/pure/buttons.css.sass
169
- - app/assets/stylesheets/pure/buttons/_buttons-core.css.sass
170
- - app/assets/stylesheets/pure/buttons/_buttons.css.sass
161
+ - app/assets/stylesheets/pure/buttons/buttons-core.css.sass
162
+ - app/assets/stylesheets/pure/buttons/buttons.css.sass
171
163
  - app/assets/stylesheets/pure/defaults.css.sass
172
164
  - app/assets/stylesheets/pure/forms.css.sass
173
- - app/assets/stylesheets/pure/forms/_forms-core.css.sass
174
- - app/assets/stylesheets/pure/forms/_forms-r.css.sass
175
- - app/assets/stylesheets/pure/forms/_forms.css.sass
165
+ - app/assets/stylesheets/pure/forms/forms-core.css.sass
166
+ - app/assets/stylesheets/pure/forms/forms-r.css.sass
167
+ - app/assets/stylesheets/pure/forms/forms.css.sass
176
168
  - app/assets/stylesheets/pure/grids.css.sass
177
- - app/assets/stylesheets/pure/grids/_grids-core.css.sass
178
- - app/assets/stylesheets/pure/grids/_grids-r.css.sass
179
- - app/assets/stylesheets/pure/grids/_grids-units.css.sass
169
+ - app/assets/stylesheets/pure/grids/grids-core.css.sass
170
+ - app/assets/stylesheets/pure/grids/grids-r.css.sass
171
+ - app/assets/stylesheets/pure/grids/grids-units.css.sass
180
172
  - app/assets/stylesheets/pure/menus.css.sass
181
- - app/assets/stylesheets/pure/menus/_menus-core.css.sass
182
- - app/assets/stylesheets/pure/menus/_menus-paginator.css.sass
183
- - app/assets/stylesheets/pure/menus/_menus-r.css.sass
184
- - app/assets/stylesheets/pure/menus/_menus.css.sass
173
+ - app/assets/stylesheets/pure/menus/menus-core.css.sass
174
+ - app/assets/stylesheets/pure/menus/menus-paginator.css.sass
175
+ - app/assets/stylesheets/pure/menus/menus-r.css.sass
176
+ - app/assets/stylesheets/pure/menus/menus.css.sass
185
177
  - app/assets/stylesheets/pure/tables.css.sass
186
- - app/assets/stylesheets/pure/tables/_tables.css.sass
178
+ - app/assets/stylesheets/pure/tables/tables.css.sass
187
179
  - lib/pure/sass.rb
188
180
  - lib/pure/sass/version.rb
189
181
  - pure-sass.gemspec
@@ -1,7 +0,0 @@
1
- //= require ./_defaults
2
- //= require_tree ./base
3
- //= require_tree ./buttons
4
- //= require_tree ./forms
5
- //= require_tree ./grids
6
- //= require_tree ./menus
7
- //= require_tree ./tables
@@ -1,2 +0,0 @@
1
- //= require ./_defaults
2
- //= require_tree ./base
@@ -1,2 +0,0 @@
1
- //= require ./_defaults
2
- //= require_tree ./buttons
File without changes
@@ -1,2 +0,0 @@
1
- //= require ./_defaults
2
- //= require_tree ./forms
@@ -1,2 +0,0 @@
1
- //= require ./_defaults
2
- //= require_tree ./grids
@@ -1,2 +0,0 @@
1
- //= require ./_defaults
2
- //= require_tree ./menus
@@ -1,2 +0,0 @@
1
- //= require ./_defaults
2
- //= require_tree ./tables