xainey / xainey.github.io Goto Github PK
View Code? Open in Web Editor NEWMichael Willis's Blog
Home Page: https://xainey.github.io/
License: MIT License
Michael Willis's Blog
Home Page: https://xainey.github.io/
License: MIT License
2017-01-04-powershell-module-pipeline is a great post. As the author of Invoke-Build, I am glad it is recommended as the task runner. I have a remark on task hooks.
Here is what proposed in the blog post:
###############################################################################
# Main build script with hooks
###############################################################################
# Synopsis: Clean Artifacts Directory
task Clean BeforeClean, {
# ...
}, AfterClean
###############################################################################
# Extra x.settings.ps1 with dummy hooks
###############################################################################
# Synopsis: Executes before the Clean task.
task BeforeClean {}
# Synopsis: Executes after the Clean task.
task AfterClean {}
There is nothing wrong with this and in PSake this is probably the only way.
In Invoke-Build, though, we can use simpler hooks, thanks to Before
and After
.
See the example below. Note that example hooks are commented out, we do not have
to define dummy hooks. We just define them when needed and use Before
or After
.
###############################################################################
# Main build script. Note that we do not have to pre-define/inject hooks
###############################################################################
# Synopsis: Clean Artifacts Directory
task Clean {
# ...
}
###############################################################################
# Extra x.settings.ps1, note that we do not have to define dummy hooks
###############################################################################
# Synopsis: Executes before the Clean task.
#task BeforeClean -Before Clean {}
# Synopsis: Executes after the Clean task.
#task AfterClean -After Clean {}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.