revelry_core 0.0.1 → 0.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.
- checksums.yaml +4 -4
- data/lib/generators/{revelry_core → revelry/core}/install_generator.rb +30 -26
- data/lib/revelry_core/version.rb +1 -1
- metadata +992 -992
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb75d43b87f67ed5b0ef8f75cf7ba07b8677dff1
|
4
|
+
data.tar.gz: 496036c99036527c73ba17a96b59896bd78ff349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfffa5d9a3dd242dfe30e6d63dad4a765dead067a73ab68cf7b72db8eaacc3a79d5a9b38bcb22ed54b1fae299c091c80a9997685082cfabfee71d3979c5f106a
|
7
|
+
data.tar.gz: 567ccf67e68a43d348740ac62d670c548564abaf59651351eecc3e9a154031b43b001e9f66257ea1d20dfb9b71c48904788c7d99c0192216a7f452ecf2813c4c
|
@@ -1,21 +1,21 @@
|
|
1
1
|
require 'rails/generators/base'
|
2
2
|
|
3
3
|
module Revelry
|
4
|
-
module
|
5
|
-
module
|
4
|
+
module Generators
|
5
|
+
module Core
|
6
6
|
class InstallGenerator < Rails::Generators::Base
|
7
|
-
source_root File.expand_path("
|
7
|
+
source_root File.expand_path("../templates", __FILE__)
|
8
8
|
desc "Creates a Revelry::Core initializer and copies files to your application."
|
9
9
|
class_option :orm
|
10
10
|
|
11
11
|
def revelry_app_js
|
12
12
|
create_file "app/assets/javascripts/revelry-app.js",
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
<<-JS
|
14
|
+
//= require_tree ./models
|
15
|
+
//= require_tree ./mixins
|
16
|
+
//= require_tree ./components
|
17
|
+
//= require_tree ./examples
|
18
|
+
JS
|
19
19
|
create_file "app/assets/javascripts/models/.keep"
|
20
20
|
create_file "app/assets/javascripts/mixins/.keep"
|
21
21
|
create_file "app/assets/javascripts/components/.keep"
|
@@ -27,12 +27,12 @@ module Revelry
|
|
27
27
|
if File.exist? file_name
|
28
28
|
file_name_backup = "#{file_name}.#{Time.now.to_i}"
|
29
29
|
run "mv #{file_name} #{file_name_backup}"
|
30
|
-
prepend_file file_name_backup, "// MOVED BY
|
30
|
+
prepend_file file_name_backup, "// MOVED BY revelry:core:install - In most cases you can delete this file now."
|
31
31
|
end
|
32
32
|
create_file file_name,
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
<<-JS
|
34
|
+
//= revelry/client
|
35
|
+
JS
|
36
36
|
end
|
37
37
|
|
38
38
|
def revelry_app_css
|
@@ -41,16 +41,20 @@ module Revelry
|
|
41
41
|
if File.exist? settings_destination
|
42
42
|
file_name_backup = "#{settings_source}.#{Time.now.to_i}"
|
43
43
|
run "mv #{settings_source} #{file_name_backup}"
|
44
|
-
prepend_file file_name_backup, "// MOVED BY
|
44
|
+
prepend_file file_name_backup, "// MOVED BY revelry:core:install - In most cases you can delete this file now."
|
45
45
|
end
|
46
46
|
run "cp #{settings_source} #{settings_destination}"
|
47
|
-
create_file "app/assets/stylesheets/components
|
47
|
+
create_file "app/assets/stylesheets/components/__keep.scss",
|
48
|
+
<<-SCSS
|
49
|
+
// This file can be safely deleted once you have other SASS/SCSS files in this directory.
|
50
|
+
// sass-rails just really doesn't like it when you @import a directory with no SASS in it.
|
51
|
+
SCSS
|
48
52
|
create_file "app/assets/stylesheets/revelry-app.scss",
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
53
|
+
<<-SCSS
|
54
|
+
@import "settings"; // Zurb Foundation variables and such: http://foundation.zurb.com/docs/using-sass.html
|
55
|
+
@import "revelry";
|
56
|
+
@import "components/**/*";
|
57
|
+
SCSS
|
54
58
|
end
|
55
59
|
|
56
60
|
def application_css
|
@@ -58,14 +62,14 @@ module Revelry
|
|
58
62
|
if File.exist? file_name
|
59
63
|
file_name_backup = "#{file_name}.#{Time.now.to_i}"
|
60
64
|
run "mv #{file_name} #{file_name_backup}"
|
61
|
-
prepend_file file_name_backup, "/* MOVED BY
|
65
|
+
prepend_file file_name_backup, "/* MOVED BY revelry:core:install - In most cases you can delete this file now. */"
|
62
66
|
end
|
63
67
|
create_file file_name,
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
68
|
+
<<-CSS
|
69
|
+
/*
|
70
|
+
*= require revelry-app
|
71
|
+
*/
|
72
|
+
CSS
|
69
73
|
end
|
70
74
|
end
|
71
75
|
end
|
data/lib/revelry_core/version.rb
CHANGED