Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
grunt-monty-python
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
1762cff9
authored
2016-05-25 11:17:05 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add webfont support.
1 parent
fe88d5c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
grunt-monty-python.js
grunt-monty-python.js
View file @
1762cff
...
...
@@ -582,6 +582,30 @@ module.exports = function (grunt) {
}
}
if
(
mpConfig
.
fonts
)
{
var
fontExtensionPattern
=
initConfig
.
fonts
.
extensions
||
'{eot,svg,ttf,woff,woff2}'
;
initConfig
.
copy
.
font
=
{
files
:
[{
expand
:
true
,
dot
:
true
,
cwd
:
mpConfig
.
base
,
dest
:
'dist/build'
,
src
:
_
.
map
(
mpConfig
.
fonts
.
options
.
dirs
,
function
(
value
)
{
return
value
+
'/{,**/}*.'
+
fontExtensionPattern
;
}),
}]
};
if
(
mpConfig
.
useRev
)
{
initConfig
.
rev
.
font
=
{
files
:
{
src
:
_
.
map
(
mpConfig
.
fonts
.
options
.
dirs
,
function
(
value
)
{
return
'dist/build/'
+
value
+
'/{,**/}*.'
+
fontExtensionPattern
;
}),
}
};
}
}
if
(
mpConfig
.
bower
)
{
externalMultiTask
(
'bower'
,
'run bower externally'
,
'bower'
,
function
(
target
,
options
,
configFile
)
{
return
[
'--config.directory='
+
options
.
directory
,
target
];
...
...
@@ -764,6 +788,10 @@ module.exports = function (grunt) {
minifyList
.
push
(
'svgmin'
);
// image
revList
.
push
(
'rev:img'
);
// image
}
if
(
mpConfig
.
fonts
)
{
copyList
.
push
(
'copy:font'
);
// font
revList
.
push
(
'rev:font'
);
// font
}
//buildList.push('autoprefixer'); // css
if
(
mpConfig
.
punch
)
{
copyList
.
push
(
'concat:generated'
);
// montyPython
...
...
Please
register
or
sign in
to post a comment