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
17f21fd1
authored
2015-07-23 14:41:15 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Starting to fill iout basic dynamic grunt config.
1 parent
c7a40343
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
2 deletions
package.json
tasks/monty-python.js
package.json
View file @
17f21fd
...
...
@@ -11,9 +11,12 @@
"node"
:
">=0.8.0"
},
"dependencies"
:
{
"grunt"
:
"~0"
"grunt"
:
"~0"
,
"grunt-contrib-csslint"
:
"~0"
,
"grunt-contrib-jshint"
:
"~0"
,
"grunt-contrib-htmlmin"
:
"~0"
,
"lodash"
:
"~2"
},
"devDependencies"
:
{
"grunt"
:
"~0"
}
}
...
...
tasks/monty-python.js
View file @
17f21fd
...
...
@@ -6,4 +6,61 @@
'use strict'
;
module
.
exports
=
function
(
grunt
)
{
var
_
=
require
(
'lodash'
);
function
createConfig
(
mpConfig
)
{
var
initConfig
=
{};
var
checkList
=
[];
if
(
mpConfig
.
jshint
)
{
grunt
.
loadNpmTasks
(
'grunt-contrib-jshint'
);
initConfig
.
jshint
=
{
options
:
mpConfig
.
jshint
.
options
,
all
:
[
'Gruntfile.js'
,
],
main
:
{
options
:
_
.
extend
({},
mpConfig
.
jshint
.
browserOptions
,
{
globals
:
{
define
:
false
,
require
:
false
,
},
}),
files
:
{
src
:
[
'src/scripts/main.js'
,
],
},
}
};
checkList
.
push
(
'jshint'
);
}
if
(
mpConfig
.
csslint
)
{
grunt
.
loadNpmTasks
(
'grunt-contrib-csslint'
);
initConfig
.
csslint
=
{
};
checkList
.
push
(
'csslint'
);
}
if
(
mpConfig
.
htmlmin
)
{
grunt
.
loadNpmTasks
(
'grunt-contrib-htmlmin'
);
initConfig
.
htmlmin
=
{
};
checkList
.
push
(
'htmlmin'
);
}
grunt
.
initConfig
(
initConfig
);
grunt
.
registerTask
(
'check'
,
checkList
);
grunt
.
registerTask
(
'default'
,
[
'check'
,
]);
}
return
{
createConfig
:
createConfig
,
};
};
...
...
Please
register
or
sign in
to post a comment