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
ed895a01
authored
2015-09-03 12:36:14 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Image support.:w
1 parent
0e5fb378
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
10 deletions
grunt-monty-python.js
package.json
grunt-monty-python.js
View file @
ed895a0
...
...
@@ -42,12 +42,8 @@ module.exports = function (grunt) {
};
if
(
common
.
useRev
)
{
initConfig
.
rev
=
{
css
:
{
files
:
{
src
:
_
.
map
(
common
.
css
.
options
.
dirs
,
function
(
value
)
{
return
'dist/'
+
value
+
'/{,**/}*.css'
;
}),
}
dist
:
{
files
:
[],
},
};
}
...
...
@@ -216,6 +212,7 @@ module.exports = function (grunt) {
};
}
if
(
common
.
css
)
{
initConfig
.
copy
.
css
=
{
files
:
[{
expand
:
true
,
...
...
@@ -231,14 +228,75 @@ module.exports = function (grunt) {
initConfig
.
usemin
.
css
=
_
.
map
(
common
.
css
.
options
.
dirs
,
function
(
value
)
{
return
'dist/'
+
value
+
'/{,**/}*.css'
;
});
if
(
common
.
useRev
)
{
initConfig
.
rev
.
css
=
{
files
:
{
src
:
_
.
map
(
common
.
css
.
options
.
dirs
,
function
(
value
)
{
return
'dist/'
+
value
+
'/{,**/}*.css'
;
}),
}
};
}
}
if
(
common
.
images
)
{
initConfig
.
imagemin
=
{
dist
:
{
files
:
_
.
map
(
common
.
images
.
options
.
dirs
,
function
(
value
)
{
return
{
expand
:
true
,
cwd
:
'src/'
+
value
,
src
:
'{,**/}*.{gif,jpeg,jpg,png}'
,
dest
:
'dist/'
+
value
,
};
}),
}
};
initConfig
.
svgmin
=
{
dist
:
{
files
:
_
.
map
(
common
.
images
.
options
.
dirs
,
function
(
value
)
{
return
{
expand
:
true
,
cwd
:
'src/'
+
value
,
src
:
'{,**/}*.svg'
,
dest
:
'dist/'
+
value
,
};
}),
}
};
initConfig
.
copy
.
img
=
{
files
:
[{
expand
:
true
,
dot
:
true
,
cwd
:
'src'
,
dest
:
'dist'
,
src
:
_
.
map
(
common
.
images
.
options
.
dirs
,
function
(
value
)
{
return
value
+
'/{,**/}*.*'
;
}),
}]
};
if
(
common
.
useRev
)
{
initConfig
.
rev
.
img
=
{
files
:
{
src
:
_
.
map
(
common
.
images
.
options
.
dirs
,
function
(
value
)
{
return
'dist/'
+
value
+
'/{,**/}*.{gif,jpeg,jpg,png,webp}'
;
}),
}
};
}
}
buildList
.
push
(
'useminPrepare'
);
// html
//buildList.push('usemin:views'
//buildList.push('requirejs'); // script
buildList
.
push
(
'copy:css'
);
// css
//buildList.push('imagemin'); // image
//buildList.push('svgmin'); // image
//buildList.push('rev:img'); // image
if
(
common
.
images
)
{
buildList
.
push
(
'imagemin'
);
// image
buildList
.
push
(
'svgmin'
);
// image
if
(
common
.
useRev
)
{
buildList
.
push
(
'rev:img'
);
// image
}
}
//buildList.push('autoprefixer'); // css
//buildList.push('concat:requirejs'); // montyPython
buildList
.
push
(
'concat:generated'
);
// montyPython
...
...
@@ -247,8 +305,8 @@ module.exports = function (grunt) {
buildList
.
push
(
'copy:dist'
);
//'modernizr');
//buildList.push('uglify:generated'); // montyPython
//'rev:dist'); // montyPython
if
(
common
.
useRev
)
{
buildList
.
push
(
'rev:dist'
);
// montyPython
buildList
.
push
(
'rev:css'
);
// montyPython
}
//buildList.push('revconfig'); // montyPython
...
...
package.json
View file @
ed895a0
...
...
@@ -23,7 +23,9 @@
"grunt-contrib-cssmin"
:
"~0.12.3"
,
"grunt-contrib-jshint"
:
"~0"
,
"grunt-contrib-htmlmin"
:
"~0"
,
"grunt-contrib-imagemin"
:
"~0"
,
"grunt-rev"
:
"~0"
,
"grunt-svgmin"
:
"~0"
,
"grunt-usemin"
:
"~2"
,
"lodash"
:
"~2"
,
"punch"
:
"~0.5.46"
,
...
...
Please
register
or
sign in
to post a comment