Skip to content

Commit 200fbda

Browse files
committed
Merge pull request #179 from phase2/task/fix_grunt_serve
Fixing error with 'grunt serve' scope of drush:serve.
2 parents a69fa2d + f290e61 commit 200fbda

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tasks/serve.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ module.exports = function(grunt) {
44
* Define tasks to quickly get Drupal running.
55
*
66
* grunt serve
7-
* Run Drupal via the PHP webserver and active watch tasks.
7+
* Run Drupal via the PHP webserver and activate watch tasks.
88
* grunt serve:demo
99
* Run Drupal via the PHP webserver without running watch tasks.
1010
* grunt serve:test
11-
* Run Drupal via the PHP webserver without running watch tasks or opening the browser.
11+
* Run Drupal via the PHP webserver without running watch tasks or opening
12+
* the browser.
1213
*/
1314
grunt.loadNpmTasks('grunt-drush');
1415

@@ -30,13 +31,14 @@ module.exports = function(grunt) {
3031
}, cmd)
3132
});
3233

34+
grunt.config(['drush', 'serve'], {
35+
args: ['runserver', ':' + (grunt.config('serve.port') || 8080)],
36+
options: _.extend({
37+
cwd: '<%= config.buildPaths.html %>'
38+
}, cmd)
39+
});
40+
3341
grunt.registerTask('serve', 'Run Drupal using the PHP built-in webserver. serve:demo to run without watch tasks and serve:test for grunt-drupal-tasks development.', function() {
34-
grunt.config(['drush', 'serve'], {
35-
args: ['runserver', ':' + (grunt.config('serve.port') || 8080)],
36-
options: _.extend({
37-
cwd: '<%= config.buildPaths.html %>'
38-
}, cmd)
39-
});
4042

4143
if (this.args[0] != 'test') {
4244
// Unlike the test version, this one allows port overriding and opens the site in a new tab.

0 commit comments

Comments
 (0)