bonethug 0.0.31 → 0.0.32
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/config/cnf.yml +2 -2
- data/lib/bonethug/installer.rb +33 -2
- data/lib/bonethug/version.rb +1 -1
- data/skel/base/Gemfile +1 -1
- data/skel/project_types/silverstripe3/lib/ss_loadconf.php +8 -0
- data/skel/project_types/silverstripe3/public/project/_config.php +55 -19
- data/skel/project_types/silverstripe3/public/project/code/Pages/Page.php +0 -8
- data/skel/project_types/silverstripe3/public/themes/project/scss/_functions.scss +15 -0
- data/skel/project_types/silverstripe3/public/themes/project/scss/_mixins.scss +10 -0
- data/skel/project_types/silverstripe3/public/themes/project/scss/_vars.scss +2 -0
- data/skel/project_types/silverstripe3/public/themes/project/scss/main.scss +3 -0
- data/skel/project_types/silverstripe3/public/themes/project/templates/Page.ss +0 -7
- metadata +5 -2
data/.gitignore
CHANGED
data/config/cnf.yml
CHANGED
@@ -165,11 +165,11 @@ watch:
|
|
165
165
|
-
|
166
166
|
src: public/themes/project/scss
|
167
167
|
dest: public/themes/project/css
|
168
|
-
filter: !ruby/regexp '/typography\.scss$/'
|
168
|
+
filter: !ruby/regexp '/typography\.scss$/'
|
169
169
|
coffee:
|
170
170
|
-
|
171
171
|
src: public/project/coffee
|
172
172
|
dest: public/project/javascript
|
173
|
-
filter: !ruby/regexp '
|
173
|
+
filter: !ruby/regexp '/^.+\.coffee$/'
|
174
174
|
log_dirs:
|
175
175
|
- log
|
data/lib/bonethug/installer.rb
CHANGED
@@ -37,7 +37,10 @@ module Bonethug
|
|
37
37
|
puts 'Installing '+ type + ' to ' + target + '...'
|
38
38
|
|
39
39
|
# load the configuration
|
40
|
-
|
40
|
+
unless @@conf.get('project_types').has_key? type.to_s
|
41
|
+
puts "Unsupported type: " + type.to_s
|
42
|
+
exit
|
43
|
+
end
|
41
44
|
conf = @@conf.node_merge 'base', 'project_types.' + type
|
42
45
|
|
43
46
|
# set the tmp dir
|
@@ -199,10 +202,15 @@ module Bonethug
|
|
199
202
|
@@project_config_files.each do |type, dirs|
|
200
203
|
dirs.each do |config|
|
201
204
|
|
205
|
+
# vars
|
202
206
|
src_file = @@bonthug_gem_dir + '/config/' + config
|
203
207
|
example_file = target + '/config/example/' + config if type == :editable
|
204
208
|
target_file = type == :editable ? target + '/config/' + config : target + '/.bonethug/' + config
|
205
209
|
|
210
|
+
# output
|
211
|
+
puts 'Handling ' + target_file
|
212
|
+
|
213
|
+
# what mode are we in?
|
206
214
|
if mode == :init
|
207
215
|
FileUtils.cp src_file, example_file if type == :editable and !File.exist?(example_file)
|
208
216
|
FileUtils.cp src_file, target_file unless File.exist?(target_file)
|
@@ -210,12 +218,35 @@ module Bonethug
|
|
210
218
|
FileUtils.cp src_file, example_file if type == :editable
|
211
219
|
FileUtils.cp src_file, target_file if type == :generated or !File.exist?(target_file)
|
212
220
|
else
|
213
|
-
|
221
|
+
puts "Invalid bonethugise mode"
|
222
|
+
exit
|
214
223
|
end
|
215
224
|
|
216
225
|
end
|
217
226
|
end
|
218
227
|
|
228
|
+
# Handle project type specific files
|
229
|
+
if mode == :update
|
230
|
+
target_cnf = target + '/config/cnf.yml'
|
231
|
+
project_conf = Conf.new.add target_cnf
|
232
|
+
project_type = project_conf.get('deploy.common.project_type')
|
233
|
+
if project_type
|
234
|
+
bonethug_files = @@conf.get 'project_types.' + project_type + '.bonethug_files'
|
235
|
+
bonethug_files.each do |index, file|
|
236
|
+
puts 'Handling ' + index.to_s + ':' + file.to_s
|
237
|
+
src_file = @@bonthug_gem_dir +
|
238
|
+
'/skel/project_types/' +
|
239
|
+
project_type +
|
240
|
+
'/' +
|
241
|
+
file
|
242
|
+
dst_file = target + '/' + file
|
243
|
+
FileUtils.cp src_file, dst_file
|
244
|
+
end
|
245
|
+
else
|
246
|
+
puts "Couldn't find project type in " + target_cnf
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
219
250
|
# handle gemfile
|
220
251
|
gemfile_path = target + '/Gemfile'
|
221
252
|
if File.exist? gemfile_path
|
data/lib/bonethug/version.rb
CHANGED
data/skel/base/Gemfile
CHANGED
@@ -73,6 +73,13 @@ switch(APPLICATION_ENV){
|
|
73
73
|
|
74
74
|
}
|
75
75
|
|
76
|
+
// Allow override in dev and stage mode for testing asset pipeline
|
77
|
+
// ---------------------------
|
78
|
+
|
79
|
+
if (!empty($_GET['env']) && (APPLICATION_ENV == 'staging' || APPLICATION_ENV == 'development')) {
|
80
|
+
Director::set_environment_type(SS_LoadConf::translate_env($_GET['env']));
|
81
|
+
}
|
82
|
+
|
76
83
|
// DB
|
77
84
|
// ---------------------------
|
78
85
|
|
@@ -119,29 +126,58 @@ if (!defined('SS_SITE_DATABASE_NAME')) define('SS_SITE_DATABASE_NAME', $database
|
|
119
126
|
Config::inst()->update('GDBackend', 'default_quality', 80);
|
120
127
|
|
121
128
|
|
122
|
-
//
|
129
|
+
// Assets
|
123
130
|
// ---------------------------
|
124
131
|
|
125
|
-
|
126
|
-
Requirements::
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
)
|
132
|
+
Requirements::set_write_js_to_body(true);
|
133
|
+
Requirements::set_combined_files_enabled(true);
|
134
|
+
|
135
|
+
// CSS
|
136
|
+
// ---
|
137
|
+
|
138
|
+
$cssRequirements = array(
|
139
|
+
'themes/project/css/styles.css',
|
140
|
+
'themes/project/css/typography.css'
|
135
141
|
);
|
142
|
+
Requirements::combine_files('application.css', $cssRequirements);
|
136
143
|
|
144
|
+
// Primary JS
|
145
|
+
// ----------
|
137
146
|
|
138
|
-
|
139
|
-
|
147
|
+
$jsRequirements = array(
|
148
|
+
'vendor/jquery/jquery.min.js',
|
149
|
+
'project/javascript/main.js',
|
150
|
+
'project/javascript/forms.js'
|
151
|
+
);
|
152
|
+
Requirements::combine_files('application.js', $jsRequirements);
|
140
153
|
|
141
|
-
|
142
|
-
|
154
|
+
// HTML5 Shims
|
155
|
+
// -----------
|
156
|
+
|
157
|
+
$shimRequirments = array(
|
158
|
+
'vendor/selectivizr/selectivizr.min.js',
|
159
|
+
'vendor/respond/respond.min.js',
|
160
|
+
'vendor/modernizr/modernizr.js'
|
161
|
+
);
|
162
|
+
Requirements::combine_files('lte-ie8-shims.js',$shimRequirments);
|
163
|
+
RequirementsHelper::require_block(array_merge(
|
164
|
+
array('assets/_combinedfiles/lte-ie8-shims.js'),
|
165
|
+
$shimRequirments
|
166
|
+
));
|
167
|
+
Requirements::insertHeadTags('
|
168
|
+
<!--[if (gte IE 6)&(lte IE 8)]>
|
169
|
+
<script src="/assets/_combinedfiles/lte-ie8-shims.js"></script>
|
170
|
+
<![endif]-->
|
171
|
+
');
|
172
|
+
|
173
|
+
// block all front end requirements from the cms
|
174
|
+
LeftAndMainHelper::require_block(array_merge(
|
143
175
|
array(
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
)
|
176
|
+
'assets/_combinedfiles/application.css',
|
177
|
+
'assets/_combinedfiles/application.js',
|
178
|
+
'assets/_combinedfiles/lte-ie8-shims.js'
|
179
|
+
),
|
180
|
+
$cssRequirements,
|
181
|
+
$jsRequirements,
|
182
|
+
$shimRequirments
|
183
|
+
));
|
@@ -44,14 +44,6 @@ class Page_Controller extends ContentController {
|
|
44
44
|
|
45
45
|
public function init() {
|
46
46
|
parent::init();
|
47
|
-
|
48
|
-
// Note: you should use SS template require tags inside your templates
|
49
|
-
// instead of putting Requirements calls here. However these are
|
50
|
-
// included so that our older themes still work
|
51
|
-
Requirements::themedCSS('reset');
|
52
|
-
Requirements::themedCSS('layout');
|
53
|
-
Requirements::themedCSS('typography');
|
54
|
-
Requirements::themedCSS('form');
|
55
47
|
}
|
56
48
|
|
57
49
|
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
@function image-path($file) {
|
2
|
+
@return $image-path + '/' + $file;
|
3
|
+
}
|
4
|
+
|
5
|
+
@function font-path($file) {
|
6
|
+
@return $font-path + '/' + $file;;
|
7
|
+
}
|
8
|
+
|
9
|
+
@function image-url($file) {
|
10
|
+
@return url(image-path($file));
|
11
|
+
}
|
12
|
+
|
13
|
+
@function font-url($file) {
|
14
|
+
@return url(font-path($file));
|
15
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
@mixin define-font($font-name, $font) {
|
2
|
+
@font-face {
|
3
|
+
font-family: $font-name;
|
4
|
+
src: url(font_path('#{$font}.eot'));
|
5
|
+
src: url(font_path('#{$font}.eot')) format('embedded-opentype'),
|
6
|
+
url(font_path('#{$font}.woff')) format('woff'),
|
7
|
+
url(font_path('#{$font}.ttf')) format('truetype'),
|
8
|
+
url(font_path('#{$font}.svg')) format('svg');
|
9
|
+
}
|
10
|
+
}
|
@@ -19,13 +19,6 @@
|
|
19
19
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
20
20
|
$MetaTags(false)
|
21
21
|
|
22
|
-
<!--[if lt IE 9]>
|
23
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
24
|
-
<![endif]-->
|
25
|
-
|
26
|
-
<% require themedCSS('application') %>
|
27
|
-
<% require themedCSS('typography') %>
|
28
|
-
|
29
22
|
<link rel="shortcut icon" href="themes/project/images/favicon.ico" type="image/x-icon" />
|
30
23
|
<link rel="apple-touch-icon" href="themes/project/images/apple-touch-icon.png" />
|
31
24
|
<link rel="apple-touch-icon" sizes="57x57" href="themes/project/images/apple-touch-icon-57x57.png" />
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bonethug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.32
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -384,6 +384,9 @@ files:
|
|
384
384
|
- skel/project_types/silverstripe3/public/themes/project/images/favicons/apple-touch-icon.png
|
385
385
|
- skel/project_types/silverstripe3/public/themes/project/images/favicons/favicon.ico
|
386
386
|
- skel/project_types/silverstripe3/public/themes/project/images/favicons/iconifier-readme.txt
|
387
|
+
- skel/project_types/silverstripe3/public/themes/project/scss/_functions.scss
|
388
|
+
- skel/project_types/silverstripe3/public/themes/project/scss/_mixins.scss
|
389
|
+
- skel/project_types/silverstripe3/public/themes/project/scss/_vars.scss
|
387
390
|
- skel/project_types/silverstripe3/public/themes/project/scss/main.scss
|
388
391
|
- skel/project_types/silverstripe3/public/themes/project/scss/typography.scss
|
389
392
|
- skel/project_types/silverstripe3/public/themes/project/templates/Includes/.gitkeep
|