Comments (3)
Sorry, I didn't understand your specific intent. Could you provide the code snippets to help me understand your requirements better?
from velite.
ping @Lordfirespeed
from velite.
Sorry, thankyou for the ping.
My particular use-case was that I wanted to write files to the .velite
directory, but I didn't want to hard-code the .velite
directory name. I wanted access to this object of the resolved configuration, from the prepare
(invoked here) and complete
(invoked here) hooks.
Changing the signatures of the prepare
and complete
hooks to include a config
parameter, then passing in the resolved config
would suffice:
prepare?: (data: Result<T>, config: Config) => Promisable<void | false>
complete?: (data: Result<T>, config: Config) => Promisable<void>
Here's a TypeScript snippet showing this change would be backwards-compatible.
type Promisable<T> = T | Promise<T>
type Result<T> = {
foo: T
}
type Config = {
bar: string
baz: number
}
type Test<T> = (data: Result<T>, config: Config) => Promisable<void | false>
const testInstance: Test<unknown> = async (data: Result<unknown>) => undefined;
from velite.
Related Issues (20)
- Path option for `s.image()` HOT 5
- Image Blur size is tool small to use, expose an option for setting it. HOT 2
- Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
- Working with 3000+ files. Out of Memoy HOT 1
- What is the purpose of the Recipes(especially typescript) in the documents? HOT 3
- Unhandled Runtime Error When using remarkCodeHike HOT 1
- Weird Page Freeze when Navigating via Table of Contents Links HOT 1
- Is it possible to use files stored inside github repo? HOT 4
- [feature request] handle contents failing schema validation, or autofixing HOT 8
- Handling relationships HOT 4
- TOC breaking change/broken on latest release HOT 3
- The provided config in #37 resolves warning in dev mode but still present in deployment HOT 1
- Webpack cache warning HOT 2
- Property does not exist on type '{ props: { readonly components?: {} | undefined; }; }' .ts-plugin(2339) HOT 1
- Taxonomy example dev server stops suddenly without error message HOT 1
- Property 'description', 'title', does not exist on type '{ slug: string; } & { slugAsParams: string; }'.ts(2339) HOT 3
- Support for additional metadata in mdx files HOT 2
- Unknown file extension ".css" HOT 9
- Support files with multiple documents (jsonc, yaml) HOT 4
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 velite.