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
a421f05b
authored
2015-09-04 18:11:06 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Move buildList into build task function.
1 parent
b925f472
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
48 deletions
grunt-monty-python.js
grunt-monty-python.js
View file @
a421f05
...
...
@@ -83,16 +83,6 @@ module.exports = function (grunt) {
};
}
var
checkList
=
[];
var
buildList
=
[
'check'
,
'clean:montyPython'
,
'post-clean'
,
];
var
postCleanList
=
[];
grunt
.
registerTask
(
'post-clean'
,
'post-clean'
,
function
()
{
grunt
.
task
.
run
(
postCleanList
);
});
function
externalMultiTask
(
name
,
desc
,
command
,
updateOptions
)
{
grunt
.
log
.
writeln
(
'registering multiTask'
,
name
);
...
...
@@ -200,7 +190,6 @@ module.exports = function (grunt) {
generate
:
{
},
};
buildList
.
push
(
'punch:generate'
);
htmlSourceDir
=
'.grunt/holygrail/punch/output-generate'
;
initConfig
.
copy
.
dist
.
files
.
push
({
expand
:
true
,
...
...
@@ -428,42 +417,6 @@ module.exports = function (grunt) {
};
}
buildList
.
push
(
'useminPrepare'
);
// html
//buildList.push('usemin:views'
if
(
mpConfig
.
bower
)
{
buildList
.
push
(
'requirejs'
);
// script
}
buildList
.
push
(
'copy:css'
);
// css
if
(
mpConfig
.
images
)
{
buildList
.
push
(
'imagemin'
);
// image
buildList
.
push
(
'svgmin'
);
// image
if
(
mpConfig
.
useRev
)
{
buildList
.
push
(
'rev:img'
);
// image
}
}
//buildList.push('autoprefixer'); // css
buildList
.
push
(
'concat:generated'
);
// montyPython
buildList
.
push
(
'cssmin'
);
// montyPython
//'uglify:dist');
buildList
.
push
(
'copy:dist'
);
//'modernizr');
//buildList.push('uglify:generated'); // montyPython
if
(
mpConfig
.
useRev
)
{
buildList
.
push
(
'rev:dist'
);
// montyPython
buildList
.
push
(
'rev:css'
);
// montyPython
buildList
.
push
(
'revconfig'
);
// montyPython
}
if
(
mpConfig
.
bower
)
{
buildList
.
push
(
'concat:requirejs'
);
// montyPython
}
if
(
mpConfig
.
useRev
)
{
buildList
.
push
(
'rev:requirejs'
);
}
//buildList.push('uglify:bower'); // montyPython
//buildList.push('uglify:requireconfig'); // montyPython
buildList
.
push
(
'usemin:html'
);
// montyPython
buildList
.
push
(
'usemin:css'
);
// montyPython
buildList
.
push
(
'htmlmin'
);
// montyPython
grunt
.
initConfig
(
initConfig
);
...
...
@@ -474,6 +427,10 @@ module.exports = function (grunt) {
]);
grunt
.
registerTask
(
'build'
,
'build the system'
,
function
()
{
var
buildList
=
[
'check'
,
'clean:montyPython'
,
];
var
featureFlags
=
{};
if
(
arguments
.
length
)
{
for
(
var
i
in
arguments
)
{
...
...
@@ -494,8 +451,48 @@ module.exports = function (grunt) {
}
grunt
.
file
.
write
(
'.grunt/holygrail/scripts/featureFlags.js'
,
lines
.
join
(
'\n'
));
});
postCleanList
.
add
(
'writeFeatureFlags'
);
buildList
.
add
(
'writeFeatureFlags'
);
}
if
(
mpConfig
.
punch
)
{
buildList
.
push
(
'punch:generate'
);
}
buildList
.
push
(
'useminPrepare'
);
// html
//buildList.push('usemin:views'
if
(
mpConfig
.
bower
)
{
buildList
.
push
(
'requirejs'
);
// script
}
buildList
.
push
(
'copy:css'
);
// css
if
(
mpConfig
.
images
)
{
buildList
.
push
(
'imagemin'
);
// image
buildList
.
push
(
'svgmin'
);
// image
if
(
mpConfig
.
useRev
)
{
buildList
.
push
(
'rev:img'
);
// image
}
}
//buildList.push('autoprefixer'); // css
buildList
.
push
(
'concat:generated'
);
// montyPython
buildList
.
push
(
'cssmin'
);
// montyPython
//'uglify:dist');
buildList
.
push
(
'copy:dist'
);
//'modernizr');
//buildList.push('uglify:generated'); // montyPython
if
(
mpConfig
.
useRev
)
{
buildList
.
push
(
'rev:dist'
);
// montyPython
buildList
.
push
(
'rev:css'
);
// montyPython
buildList
.
push
(
'revconfig'
);
// montyPython
}
if
(
mpConfig
.
bower
)
{
buildList
.
push
(
'concat:requirejs'
);
// montyPython
}
if
(
mpConfig
.
useRev
)
{
buildList
.
push
(
'rev:requirejs'
);
}
//buildList.push('uglify:bower'); // montyPython
//buildList.push('uglify:requireconfig'); // montyPython
buildList
.
push
(
'usemin:html'
);
// montyPython
buildList
.
push
(
'usemin:css'
);
// montyPython
buildList
.
push
(
'htmlmin'
);
// montyPython
grunt
.
task
.
run
(
buildList
);
});
...
...
Please
register
or
sign in
to post a comment