Giter Club home page Giter Club logo

jsminsharp's Introduction

JsMinSharp

This is an updated version of JSMin for c#. There's been countelss versions of the original JSMin ported to c# but from all of the ones I've seen, they have not been updated to deal with some of the minification issues that have been reported to me on a couple of my projects.

This repository is therefore my attempt at keeping an updated version of JSMin with bug fixes for c#. I've updated some variable and method names and included code comments to make it easier to understand. I've also ported over the issues from my other projects to this project to track the various issues resolved.

jsminsharp's People

Contributors

shazwazza avatar

Watchers

 avatar  avatar  avatar

Forkers

newtonguass

jsminsharp's Issues

Issue with Unary operator

Example, this would fail:

var script =
@"var c = {};
var c.name = 0;
var i = 1;
c.name=i+ +new Date;
alert(c.name);";

Doesn't handle es6 nested template literals

For example, this doesn't work:

// ES6 template literals

// no substitutions
var nosub = `now is the time for all good men`;
var nosubFunc = safehtml`<a href="#">h\x65ad</a>`;

var multiline = `now is the time \
    for all good men
    to come to the aid
    of their country.`;

// substitutions
var total = 34.99;
var msg = `Total = ${total}, plus tax is ${ total * 1.09800 }`;

// with escapes
var esc = `\u0ca0_\u{ca0}`;

// object literal inside an expression
var obj = `Via ${ {http: "http", https: "SSL", file: "file system"}[location.protocol] }!`;

// nested
var nested = `one two ${ `double my total is ${ 2 * total }` } three`;

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.