-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[heft] Implementation of a copy task. #2186
Conversation
8bbf898
to
c2e5c8b
Compare
* Configures the "copy" task for Heft. | ||
*/ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/heft/copy.schema.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iclanton File copying seems like a "core operation" that belongs in heft.json rather than in a plugin-like config file. Another "core operation" would be executing simple shell scripts. Both of these actions could be triggered based on the same menu of Heft events.
Thus I'm thinking the config file design might be better like this:
config/heft.json
{
"eventActions": {
"beforePreCompile": [
{
"eventActionKind": "fileCopy",
"sourceGlob": "src/**/*.md",
"targetFolders": [ "dist" ],
"hardlinkInsteadOfCopy": true
}
],
"afterPostBuild": [
{
"eventActionKind": "shell",
"command": "rundown",
"args": [
"snapshot",
"--script",
"./lib/index.js"
]
}
]
}
}
/** | ||
* Run these copy operations after the post-build build stage runs | ||
*/ | ||
"afterPostBuild": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combining "before/after" and "pre/post" prefixes seems a little odd.
Instead of something like this:
beforePreLunch
afterPreLunch
beforeLunch
afterLunch
beforePostLunch
afterPostLunch
...maybe we could introduce some more intuitive names like:
beforeBreakfast
afterBreakfast
beforeLunch
afterLunch
beforeDinner
afterDinner
Or, the Windows API used a convention sort of like this:
breakfasting
breakfasted
lunching
lunched
dinnering
dinnered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't tell how much of this comment is sarcasm...
Closing in favor of #2333 |
No description provided.