Request: Autoload Plugins w/Programmatic
See original GitHub issueWhen used programmatically, fly doesn’t autoload & mount plugins, even though tasks are defined.
Minimal example: after creating new project, create following index.js
and run node index.js
const Fly = require('Fly')
const fly = new Fly({
tasks: {
* default (fly){ yield fly.source('x.sass').sass().target('.') }
}
})
fly.start()
Expected: new x.css
file.
Actual result: Unhandled rejection TypeError: fly.source(...).sass is not a function
I’ve also created minimal repo. Edit: Taken down since.
Node v6.9.1 LTS, npm v4.4.4, yarn v0.21.3
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
Additional programmatic Grasshopper plugin loading options
Feature Request: Additional programmatic Grasshopper plugin loading options ... show that it is possible o “Load” grasshopper without the window appearing.
Read more >Plugin autoload doesn't work for packages installed ... - GitHub
The old logic didn't require it to be listed in package.json, it could installed by prettier-plugins(this package contains all plugins he use),.
Read more >Programmatic Usage - GraphQL Code Generator
You need to import the plugin in your favorite way; you can also use await import to lazy load it. Then, provide the...
Read more >Autoloaded options - WordPress VIP Documentation
When a WordPress site receives a request, all of the options marked as autoload = yes are fetched and stored in memory for...
Read more >Composer Autoloading within WordPress Plugin
Leverage Composer for autoloading. Breaking up a single .php file into many .php files introduces the need to then require all of those...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We care about this lib & like working on it 😜
Sorry, forgot to update this thread.
I played with auto-loading if
plugins: true
, but found that it’s not 100% consistent. The problem is thatload
(and some of its internals) are coroutines, and you can’t use 'em inside a class constructor.The closest I got was to set up an
.on('autoloaded')
listener, but that’s where the inconsistency pops up. It’s asynchronous, so (older) machines may spend more time finding plugins & requiring them than expected. While that’s happening, Tasks could have been started & already thrown due to the “methods not found” error.I’ll get back to this later, but it’ll have to be a class method on Fly.