Skip to content

Commit

Permalink
pr-1000: more segregation of copy & watch task
Browse files Browse the repository at this point in the history
* more segregation of copy & watch task

* added `plugins.js` to clean task

* added `templates.js` to clean task

* Revert "added `templates.js` to clean task"

This reverts commit 46d7b03.
  • Loading branch information
Himanshu Rajotia authored and oliverfoster committed Mar 23, 2017
1 parent 516a4c1 commit 31b2322
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
1 change: 1 addition & 0 deletions grunt/config/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
'<%= sourcedir %>theme/theme.js',
'<%= sourcedir %>less',
'<%= sourcedir %>templates',
'<%= sourcedir %>plugins.js',
'<%= outputdir %>adapt/js/adapt.min.js.map'
]
},
Expand Down
14 changes: 11 additions & 3 deletions grunt/config/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,19 @@ module.exports = function (grunt, options) {
}
]
},
main: {
scriptLoader: {
files: [
{
expand: true,
src: ['<%= sourcedir %>core/js/scriptLoader.js'],
dest: '<%= outputdir %>adapt/js/',
filter: 'isFile',
flatten: true
},
}
]
},
libraries: {
files: [
{
expand: true,
src: [
Expand All @@ -199,7 +203,11 @@ module.exports = function (grunt, options) {
dest: '<%= outputdir %>libraries/',
filter: 'isFile',
flatten: true
},
}
]
},
required: {
files: [
{
expand: true,
src: ['components/**/libraries/**/*', 'extensions/**/libraries/**/*', 'menu/<%= menu %>/libraries/**/*', 'theme/<%= theme %>/libraries/**/*'],
Expand Down
28 changes: 27 additions & 1 deletion grunt/config/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ module.exports = {
'!<%= sourcedir %>extensions/extensions.js',
'!<%= sourcedir %>menu/menu.js',
'!<%= sourcedir %>theme/theme.js',
'!<%= sourcedir %>templates/templates.js'
'!<%= sourcedir %>templates/templates.js',
'!<%= sourcedir %>core/js/scriptLoader.js',
'!<%= sourcedir %>core/js/libraries/require.js',
'!<%= sourcedir %>core/js/libraries/modernizr.js',
'!<%= sourcedir %>core/js/libraries/json2.js',
'!<%= sourcedir %>core/js/libraries/consoles.js',
'!<%= sourcedir %>core/js/libraries/jquery.js',
'!<%= sourcedir %>core/js/libraries/jquery.v2.js'
],
tasks: ['javascript:dev']
},
Expand Down Expand Up @@ -62,5 +69,24 @@ module.exports = {
themeFonts: {
files: ['<%= sourcedir %>theme/<%= theme %>/**/fonts/**'],
tasks: ['copy:themeFonts']
},
scriptLoader: {
files: ['<%= sourcedir %>core/js/scriptLoader.js'],
tasks: ['copy:scriptLoader']
},
libraries: {
files: [
'<%= sourcedir %>core/js/libraries/require.js',
'<%= sourcedir %>core/js/libraries/modernizr.js',
'<%= sourcedir %>core/js/libraries/json2.js',
'<%= sourcedir %>core/js/libraries/consoles.js',
'<%= sourcedir %>core/js/libraries/jquery.js',
'<%= sourcedir %>core/js/libraries/jquery.v2.js'
],
tasks: ['copy:libraries']
},
required: {
files: ['<%= sourcedir %>extensions/*/required/**/*'],
tasks: 'copy:required'
}
}

0 comments on commit 31b2322

Please sign in to comment.