modularis 0.1 → 1.0

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.
@@ -1,18 +0,0 @@
1
- module Modularis
2
- class Engine < Rails::Engine
3
- # Save this block, we'll use it in two calls to .initializer
4
- add_paths_block = lambda { |app|
5
- app.config.assets.paths << File.expand_path("../../../scss", __FILE__)
6
- app.config.assets.paths << File.expand_path("../../../js", __FILE__)
7
- app.config.assets.precompile += %w(vendor/zepto.js vendor/custom.modernizr.js)
8
- }
9
-
10
- # Standard initializer
11
- initializer 'modularis.update_asset_paths', &add_paths_block
12
-
13
- # Special initializer lets us precompile assets without fully initializing
14
- initializer 'modularis.update_asset_paths', :group => :assets,
15
- &add_paths_block
16
-
17
- end
18
- end
@@ -1,15 +0,0 @@
1
- Description:
2
- Setup Modularis assets in your app and generate new layouts preconfigured to use Modularis
3
-
4
- Example:
5
- rails g modularis:install
6
-
7
- This will insert modularis require lines into default application assets:
8
- /app/assets/javascripts/application.js
9
- /app/assets/stylesheets/application.css
10
-
11
- And create sample layout (depending of your template engine):
12
- /app/views/layouts/application.html.erb
13
-
14
- And modularis variables override file:
15
- /app/assets/stylesheets/modularis_and_overrides.scss
@@ -1,54 +0,0 @@
1
- require 'rails/generators'
2
-
3
- module Modularis
4
- module Generators
5
- class InstallGenerator < Rails::Generators::Base
6
- source_root File.join(File.dirname(__FILE__), 'templates')
7
- argument :layout_name, :type => :string, :default => 'application', :banner => 'layout_name'
8
-
9
- class_option :haml, :desc => 'Generate HAML layout instead of erb', :type => :boolean
10
- class_option :slim, :desc => 'Generate Slim layout instead of erb', :type => :boolean
11
-
12
- def add_assets
13
- # rails_ujs breaks, need to incorporate rails-behavior plugin for this to work seamlessly
14
- # gsub_file "app/assets/javascripts/application#{detect_js_format[0]}", /\/\/= require jquery\n/, ""
15
- insert_into_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[1]} require modularis\n", :after => "jquery_ujs\n"
16
- append_to_file "app/assets/javascripts/application#{detect_js_format[0]}", "\n$(function(){ $(document).modularis(); });\n"
17
- settings_file = File.join(File.dirname(__FILE__),"..","..","..","scss","modularis","_settings.scss")
18
- create_file "app/assets/stylesheets/modularis_and_overrides.scss", File.read(settings_file)
19
- append_to_file "app/assets/stylesheets/modularis_and_overrides.scss", "\n@import 'modularis';\n"
20
- insert_into_file "app/assets/stylesheets/application#{detect_css_format[0]}", "#{detect_css_format[1]} require modularis_and_overrides\n", :after => "require_self\n"
21
- end
22
-
23
- def detect_js_format
24
- return ['.coffee', '#='] if File.exist?('app/assets/javascripts/application.coffee')
25
- return ['.js.coffee', '#='] if File.exist?('app/assets/javascripts/application.js.coffee')
26
- return ['.js', '//='] if File.exist?('app/assets/javascripts/application.js')
27
- end
28
-
29
- def detect_css_format
30
- return ['.css', ' *='] if File.exist?('app/assets/stylesheets/application.css')
31
- return ['.css.sass', ' //='] if File.exist?('app/assets/stylesheets/application.css.sass')
32
- return ['.sass', ' //='] if File.exist?('app/assets/stylesheets/application.sass')
33
- return ['.css.scss', ' //='] if File.exist?('app/assets/stylesheets/application.css.scss')
34
- return ['.scss', ' //='] if File.exist?('app/assets/stylesheets/application.scss')
35
- end
36
-
37
- def create_layout
38
- if options.haml?||(defined?(Haml) && !options.slim?)
39
- template 'application.html.haml', "app/views/layouts/#{file_name}.html.haml"
40
- elsif options.slim?||(defined?(Slim) && !options.haml?)
41
- template 'application.html.slim', "app/views/layouts/#{file_name}.html.slim"
42
- else
43
- template 'application.html.erb', "app/views/layouts/#{file_name}.html.erb"
44
- end
45
- end
46
-
47
- private
48
-
49
- def file_name
50
- layout_name.underscore.downcase
51
- end
52
- end
53
- end
54
- end
@@ -1,46 +0,0 @@
1
- <!DOCTYPE html>
2
- <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
3
- <!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]-->
4
- <!--[if IE 7 ]> <html class="ie7" lang="en"> <![endif]-->
5
- <!--[if IE 8 ]> <html class="ie8" lang="en"> <![endif]-->
6
- <!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
7
- <head>
8
- <meta charset="utf-8" />
9
-
10
- <!-- Uncomment to make IE8 render like IE7 -->
11
- <!-- <meta http-equiv="X-UA-Compatible" content="IE=7" /> -->
12
-
13
- <!-- Set the viewport width to device width for mobile -->
14
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
15
-
16
- <title><%%= content_for?(:title) ? yield(:title) : "Untitled" %></title>
17
-
18
- <%%= stylesheet_link_tag "application" %>
19
- <%%= javascript_include_tag "vendor/custom.modernizr" %>
20
- <%%= csrf_meta_tags %>
21
- </head>
22
-
23
- <body>
24
-
25
- <%%= yield %>
26
-
27
- <% if false %>
28
- <script>
29
- document.write('<script src=' +
30
- ('__proto__' in {} ? '<%%= asset_path("vendor/zepto") %>' : '<%%= asset_path("jquery") %>') +
31
- '><\/script>');
32
- </script>
33
-
34
- <script>
35
- // Ensure rails_ujs works with Zepto
36
- $.fn.ajaxSend = function(callback) {
37
- return this.each(function(){
38
- $(this).on('ajaxBeforeSend', callback);
39
- });
40
- };
41
- var jQuery = $;
42
- </script>
43
- <% end %>
44
- <%%= javascript_include_tag "application" %>
45
- </body>
46
- </html>
@@ -1,31 +0,0 @@
1
- !!! 5
2
- / paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
3
- /[if lt IE 7 ] <html class=\"ie6\" lang=\"en\">
4
- /[if IE 7 ] <html class=\"ie7\" lang=\"en\">
5
- /[if IE 8 ] <html class=\"ie8\" lang=\"en\">
6
- /[if IE 9 ] <html class=\"ie9\" lang=\"en\">
7
- /[if (gt IE 9)|!(IE)] <!--> <html lang=\"en\">
8
-
9
- %head
10
- %meta{ :charset => "utf-8" }
11
-
12
- -# Uncomment to make IE8 render like IE7
13
- -# meta http-equiv="X-UA-Compatible" content="IE=7"
14
-
15
- -# Set the viewport width to device width for mobile
16
- %meta{ :name => "viewport", :content => "width=device-width, initial-scale=1.0" }
17
-
18
- %title= content_for?(:title) ? yield(:title) : "Untitled"
19
-
20
- = stylesheet_link_tag "application"
21
- = javascript_include_tag "vendor/custom.modernizr"
22
- = csrf_meta_tag
23
-
24
- %body
25
-
26
- = yield
27
-
28
- = javascript_include_tag "application"
29
-
30
- :plain
31
- </html>
@@ -1,28 +0,0 @@
1
- doctype html
2
- == "<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->"
3
- == "<!--[if lt IE 7 ]> <html class=\"ie6\" lang=\"en\"> <![endif]-->"
4
- == "<!--[if IE 7 ]> <html class=\"ie7\" lang=\"en\"> <![endif]-->"
5
- == "<!--[if IE 8 ]> <html class=\"ie8\" lang=\"en\"> <![endif]-->"
6
- == "<!--[if IE 9 ]> <html class=\"ie9\" lang=\"en\"> <![endif]-->"
7
- == "<!--[if (gt IE 9)|!(IE)]><!--> <html lang=\"en\"> <!--<![endif]-->"
8
-
9
- head
10
- meta charset="utf-8"
11
-
12
- / Uncomment to make IE8 render like IE7
13
- / meta http-equiv="X-UA-Compatible" content="IE=7"
14
-
15
- / Set the viewport width to device width for mobile
16
- meta name="viewport" content="width=device-width, initial-scale=1.0"
17
-
18
- title= content_for?(:title) ? yield(:title) : "Untitled"
19
-
20
- = stylesheet_link_tag "application"
21
- = javascript_include_tag "vendor/custom.modernizr"
22
- = csrf_meta_tag
23
-
24
- body
25
-
26
- == yield
27
-
28
- = javascript_include_tag "application"
@@ -1,3 +0,0 @@
1
- module Modularis
2
- VERSION = "0.1"
3
- end
data/modularis.gemspec DELETED
@@ -1,20 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/modularis/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["ThemePile"]
6
- gem.email = ["shaggysmile@gmail.com"]
7
- gem.description = %q{a powerful, scalable, Sass-based, BEM, OOCSS framework}
8
- gem.summary = %q{a powerful, scalable, Sass-based, BEM, OOCSS framework}
9
- gem.homepage = "http://modularis.themepile.co.uk"
10
-
11
- gem.files = `git ls-files`.split($\)
12
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
- gem.name = "modularis"
15
- gem.require_paths = ["lib"]
16
- gem.version = Modularis::VERSION
17
-
18
- gem.add_dependency "sass", [">= 3.2.0"]
19
- gem.add_development_dependency "rake"
20
- end
data/package.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "name": "themepile-modularis",
3
- "version": "4.0.0-wip",
4
- "devDependencies": {
5
- "grunt": "~0.4.0",
6
- "grunt-contrib-watch": "~0.1.0",
7
- "grunt-contrib-qunit": "~0.1.1"
8
- },
9
- "licenses": [
10
- {
11
- "type": "MIT",
12
- "url": "https://github.com/themepile/modularis/blob/master/LICENSE"
13
- }
14
- ]
15
- }