Giter VIP home page Giter VIP logo

jehhynes / essentialwebcompiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dkoch74/essentialwebcompiler

0.0 0.0 1.0 23.12 MB

EssentialWebCompiler is a fork of madkristensen's WebCompiler that allows run-time compilation of stylesheets with minimal configuration.

Home Page: https://www.nuget.org/packages/Equus.Tools.EssentialWebCompiler/

License: Other

JavaScript 0.11% CoffeeScript 1.00% C# 97.46% CSS 1.20% HTML 0.14% Batchfile 0.09%

essentialwebcompiler's Introduction

EssentialWebCompiler

EssentialWebCompiler is a run-time stylesheet compiler for .NET, and a fork of madskristensen's WebCompiler. The WebCompiler extension for Visual Studio allows you to easily update your stylesheets at development time, both manually and via source file tracking. EssentialWebCompiler instead allows you to invoke the powerful compiler at run-time, making on-the-fly stylesheet compilation simple. I personally created this solution for allowing my applications' users to amend the site theme at run-time.

Features

  • Runtime stylesheet compilation
  • Based upon popular and reliable WebCompiler project by madskristensen
  • Compiles LESS, Scss, Stylus, JSX, ES6 and (Iced)CoffeeScript
  • Event and error logging included
  • Simple installation into your application via NuGet

WebCompiler Users

Since the heart of EssentialWebCompiler is WebCompiler, your existing compilerconfig.json file is interoperable for both purposes.

Getting started

Expect EssentialWebCompiler to use ~100 MB in a temporary folder where it will store necessary Node.js dependencies. Dependencies for all supported CSS preprocessor compilation are included, so if you're looking to save space consider taking those out.

Install EssentialWebCompiler into your project that requires run-time compilation using NuGet. To compile your stylesheet, invoke the compiler, providing the path to your compilerconfig.json file which specifies source and output files as well as any other options.

var results = Essential.Compile("C:/FooSolution/BarProject/compilerconfig.json");

The outputted results contains any log messages that were generated as well as any errors. Your stylesheet(s) will automatically be updated according to your configuraiton file.

compilerconfig.json

This is an example compilerconfig.json file. The format is identical to the original specified in madskristensen's WebCompiler.

[
  {
    "outputFile": "output/site.css",
    "inputFile": "input/site.less",
    "minify": {
        "enabled": true
    },
    "includeInProject": true,
    "options":{
        "sourceMap": false
    }
  },
  {
    "outputFile": "output/scss.css",
    "inputFile": "input/scss.scss",
    "minify": {
        "enabled": true
    },
    "includeInProject": true,
    "options":{
        "sourceMap": true
    }
  }
]

essentialwebcompiler's People

Contributors

alexjustus avatar andrewiggins avatar craigktreasure avatar dkoch74 avatar duncansmart avatar falahati avatar gproulx avatar jkewley avatar kiasyn avatar krusen avatar madskristensen avatar markvantilburg avatar michalstanko avatar mlorbetske avatar outlivier avatar paulvrugt avatar samfromlv avatar sguryev avatar winterific avatar

Forkers

ischyrus

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.