Coder Social home page Coder Social logo

grunt-run-task's People

Contributors

jpommerening avatar prasunsultania avatar x1b avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grunt-run-task's Issues

Multi tasks can only be run once/with one target

A multi task that was created without a specific target can never switch from one target to another:

var task = runTask.task('multi');

task.run('target1', done); // runs "multi:target1"
task.run('target2', done); // runs "multi:target1" (again)

Maybe we should just enforce that a multi-task is created with a specific target:

var task = runTask.task('multi'); // throws, needs target
var task1 = runTask.task('multi:target1'); // ok
var task2 = runTask.task('multi:target2'); // ok

Multitasks that do not implement this.async never finish.

callback method is never called for all multitasks that do not implement the async pattern.

the issue is in index.js line 161... grunt.task.start({asyncDone: true});

It is forcing grunt to wait for an async callback which never happens.

i've set this to false for now and seems to work.
grunt.task.start({asyncDone: false}); //<< change asyncDone to false.

When trying to run the default task (as per example) the runtask crashes.

When trying to run the default task (as per example) the runtask crashes.

EXAMPLE------------------------------------
runTask('htmlmin', {
default: {
"files": filesToMinify
}
}, function (err) {
if (err) console.log(JSON.stringify(err));
});

RESULT----------------------------------------------
target = task.target || Object.keys(config)[0]
^
TypeError: Object.keys called on non-object
at Function.keys (native)

FIX (1/2)---------------------------------------
Change Line 139 in index.js
target = task.target || (config ? Object.keys(config)[0] : 'default') || 'default';

FIX (2/2)
Include default task name
runTask('htmlmin:default', {

Callback called after mocha timeout

For some weird reason, when I use this in Mocha, the test always timeout and the callback is called after the test failed, regardless of how long the timeout is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.