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
50cb71ab
authored
2015-10-02 10:31:20 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add more jshint targets; this is the beginning of library build
support.
1 parent
f7be81d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
4 deletions
grunt-monty-python.js
grunt-monty-python.js
View file @
50cb71a
...
...
@@ -206,6 +206,11 @@ module.exports = function (grunt) {
});
}
function
jshintAddExtra
(
src
,
container
,
dest
)
{
if
(
src
)
{
container
[
dest
]
=
container
[
dest
].
concat
(
src
);
}
}
if
(
mpConfig
.
jshint
)
{
initConfig
.
jshint
=
{
options
:
mpConfig
.
jshint
.
options
,
...
...
@@ -222,15 +227,40 @@ module.exports = function (grunt) {
files
:
{
src
:
[
'src/scripts/*.js'
,
],
},
},
model
:
{
options
:
_
.
extend
({},
mpConfig
.
jshint
.
modelOptions
||
mpConfig
.
jshint
.
browserOptions
,
{
globals
:
{
define
:
false
,
require
:
false
,
},
}),
files
:
{
src
:
[
'src/scripts/model/**/*.js'
,
],
},
},
view
:
{
options
:
_
.
extend
({},
mpConfig
.
jshint
.
viewOptions
||
mpConfig
.
jshint
.
browserOptions
,
{
globals
:
{
define
:
false
,
require
:
false
,
},
}),
files
:
{
src
:
[
'src/scripts/view/**/*.js'
,
],
},
}
}
,
};
if
(
mpConfig
.
jshint
.
all
)
{
initConfig
.
jshint
.
all
=
initConfig
.
jshint
.
all
.
concat
(
mpConfig
.
jshint
.
all
);
}
jshintAddExtra
(
mpConfig
.
jshint
.
all
,
initConfig
.
jshint
,
'all'
);
jshintAddExtra
(
mpConfig
.
jshint
.
main
,
initConfig
.
jshint
.
main
.
files
,
'src'
);
jshintAddExtra
(
mpConfig
.
jshint
.
model
,
initConfig
.
jshint
.
model
.
files
,
'src'
);
jshintAddExtra
(
mpConfig
.
jshint
.
view
,
initConfig
.
jshint
.
view
.
files
,
'src'
);
checkList
.
push
(
'jshint'
);
}
...
...
Please
register
or
sign in
to post a comment