Skip to content

Task does nothing when loaded with grunt.loadTasks(subDir) #106

@alanalvarado

Description

@alanalvarado

Hello, I am using grunt 1.04, running on osx Mojave 10.14.6. When I load clean task with grunt.loadTasks(subDir) and run the next command:

grunt clean

it just freezes the command line, i have to ctrl c to continue

If I uncomment the line loadNpmTasks and comment registertask then it works.

configuration content is as follows:

gruntfile.js

module.exports = function(grunt) {
	require('jit-grunt')(grunt);

	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		path: grunt.file.readJSON('routes.json'),
	});

	grunt.loadTasks('grunt/tasks');

	// Log our current config
	console.log(grunt.config());

        // grunt.loadNpmTasks('grunt-contrib-clean');
		
	grunt.registerTask('clean', ['clean']);
	
};

clean.js

module.exports = function(grunt) {
	grunt.config('clean', {
		styles: ['**/*.css']
	});
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions