Add `fly.imports` key to `package.json` config
See original GitHub issuePulled from #233
For the sake of reusable, private plugins:
{
"fly": {
"imports": [
"./build/custom-task-one.js",
"./build/custom-task-two.js",
"./build/custom-task-three.js"
]
}
}
// build/custom-task-one.js
module.exports = function () {
this.plugin('plugOne', {every: 0}, function * (files, opts) {
// custom stuff
})
}
// flyfile.js
yield this.source('src').plugOne({hello: 'world'}).target('dist');
Open to alternative names for the imports
key.
The same functionality can be achieved using npm link
(or npm install
and file:./
as a dependency), but this requires that each plugin has its own package.json
file.
You can group multiple plugins in the same “package” (example). However, this method also doesn’t scale well & becomes quite messy to manage.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Add custom metadata or config to package.json, is it valid?
Yes, you're allowed to add custom entries to package.json . Choose a key name: not already defined (details below); not reserved for future...
Read more >Modules: Packages | Node.js v19.3.0 Documentation
Exports sugar; Subpath imports; Subpath patterns; Conditional exports ... The package consists of the folder containing the package.json file and all ...
Read more >package.json - npm Docs
This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a...
Read more >Package exports - webpack
The exports field in the package.json of a package allows to declare which module should be used when using module requests like import...
Read more >Config Files - Babel.js
.babelrc.json files only apply to files within their own package ... import() always returns a promise!): for this reason, .mjs config files will...
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
@devmondo You can now access this by installing the latest
beta
release.man lovely!!! i cant wait for this to be released