Comments (9)
yea, pass {deep: true}
to have json tree like
[ { label: 'should throw TypeError when `name` is not a string',
type: 'task',
nodes: [] },
{ label: 'should throw TypeError when `callback` is not a function',
type: 'task',
nodes: [] },
{ label: 'should return false if given `name` exist in npm registry',
type: 'task',
nodes: [] },
{ label: 'should return true if given `name` not exist in npm registry',
type: 'task',
nodes: [] },
{ label: 'should return false when repository already exists',
type: 'task',
nodes: [] },
{ label: 'should return true when repository not exists',
type: 'task',
nodes: [] } ]
this is copy-pasta from my test runner based on undertaker.
from undertaker.
@tunnckoCore Thanks, I missed that. I saw the documentation about deep and tried passing a bool directly rather than an object with the deep property.
Anyway, what an intuitive API. Ask for a tree and get something else.
from undertaker.
@mikehaas763 no need to be a sarcastic asshole about it. I actually agree that it is not intuitive and I am looking into switching it over to a tree. It seems like I can make it work with gulp's CLI for 4.0 without too much trouble.
from undertaker.
@phated maybe its a good idea Undertaker to have also .tasks()
method which will just return array with task names. and tree to be just as .tree({deep: true})
from undertaker.
@tunnckoCore that API is too close to task
, the main API, and I know it would cause more issues than it would solve.
from undertaker.
hmm.. nope, it would be intuitive.
.task(name)
- get a task with specified name.tasks()
- get all tasks.tree()
- archey list
there's no place for confusion.
from undertaker.
there is plenty of room for confusion when someone typos task
as tasks
. I've already considered this and am not going to do that
from undertaker.
@mikehaas763 be aware that I am looking into this, but I am going to lock this for my sanity.
from undertaker.
Completed in c1cda41
from undertaker.
Related Issues (20)
- Undertaker links to protestware - blocks pipelines HOT 1
- Can't get task description and flags because returning wrapped function HOT 7
- Error handling HOT 5
- Tasks composition without gulp HOT 5
- Error run gulp serve HOT 2
- Test fails on Node v6.9.1+ HOT 3
- Consider removing lodash modules
- Series/parallel arguments should not have 0 length
- Add test for array as only argument in series/parallel
- settle not working with es2015 async functions HOT 1
- stack trace is unintelligible since error is not serialized properly HOT 1
- Custom registry must have `get` function HOT 2
- timeResolution -> precision
- Raise node version minbar to 0.12 to eliminate the biggest dependencies HOT 1
- Sharing Functionalities example not working for `serial` and `parallel` tasks. HOT 1
- Build failing with AssertionError: Task function must be specified HOT 2
- TypeError: browserSync is not a function HOT 1
- Remove UNDERTAKER_TIME_RESOLUTION HOT 2
- Update repository scaffold
- Namespace 'Undertaker' has no exported member 'TaskCallback'. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undertaker.