GithubHelp home page GithubHelp logo

xainey / xainey.github.io Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 1.0 5.14 MB

Michael Willis's Blog

Home Page: https://xainey.github.io/

License: MIT License

Ruby 5.15% HTML 24.34% CSS 68.52% JavaScript 1.98%

xainey.github.io's People

Contributors

xainey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

kurtdegreeff

xainey.github.io's Issues

Simpler hooks (2017-01-04-powershell-module-pipeline.md)

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 {}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.