anila 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/anila/cli/generator.rb +25 -18
- data/lib/anila/cli/version.rb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d091e4031b43e27504c2976fa69d3fb2891477a
|
4
|
+
data.tar.gz: ff5042bf9c5f7a1513b7cffcaae80598f1f2aa2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 629ded168f29e7fc49ebc505bd2a0d162d75dc00a25f1e7d52fbb6f362e291809eccec364572db6131cfbafeef0991cdcc74ec66ce52e8d55c94cf40ff06dd07
|
7
|
+
data.tar.gz: a804e915b727f868d95a8628dc71d433b6abaca85c9ecd6b79ee2990f0b6ffaec0d7b588e0334bc2af690bdb1ff5594f203606d163d67a51af451d592d8538f2
|
data/lib/anila/cli/generator.rb
CHANGED
@@ -30,12 +30,17 @@ module Anila
|
|
30
30
|
end
|
31
31
|
|
32
32
|
if deps.include?("bower") && !which("bower")
|
33
|
-
say "Can't find
|
33
|
+
say "Can't find Bower. You can install it by running: [sudo] npm install -g bower"
|
34
34
|
exit 1
|
35
35
|
end
|
36
36
|
|
37
37
|
if deps.include?("grunt") && !which("grunt")
|
38
|
-
say "Can't find
|
38
|
+
say "Can't find Grunt. You can install it by running: [sudo] npm install -g grunt-cli"
|
39
|
+
exit 1
|
40
|
+
end
|
41
|
+
|
42
|
+
if deps.include?("gulp") && !which("gulp")
|
43
|
+
say "Can't find Gulp. You can install it by running: [sudo] npm install -g gulp"
|
39
44
|
exit 1
|
40
45
|
end
|
41
46
|
|
@@ -77,7 +82,7 @@ module Anila
|
|
77
82
|
bower_directory = JSON.parse(File.read(".bowerrc"))["directory"]
|
78
83
|
|
79
84
|
gsub_file "config.rb", /require [\"\']anila[\"\']/ do |match|
|
80
|
-
match = "add_import_path \"#{bower_directory}/anila/
|
85
|
+
match = "add_import_path \"#{bower_directory}/anila/sass\""
|
81
86
|
end
|
82
87
|
|
83
88
|
unless File.exists?("bower.json")
|
@@ -101,10 +106,6 @@ module Anila
|
|
101
106
|
|
102
107
|
Anila has been setup in your project.
|
103
108
|
|
104
|
-
Please update references to javascript files to look something like:
|
105
|
-
|
106
|
-
<script src="#{bower_directory}/js/app.min.js"></script>
|
107
|
-
|
108
109
|
To update Anila in the future, just run: anila update
|
109
110
|
|
110
111
|
EOS
|
@@ -112,11 +113,15 @@ To update Anila in the future, just run: anila update
|
|
112
113
|
|
113
114
|
desc "new", "create new project"
|
114
115
|
option :grunt, type: :boolean, default: false
|
116
|
+
option :gulp, type: :boolean, default: false
|
115
117
|
option :version, type: :string
|
116
118
|
def new(name)
|
117
119
|
if options[:grunt]
|
118
120
|
install_dependencies(%w{git node bower grunt})
|
119
121
|
repo = "https://github.com/bravocado/anila-grunt-template.git"
|
122
|
+
elsif options[:gulp]
|
123
|
+
install_dependencies(%w{git node gulp})
|
124
|
+
repo = "https://github.com/bravocado/anila-gulp-template.git"
|
120
125
|
else
|
121
126
|
install_dependencies(%w{git node bower compass})
|
122
127
|
repo = "https://github.com/bravocado/anila-compass-template.git"
|
@@ -126,26 +131,28 @@ To update Anila in the future, just run: anila update
|
|
126
131
|
empty_directory(name)
|
127
132
|
run("git clone #{repo} #{name}", capture: true, verbose: false)
|
128
133
|
inside(name) do
|
129
|
-
say "Installing dependencies with bower..."
|
130
|
-
run("bower install", capture: true, verbose: false)
|
131
|
-
File.open("src/scss/style.scss", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/scss/style.scss") }
|
132
|
-
File.open("src/scss/noscript.scss", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/scss/noscript.scss") }
|
133
|
-
File.open("src/scss/_values.scss", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/scss/anila/_values.scss") }
|
134
|
-
File.open("src/scss/_conditional.scss", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/scss/anila/_conditional.scss") }
|
135
134
|
if options[:grunt]
|
135
|
+
say "Installing dependencies..."
|
136
|
+
run("bower install", capture: true, verbose: false)
|
137
|
+
File.open("build/sass/_values.scss", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/build/sass/anila/_values.scss") }
|
138
|
+
File.open("build/sass/_conditional.scss", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/build/sass/anila/_conditional.scss") }
|
139
|
+
run "npm install"
|
140
|
+
run "grunt build"
|
141
|
+
elsif options[:gulp]
|
142
|
+
say "Installing dependencies..."
|
136
143
|
run "npm install"
|
137
|
-
|
144
|
+
File.open("build/sass/_values.scss", "w") {|f| f.puts File.read("#{destination_root}/node_modules/anila/sass/anila/_values.scss") }
|
145
|
+
File.open("build/sass/_conditional.scss", "w") {|f| f.puts File.read("#{destination_root}/node_modules/anila/sass/anila/_conditional.scss") }
|
146
|
+
run "gulp clean && gulp build"
|
138
147
|
else
|
148
|
+
say "Installing dependencies..."
|
149
|
+
run("bower install", capture: true, verbose: false)
|
139
150
|
if defined?(Bundler)
|
140
151
|
Bundler.with_clean_env do
|
141
152
|
run "compass compile"
|
142
153
|
end
|
143
154
|
end
|
144
155
|
end
|
145
|
-
File.open("dist/js/modernizr.min.js", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/js/modernizr.min.js") }
|
146
|
-
File.open("dist/js/jquery.min.js", "w") {|f| f.puts File.read("#{destination_root}/bower_components/jquery/dist/jquery.min.js") }
|
147
|
-
File.open("dist/js/legacy.min.js", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/js/legacy.min.js") }
|
148
|
-
File.open("dist/js/iconfont-fallback.min.js", "w") {|f| f.puts File.read("#{destination_root}/bower_components/anila/js/iconfont-fallback.min.js") }
|
149
156
|
run("git remote rm origin", capture: true, verbose: false)
|
150
157
|
end
|
151
158
|
|
data/lib/anila/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anila
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bravocado
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: thor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.18.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.18.1
|
55
55
|
description: A CLI for working with Anila
|
@@ -60,7 +60,7 @@ executables:
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
-
- .gitignore
|
63
|
+
- ".gitignore"
|
64
64
|
- Gemfile
|
65
65
|
- LICENSE.txt
|
66
66
|
- README.md
|
@@ -80,17 +80,17 @@ require_paths:
|
|
80
80
|
- lib
|
81
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.4.5
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Easy starting a project with Anila
|