GithubHelp home page GithubHelp logo

jeff-lewis / powerrails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mistergf/powerrails

0.0 2.0 0.0 125 KB

Scaffolding for PowerShell scripts and modules

License: MIT License

PowerShell 100.00%

powerrails's Introduction

Overview

PowerRails - A module to generate your scripts folder structure. PowerRails logo

Why?

Most scripts/modules have a similar directory structure. You shouldn't waste your time creating it. Just use this module to get a head start and add to your new structure as needed.

PowerRails in action

PowerRails will also helps you to become a better developer.

How?

We include the following helpers to keep you on track ๐Ÿš† (pun intended).

  • Script Analyzer is a set of rules that are based on guidance from the PowerShell team. By default we enforce these rules.
  • Pester is a framework for running unit tests to execute and validate PowerShell commands. You should test your code. Pester helps you with that. Sample tests included.
  • PSake is a build automation tool written in PowerShell. Builds glue everything together. Analyze your script, run your unit testing and deploy!
  • PSDeploy is a quick and dirty module that simplifies deploymentsis a quick and dirty module that simplifies deployments. If everything checks out, deploy our script to where ever you'd like.

Using PowerRails

There is only 1 cmdlet to learn. New-PowerRailsItem PowerRails is semi-opinioned in the tabs vs spaces discussion. We prefer spaces but I've included a switch to use tabs if you prefer.

Download & import module

PS> Install-Module -Name PowerRails
PS> Import-Module -Name PowerRails

Create a new script

PS> New-PowerRailsItem -name 'GitHubScrapper' -type 'script' -path '.'

Create a new module (type is module by default)

PS> New-PowerRailsItem -name 'MakeMyLifeEasier' -path 'c:\scripts\'

Learn more

PS> Get-Help New-PowerRailsItem

Build Operations

  • Test the script via Pester and Script Analyzer
PS> .\build.ps1
  • Test the script with Pester only
PS> .\build.ps1 -Task Test
  • Test the script with Script Analyzer only
PS> .\build.ps1 -Task Analyze
  • Deploy the script via PSDeploy (runs all tests)
PS> .\build.ps1 -Task Deploy

This module was inspired by the post by Dev Black Ops Great read. Highly recommended.

Big thanks to FreePik for the logo.

Don't forget to star this project if you like it!

powerrails's People

Contributors

mistergf avatar

Watchers

Jeff Lewis avatar James Cloos avatar

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.