Skip to content

modulexcite/pvc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PVC Build Engine

Build status

###What

The PVC Build Engine started as a port of gulp for .NET projects but we are now evolving on our own towards the goal of being the easiest to manage, most comprehensive task runner available.

###Getting Started

PVC is distributed via Chocolatey and plugins are available as NuGet packages. We provide a pluggable architecture that allows you to run any tasks you need. Build execution is done via scriptcs's wonderful hosting API.

cinst pvc

We can install/update our plugins and other packages like so:

pvc install Pvc.AzureBlob
pvc install Pvc.Browserify

We use NuGet for packaging but to avoid conflicts with other .NET applications, we have our own packages folder and configuration file at:

./pvc-packages/
./pvc-project.json

We're going to create a 'false fork' of any active plugins so that our GitHub organization page can be used to locate plugins for now: PVC Build

Hit me up on Twitter @stirno and let me know what you think!

###Sample Sample time! In the directory of your project, you'd create a file like this:

pvcfile.csx

pvc.Task("js", () => {
    // browserify or similar
});

pvc.Task("stylesheets", () => {
    pvc.Source("*.less", "*.sass")
       .PipeIf("less$", new PvcLess())
       .PipeIf("(sass|scss)$", new PvcSass())
       .Save("~/deploy")
       .Watch();
}).Requires("sprites");

pvc.Task("sprites", () => {
    // sprite generator
});

pvc.Task("default").Requires("stylesheets", "js");

Once the pvcfile.csx is created (and pvc installed), you can execute tasks with the following commands

# run default task, if exists
pvc

# run stylesheets task
pvc stylesheets

###Plugins

A PVC plugin has a very simple interface that it must implement (by extending PvcPlugin):

IEnumerable<PvcStream> Execute(IEnumerable<PvcStream> inputStreams)

Accept streams in, return streams out.

Plugins can generate arbitrary numbers of streams meaning they can produce more streams than passed into them (or fewer). The specific motivation for this decision is source map generation.

###Runtimes

PVC will package additional runtimes to help plugin developers get access to other ecosystems that may not have been ported to .NET or won't be, such as Browserify.

These runtimes should not be directly referenced by PVC users but plugins may rely on them to provide consistent access to the underlying environment from our packages.

Active runtimes:

Pvc.Runtime.NodeJs

###Streams As with gulp, PVC plugins are stream based. Currently a large number of useful packages that will be wrapped as plugins are built around file access such as SassAndCoffee's SassCompiler. To work with these libraries there are some useful helper methods in PvcUtil to handle marshalling an input stream to a temp file and back.

Its not ideal but it helps us move forward with streaming content into plugins. In the future we hope users will assist us in adding stream support to more 3rd party libraries.

###Plugins and Stream Filtering We have a concept of tags in PVC. Streams have a tag collection describing them. By default a tag is added for the file extension (.js, .css, etc) the stream was built from. Additional tags can be added during the pipeline.

Plugins can define a set of SupportedTags that they will work with. PVC will make sure that only appropriate streams are given to the plugin and deal with merging the results back into the pipeline on completion. Plugins can modify the tags on existing streams or on the new ones they create (source maps, packages, etc).

###Current plugins include

About

PVC -- Scaffold, Build, Publish -- Composable, extensible builds in .NET created by @stirno

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%