Code Monkey home page Code Monkey logo

Comments (10)

scottgonzalez avatar scottgonzalez commented on June 2, 2024

Share the love with jQuery UI and jQuery Mobile too :-)

from 2012-dev-summit.

gnarf avatar gnarf commented on June 2, 2024

Grunt plugin?

from 2012-dev-summit.

dmethvin avatar dmethvin commented on June 2, 2024

As long as the grunt plugin doesn't involve opening the file with node and reading it char by char, I'm good with it.

from 2012-dev-summit.

scottgonzalez avatar scottgonzalez commented on June 2, 2024

Potential implementation:

content = fs.readFileSync( filePath, "utf8" );
isBad = content.length !== Buffer.byteLength( content, "utf8" );

from 2012-dev-summit.

dmethvin avatar dmethvin commented on June 2, 2024

I put together some code based on that, which is fortunate because it helped find a bug. This could be turned into a grunt task during the Summit: jquery/jquery@1450305

from 2012-dev-summit.

gnarf avatar gnarf commented on June 2, 2024

Out of curiosity, should we request uglifyjs add a flag to use/allow escapes in output instead of utf8?

from 2012-dev-summit.

dmethvin avatar dmethvin commented on June 2, 2024

It was already there, I just didn't see it.

from 2012-dev-summit.

dmethvin avatar dmethvin commented on June 2, 2024

See also http://bugs.jquery.com/ticket/12725

from 2012-dev-summit.

dmethvin avatar dmethvin commented on June 2, 2024

Final code is in https://github.com/jquery/jquery/blob/995f816cf4e0a404075c27e0d249db0b4a07a97e/grunt.js#L404 perhaps the whole task could be converted to a plugin?

from 2012-dev-summit.

jzaefferer avatar jzaefferer commented on June 2, 2024

Yes please! @rwldrn wanna publish more npm modules?

from 2012-dev-summit.

Related Issues (20)

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.