Giter VIP home page Giter VIP logo

grunt-lib-contrib's Introduction

grunt-lib-contrib Build Status

DEPRECATED - DO NOT USE

Common functionality shared across grunt-contrib tasks.

Helper Functions

stripPath(path, stripPath)

Deprecated. Use strip-path instead.

Strip a path from a path. Normalize both paths for best results.

minMaxInfo(min, max, report)

Deprecated. Use maxmin instead.

Helper for logging compressed, uncompressed and gzipped sizes of strings.

report

Choices: false, 'min', 'gzip' Default: false

Either do not report anything, report only minification result, or report minification and gzip results.

Important Including 'gzip' results can make this task 5-10x slower depending on the size of the file.

var max = grunt.file.read('max.js');
var min = minify(max);
minMaxInfo(min, max, 'gzip');

Would print:

Original: 495 bytes.
Minified: 396 bytes.
Gzipped: 36 bytes.

getNamespaceDeclaration(ns)

Deprecated. Use nsdeclare instead.

This helper is used to build JS namespace declarations.

--

Lib submitted by Tyler Kellen.

grunt-lib-contrib's People

Contributors

cowboy avatar ctalkington avatar dylang avatar lazd avatar shama avatar sindresorhus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

grunt-lib-contrib's Issues

extract `getNamespaceDeclaration`

@lazd since you were the one that added getNamespaceDeclaration, would you be willing to extract it out into a separate module? I'm trying to get rid of grunt-lib-contrib.

Impossible to install grunt-lib-contrib due to some obscure dependencies

Hello,

When doing npm install grunt-lib-contrib, in order to install this grunt plugin, I get this:

npm http GET https://registry.npmjs.org/grunt-lib-contrib
npm http 304 https://registry.npmjs.org/grunt-lib-contrib
npm http GET https://registry.npmjs.org/zlib-browserify/0.0.1
npm http 304 https://registry.npmjs.org/zlib-browserify/0.0.1
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
[email protected] /usr/lib/node_modules/grunt-lib-contrib
└── [email protected]

The fact is zlib-browserify depends on eventemitter, containing, I think, some typos errors in the package.json...

One solution, maybe, would be to use better dependencies for grunt-lib-contrib ? (eventemitter is quite old)

Thanks for your work (I need grunt-lib-contrib for grunt-jsduck indeed)

gzip-js dependency and is minMaxInfo needed in the core contrib?

Is there a reason that this is sync and only writes the info?

https://github.com/gruntjs/grunt-lib-contrib/blob/master/lib/contrib.js#L80-L88

If it can be async, then you can use the native node zlib to do this.

The root issue is that this is a core dependency for grunt and it requires the gzip-js module which does not have a license attached to it. This makes it very hard for others to use grunt in a "corporate" environment with a dependency that lacks licensing information.

Mootify

@tkellen I want to get rid of grunt-lib-contrib. I've already extracted minMaxInfo and stripPath and opened issues for the other two.

extract `formatForType`

@OliverJAsh since you were the one that added formatForType, would you be willing to extract it out into a separate module? I'm trying to get rid of grunt-lib-contrib.

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.