GithubHelp home page GithubHelp logo

ivanpopelyshev / grunt-jsmin-sourcemap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twolfson/grunt-jsmin-sourcemap

0.0 2.0 0.0 330 KB

Grunt task for JSMin with sourcemap

License: The Unlicense

JavaScript 99.92% Shell 0.08%

grunt-jsmin-sourcemap's Introduction

Synopsis

Grunt is a node.js based CLI build tool.

JSMin is a JavaScript minifier that removes whitespace and comments.

Source maps enables developers to view and interact with minified JavaScript as if it were unminified (providing useful line errors and easier debugging).

My point is that *.dev.js file enables developers to add original scripts dynamically in dev mode. That's better than sourcemaps in a few ways.

Documentation

grunt.initConfig({
'jsmin-sourcemap': {
		all: {
			src: ['js/script1.js', 'js/script2.js', 'js/lib/library1.js'],
			dest: 'target-script.js',
			destMap: 'target-script.min.js.map',
			destScript: 'target-script.dev.js'
		}
	}
})

target-script.dev.js :

<script src='js/script1.js'></script>
<script src='js/script2.js'></script>
<script src='js/library1.js'></script>

When you combine all three of these, you get a grunt plugin that is your new best debugging friend.

Demos

The demos in the node-jsmin-sourcemap, what makes this tick, are hosted on Plunker for your testing and enjoyment.

Getting Started

Add this line into your package.json dependencies section

"grunt-jsmin-sourcemap": "git://github.com/ivanpopelyshev/grunt-jsmin-sourcemap"

License

As of Dec 05 2013, Todd Wolfson has released grunt-jsmin-sourcemap and its contents to the public domain.

It has been released under the UNLICENSE.

grunt-jsmin-sourcemap's People

Watchers

 avatar  avatar

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.