mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-09 11:34:24 +08:00
Less magic in Grunt
This commit is contained in:
+13
-9
@@ -33,9 +33,6 @@ add = (subtasks, defaults = {}) ->
|
||||
, {})
|
||||
|
||||
get_base = (vars, min = false) ->
|
||||
if typeof(vars.base) == 'string'
|
||||
return vars.base
|
||||
|
||||
return if min then '/sbs/' else '/'
|
||||
|
||||
module.exports = (grunt) ->
|
||||
@@ -176,9 +173,21 @@ module.exports = (grunt) ->
|
||||
grunt.config 'copy', add([
|
||||
[ 'main', {
|
||||
src: [ '.htaccess', 'tests/the_raven/*' ]
|
||||
options: {
|
||||
processContent: (content) ->
|
||||
grunt.template.process content, { data: {
|
||||
base: get_base(vars)
|
||||
}}
|
||||
}
|
||||
}]
|
||||
[ 'min', {
|
||||
src: [ '.htaccess', 'tests/the_raven/*' ]
|
||||
options: {
|
||||
processContent: (content) ->
|
||||
grunt.template.process content, { data: {
|
||||
base: get_base(vars, true)
|
||||
}}
|
||||
}
|
||||
}]
|
||||
[ 'min_fonts', {
|
||||
cwd: 'build/bower_components/fontawesome/fonts'
|
||||
@@ -194,12 +203,7 @@ module.exports = (grunt) ->
|
||||
dest + src.replace('-USAGE', '')
|
||||
options: {}
|
||||
}]
|
||||
], {
|
||||
options: {
|
||||
processContent: (content) ->
|
||||
grunt.template.process content, { data: { base: get_base(vars) } }
|
||||
}
|
||||
})
|
||||
])
|
||||
|
||||
grunt.config 'jade', add([
|
||||
[ 'main', { options: {
|
||||
|
||||
Reference in New Issue
Block a user