smacssify 0.0.12 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/README.md +21 -3
- data/lib/assets/stylesheets/compiler.scss +6 -6
- data/lib/assets/stylesheets/{layouts → layout}/README.md +0 -0
- data/lib/assets/stylesheets/{layouts/content.css.scss → layout/body.css.scss} +0 -0
- data/lib/assets/stylesheets/{layouts → layout}/footer.css.scss +0 -0
- data/lib/assets/stylesheets/{layouts → layout}/header.css.scss +0 -0
- data/lib/assets/stylesheets/{modules → module}/README.md +0 -0
- data/lib/assets/stylesheets/{states → state}/README.md +0 -0
- data/lib/assets/templates/application.css +13 -0
- data/lib/generators/smacssify/install_generator.rb +17 -5
- data/lib/smacssify/version.rb +1 -1
- metadata +29 -47
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Zjk0NzgyNmJhMGY4NjhjZjYxMzMxOWY2MjZkMTk1OTEwNDQ2ODZjNg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDE1N2IzNmM1YThiN2M1NGQxZjM2Y2YxZDRhNTM1YzU2Mzc1YmQxNw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDcxZGFjODZjZWE5ZWE0NmY0MTE1ZTEwNzNiOTEyNmUyMWNkZWY0YzEwNjM5
|
10
|
+
NWQyNWM4OGM1Yzg3Yzk5ODMyODZkZjU2YmVjYzgyNzU2MWQwMGQ3NTY4ZTI0
|
11
|
+
MGU4ODI0ODk0ZmJhZDMzZWUwODc0MzIyMzFlZWQ2NGQyMTRjMWM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NTkxMjcxN2UwYzVhYjQ5Zjc4ZGM3ODhjYTU5ZjIwNzUxZWI2NjhmZDQxNTBm
|
14
|
+
NmFjMzhhYzlhNzFkMTFkMDAzYTY3NjkwMDlkNDI0YTljNTYxMGM4ODZjODA3
|
15
|
+
ZDFjZjUxNmFhZTQyZmU0OTI1ZGI3ZTNiZTJmYmE5YzRkMmYwMzI=
|
data/README.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
1
|
# Smacssify
|
2
2
|
|
3
|
-
|
3
|
+
A Rails generator to set up a nice SMACSS-style directory structure inside assets/stylesheets. Very opinionated, only SASS and no require_tree allowed in your manifest file! This generator will set up a directory structure like so:
|
4
|
+
|
5
|
+
--stylesheets/
|
6
|
+
|
|
7
|
+
|--base/
|
8
|
+
|
|
9
|
+
|--layout/
|
10
|
+
|
|
11
|
+
|--module/
|
12
|
+
|
|
13
|
+
|--state/
|
14
|
+
|
|
15
|
+
|--application.css
|
16
|
+
|
|
17
|
+
|--compiler.scss
|
18
|
+
|
19
|
+
Everything from base, layout, module and state gets @imported into the compiler file which inturn gets required in application.css.
|
4
20
|
|
5
21
|
## Installation
|
6
22
|
|
@@ -18,12 +34,14 @@ Or install it yourself as:
|
|
18
34
|
|
19
35
|
## Usage
|
20
36
|
|
21
|
-
|
37
|
+
$ rails g smacssify:install
|
38
|
+
|
39
|
+
Take a break, eat a KitKat.
|
22
40
|
|
23
41
|
## Contributing
|
24
42
|
|
25
43
|
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
44
|
+
2. Create your feature branch (`git checkout -b feature/my-new-feature`)
|
27
45
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
46
|
4. Push to the branch (`git push origin my-new-feature`)
|
29
47
|
5. Create new Pull Request
|
@@ -1,14 +1,14 @@
|
|
1
|
-
// In order to get all the goodness of SASS
|
1
|
+
// In order to get all the goodness of SASS (mixins, colours, etc) we need
|
2
2
|
// to compile everything here.
|
3
3
|
|
4
4
|
// Base
|
5
|
-
@import 'reset';
|
6
|
-
@import 'typography';
|
5
|
+
@import 'base/reset';
|
6
|
+
@import 'base/typography';
|
7
7
|
|
8
8
|
// Layout
|
9
|
-
@import 'header';
|
10
|
-
@import '
|
11
|
-
@import 'footer';
|
9
|
+
@import 'layout/header';
|
10
|
+
@import 'layout/body';
|
11
|
+
@import 'layout/footer';
|
12
12
|
|
13
13
|
// Modules
|
14
14
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require ./compiler
|
13
|
+
*/
|
@@ -3,7 +3,7 @@ require 'rails/generators'
|
|
3
3
|
module Smacssify
|
4
4
|
class InstallGenerator < Rails::Generators::Base
|
5
5
|
source_root File.expand_path("../../../", __FILE__)
|
6
|
-
|
6
|
+
|
7
7
|
desc "This generator sets up the smacss directory structure"
|
8
8
|
|
9
9
|
# Commandline options can be defined here using Thor-like options:
|
@@ -12,12 +12,24 @@ module Smacssify
|
|
12
12
|
# I can later access that option using:
|
13
13
|
# options[:my_opt]
|
14
14
|
|
15
|
-
# def self.source_root
|
16
|
-
# @source_root ||= File.join(File.dirname(__FILE__), 'templates')
|
17
|
-
# end
|
18
|
-
|
19
15
|
def add_assets
|
20
16
|
directory "assets/stylesheets", "app/assets/stylesheets"
|
17
|
+
|
18
|
+
css_manifest = "app/assets/stylesheets/application.css"
|
19
|
+
|
20
|
+
# Thanks https://github.com/seyhunak/twitter-bootstrap-rails/ for bits of this code!
|
21
|
+
if File.exist?(css_manifest)
|
22
|
+
# Add our own require:
|
23
|
+
content = File.read(css_manifest)
|
24
|
+
if content.match(/require_tree\s+\.\s*$/)
|
25
|
+
# We don't want to include the tree - just our compiler.css.scss
|
26
|
+
gsub_file(css_manifest, /require_tree\s+\.\s*$/, "")
|
27
|
+
end
|
28
|
+
style_require_block = " *= require ./compiler\n"
|
29
|
+
insert_into_file css_manifest, style_require_block, :after => "require_self\n"
|
30
|
+
else
|
31
|
+
copy_file "/assets/templates/application.css.scss", "app/assets/stylesheets/application.css.scss"
|
32
|
+
end
|
21
33
|
end
|
22
34
|
|
23
35
|
# Generator Code. Remember this is just suped-up Thor so methods are executed in order
|
data/lib/smacssify/version.rb
CHANGED
metadata
CHANGED
@@ -1,33 +1,22 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: smacssify
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 12
|
9
|
-
version: 0.0.12
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Jack Callister
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2013-03-31 00:00:00 +13:00
|
18
|
-
default_executable:
|
11
|
+
date: 2013-04-14 00:00:00.000000000 Z
|
19
12
|
dependencies: []
|
20
|
-
|
21
13
|
description: Directory structure generator for smacss
|
22
|
-
email:
|
14
|
+
email:
|
23
15
|
- jarsbe@gmail.com
|
24
16
|
executables: []
|
25
|
-
|
26
17
|
extensions: []
|
27
|
-
|
28
18
|
extra_rdoc_files: []
|
29
|
-
|
30
|
-
files:
|
19
|
+
files:
|
31
20
|
- .gitignore
|
32
21
|
- Gemfile
|
33
22
|
- LICENSE.txt
|
@@ -37,46 +26,39 @@ files:
|
|
37
26
|
- lib/assets/stylesheets/base/reset.css.scss
|
38
27
|
- lib/assets/stylesheets/base/typography.css.scss
|
39
28
|
- lib/assets/stylesheets/compiler.scss
|
40
|
-
- lib/assets/stylesheets/
|
41
|
-
- lib/assets/stylesheets/
|
42
|
-
- lib/assets/stylesheets/
|
43
|
-
- lib/assets/stylesheets/
|
44
|
-
- lib/assets/stylesheets/
|
45
|
-
- lib/assets/stylesheets/
|
29
|
+
- lib/assets/stylesheets/layout/README.md
|
30
|
+
- lib/assets/stylesheets/layout/body.css.scss
|
31
|
+
- lib/assets/stylesheets/layout/footer.css.scss
|
32
|
+
- lib/assets/stylesheets/layout/header.css.scss
|
33
|
+
- lib/assets/stylesheets/module/README.md
|
34
|
+
- lib/assets/stylesheets/state/README.md
|
35
|
+
- lib/assets/templates/application.css
|
46
36
|
- lib/generators/smacssify/install_generator.rb
|
47
37
|
- lib/smacssify.rb
|
48
38
|
- lib/smacssify/engine.rb
|
49
39
|
- lib/smacssify/version.rb
|
50
40
|
- smacssify.gemspec
|
51
|
-
|
52
|
-
homepage: ""
|
41
|
+
homepage: ''
|
53
42
|
licenses: []
|
54
|
-
|
43
|
+
metadata: {}
|
55
44
|
post_install_message:
|
56
45
|
rdoc_options: []
|
57
|
-
|
58
|
-
require_paths:
|
46
|
+
require_paths:
|
59
47
|
- lib
|
60
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
-
requirements:
|
62
|
-
- -
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
segments:
|
72
|
-
- 0
|
73
|
-
version: "0"
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ! '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
74
58
|
requirements: []
|
75
|
-
|
76
59
|
rubyforge_project:
|
77
|
-
rubygems_version:
|
60
|
+
rubygems_version: 2.0.3
|
78
61
|
signing_key:
|
79
|
-
specification_version:
|
62
|
+
specification_version: 4
|
80
63
|
summary: Keep your sass files neatly organised within your Rails app
|
81
64
|
test_files: []
|
82
|
-
|