flexy 1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 34e2c966b22c54d1f60fc12d5249024f122aa820
4
+ data.tar.gz: 2d9895b14c03cb1c61fe1c9ae9cb521a887dd0bc
5
+ SHA512:
6
+ metadata.gz: 960e092aca02fd2dc62f3cdfa143fa374dac9a75119ed833bb334a800099294ef227081e9a7771966db292fdf6435c13715b47adabd3dd890738219889cf9ce2
7
+ data.tar.gz: 58de07412923f5c8a4ebb69b170f0d0a23a392bd3260ef9fd38a9284ffacd014bca3da55cd734621a6dfd20821c3b8675903dd2b240149e6714a67766cbe6d61
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ Compass Extension Template
2
+ ==========================
3
+
4
+ Whenever I'm creating a [Compass extension](http://compass-style.org/help/tutorials/extensions/), I find that I always use the same basic template for creating extensions, and that the project that Compass comes with isn't quite complete enough to get me where I need to be. With that in mind, I've created this little project to get you on your way. Here's a little template that I've put together to kickstart Compass extension development. Wherever it says "Extension" in the template files/file names, replace it with *your* extension's name. All files are self documented; please read the documentation there.
5
+
6
+ ## lib/extension.rb
7
+
8
+ Your `lib` directory is your Ruby directory. The main file in here is **extension.rb** which contains the information that Compass needs to make your Extension run like a champ. It contains the Compass requires for other gems (like you would include in *config.rb* normally), the code to register your extension with Compass, the version number and date of the version, and any SassScript you may want to write.
9
+
10
+ ## stylesheets/_extension.scss
11
+
12
+ Your `stylesheets` directory is where you write all of your extension's Sass! I've included **_extension.scss**, but you can include whatever you'd like. Write Sass or SCSS, do what works for you! Have sub folders, have sub partials, this is your playground. Important to note: make sure that every file in here is a Partial unless there is a file you specifically want to be output as a full file. Generally speaking, most Compass extensions *only* have partial files.
13
+
14
+ ## templates/project
15
+
16
+ Your `templates` directory is where you store any project templates/patterns you'd like a user to be able to use. The Compass Extension documentation explains in full what a template/pattern can do, the one provided is a generic one including print, i.e., and screen stylesheets that will import your extension. This will provide users with the ability to create a new project using your Compass extension in the following way:
17
+
18
+ `compass create <my_project> -r extension --using extension`
19
+
20
+ ## CHANGELOG.md/README.md
21
+
22
+ These files aren't required for your Compass extension, but I really like including them as they are useful for Users to understand the direction of your Compass extension. Yes! That means you get to throw this README out and write your own! Do it!
23
+
24
+ ## extension.gemspec
25
+
26
+ This is the magic file that will turn your collection of files into a packaged Compass extension! It's all laid out for you, just add/change what you need! When you're all done editing what you need, in the command line, from the directory where that lives, type the following:
27
+
28
+ `gem build extension.gemspec`
29
+
30
+ This will bundle your extension up into a Ruby gem. From there, if you're just using it locally, you can install your Extension in by typing the following:
31
+
32
+ `gem install extension-VERSION.gem`
33
+
34
+ If you're looking to distribute your extension, first, make sure you've got a [Ruby Gems](http://rubygems.org/) account, and type in the following:
35
+
36
+ `gem push extension-VERSION.gem`
37
+
38
+ If you're not logged in to Ruby Gems, it will ask you to log in, then it will push your extension up to Ruby Gems! Tada! It's now distributed to the world! To install a Compass extension from Ruby Gems, it's as simple as:
39
+
40
+ `gem install extension`
41
+
42
+ <hr>
43
+
44
+ # AND YOU'RE DONE.
45
+
46
+ <hr>
47
+
48
+ ## Special Thanks
49
+ Super special thanks goes out to [Nathan Weizenbaum](https://github.com/nex3/) for Sass, [Chris Eppstein](https://github.com/chriseppstein/) for Compass, and [Mason Wendell](https://github.com/canarymason/) and [Scott Kellum](https://github.com/scottkellum/), my Compass extension partners in crime. Much of what's presented here is an amalgamation of what Chris, Mason, and Scott have taught me, so double thanks to them.
50
+
51
+ ## License
52
+ [Creative Commons Attribution 3.0](http://creativecommons.org/licenses/by/3.0). Go wild.
53
+
54
+ If you're able to link me to your extension so I can see what you've built, that'd be awesome!
data/lib/flexy.rb ADDED
@@ -0,0 +1,30 @@
1
+ # All gems that are required for this extension to work should go here.
2
+ # These are the requires you would normally put in your config.rb file
3
+ # By default, you should always included Compass. Do not include your
4
+ # extension.
5
+ require 'compass'
6
+
7
+ # This tells Compass what your Compass extension is called, and where to find
8
+ # its files
9
+ # Replace 'extension' with the name of your extension. Spaces allowed.
10
+ extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
11
+ Compass::Frameworks.register('flexy', :path => extension_path)
12
+
13
+ # Version and date of version for your Compass extension.
14
+ # Replace Extension with the name of your extension
15
+ # Letters, numbers, and underscores only
16
+ # Version is a number. If a version contains alphas, it will be created as
17
+ # a prerelease version
18
+ # Date is in the form of YYYY-MM-DD
19
+ module Extension
20
+ VERSION = "1.0"
21
+ DATE = "2014-06-03"
22
+ end
23
+
24
+ # This is where any custom SassScript should be placed. The functions will be
25
+ # available on require of your extension without the need for users to import
26
+ # any partials. Uncomment below.
27
+
28
+ # module Sass::Script::Functions
29
+ #
30
+ # end
@@ -0,0 +1,43 @@
1
+ @import "compass/css3/shared";
2
+
3
+ $flexy-support: not -moz, -webkit, not -o, not -ms, not -khtml, official !default;
4
+ $flexy-breakpoint: 769px !default;
5
+
6
+ @mixin flexy(
7
+ $el: li,
8
+ $direction: row,
9
+ $align: stetch,
10
+ $justify: flex-start,
11
+ $grow: 0 1 auto,
12
+ $breakpoint: $flexy-breakpoint) {
13
+
14
+ @media (min-width: $breakpoint) {
15
+
16
+ // Establish the flex formatting context
17
+ @include experimental-value(display,flex,$flexy-support...);
18
+
19
+ // Set the default flex-direction
20
+ @include experimental(flex-direction,$direction,$flexy-support...);
21
+
22
+ // Align flex items
23
+ @include experimental(align-items,$align,$flexy-support...);
24
+
25
+ // Define the flex container alignment
26
+ @include experimental(justify-content,$justify,$flexy-support...);
27
+
28
+ // Grow all flex items
29
+ & > #{$el} {
30
+ @include experimental(flex,$grow,$flexy-support...);
31
+ }
32
+ }
33
+ }
34
+ @mixin flexy-grow($item, $amt) {
35
+ // Grow individual flex items
36
+ & > :nth-child(#{$item}) {
37
+ @include experimental(flex-grow,$amt,$flexy-support...);
38
+ }
39
+ }
40
+ @mixin flexy-order($order) {
41
+ // Change order of flex items
42
+ @include experimental(order,$order,$flexy-support...);
43
+ }
@@ -0,0 +1,19 @@
1
+ # Description
2
+ description "A simple Compass extension for Flexbox!"
3
+
4
+ # Stylesheet Import
5
+ file 'screen.scss', :like => :stylesheet, :media => 'screen, projection'
6
+
7
+ # General File Import
8
+ # file 'README.md', :to => "README.md"
9
+
10
+ # Compass Extension Help
11
+ help %Q{
12
+ Help for your Compass extension
13
+ }
14
+
15
+ # Compass Extension Welcome Message
16
+ # Users will see this when they create a new project using this template.
17
+ welcome_message %Q{
18
+ You have successfully installed Flexy!
19
+ }
@@ -0,0 +1,3 @@
1
+ // This file will get output into the user's Sass folder.
2
+ // We're going to import our extension's Sass here! Remember to change it!
3
+ @import "extension";
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flexy
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.0'
5
+ platform: ruby
6
+ authors:
7
+ - Guil Hernandez
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sass
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.2.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: compass
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.12.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.12.1
41
+ description: A simple Flexbox Compass extension.
42
+ email:
43
+ - guil@teamtreehouse.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - README.md
49
+ - lib/flexy.rb
50
+ - stylesheets/_flexy.scss
51
+ - templates/project/manifest.rb
52
+ - templates/project/screen.scss
53
+ homepage: http://teamtreehouse.com
54
+ licenses: []
55
+ metadata: {}
56
+ post_install_message:
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: 1.3.6
70
+ requirements: []
71
+ rubyforge_project: flexy
72
+ rubygems_version: 2.2.2
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Using Flexbox has never been easier.
76
+ test_files: []