diff --git a/.travis.yml b/.travis.yml index 29dbd72..5fadbdb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ before_script: - npm install jscs -g + - npm install -g grunt-cli + - npm install -script: jscs js/table-of-contents.js +script: grunt default diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..3b32fd5 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,29 @@ +module.exports = function(grunt) { + grunt.initConfig({ + jscs: { + src: 'js/table-of-contents.js', + options: { + config: '.jscsrc' + } + }, + uglify: { + options: { + mangle: false, + compress: { + drop_console: true + } + }, + js: { + files: [{ + src: 'js/table-of-contents.js', + dest: 'js/table-of-contents.min.js' + }] + } + } + }); + + grunt.loadNpmTasks('grunt-jscs'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + + grunt.registerTask('default', ['jscs', 'uglify']); +} diff --git a/README.md b/README.md index 90909c6..9684c89 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ TinyMCE Table of Contents creator ================================= -[![Build Status](https://api.travis-ci.org/julenpardo/tinymce-table-of-contents.svg)](https://travis-ci.com/julenpardo/tinymce-table-of-contents) ![Release](https://img.shields.io/badge/release-v1.0--rc1-blue.svg) ![License](https://img.shields.io/badge/license-GPLv3-blue.svg) +[![Build Status](https://api.travis-ci.org/julenpardo/tinymce-table-of-contents.svg)](https://travis-ci.com/julenpardo/tinymce-table-of-contents) ![Release](https://img.shields.io/badge/release-v1.0--rc2-blue.svg) ![License](https://img.shields.io/badge/license-GPLv3-blue.svg) A plugin for TinyMCE text editor & WordPress for creating tables of contents in an incredibly easy and personalizable way. @@ -10,6 +10,16 @@ A plugin for TinyMCE text editor & WordPress for creating tables of contents in - Configuration of the indentation of the levels of the table. - Option to add to the elements of the table link to each section. +### How is the indentation added? + +The indentation of each level of the table is just a set of ` `, styled with `white-space: pre;`, to make the browser preserve them. + +### How are the links added? + +The links are added by adding an `id` attribute to each title appearing in the table of contents, but only if it doesn't have it; original `id` attributes are not overwritten, not to break any other possible reference. + +The format of the generated `id` is `section_x`, `section_x_y`, etc. Then, the link is just a hyperlink to the `id` (e.g., `Section X`). + ## Installation 1. Download it (check the [releases section](https://github.com/julenpardo/tinymce-table-of-contents/releases)). 2. Unzip the contents into a `table-of-contents` named folder. diff --git a/img/table-of-contents.png b/img/table-of-contents.png new file mode 100644 index 0000000..b086981 Binary files /dev/null and b/img/table-of-contents.png differ diff --git a/js/table-of-contents.js b/js/table-of-contents.js index 2cc9be0..bd093f2 100644 --- a/js/table-of-contents.js +++ b/js/table-of-contents.js @@ -34,7 +34,8 @@ // Add Button to Visual Editor Toolbar editor.addButton( 'table_of_contents', { title: 'Table of contents', - cmd: 'table_of_contents' + cmd: 'table_of_contents', + image: url + '/../img/table-of-contents.png' }); editor.addCommand( 'table_of_contents', function() { editor.windowManager.open( { @@ -225,7 +226,7 @@ indentation = '' + indentation + ''; return indentation; - } + } /** * Creates the link for the element of the table of contents that points to the corresponding title section in the diff --git a/js/table-of-contents.min.js b/js/table-of-contents.min.js new file mode 100644 index 0000000..1b8ec13 --- /dev/null +++ b/js/table-of-contents.min.js @@ -0,0 +1 @@ +!function(){function getHigherTitle(contentNode){var capturedTitles,index,titles=["h1","h2","h3","h4","h5","h6"],higherTitle=!1;for(index=0;index0){higherTitle=titles[index];break}return higherTitle=higherTitle.toLowerCase().replace("h","")}function createTable(contentNode,depth,indentation,tableClass,higherTitle,addLinks){var capturedTitles,currentTitle,index,titleIndex,orderedTitles,titleIndex,generatedIndentation,linkLocation,originalId,tableLine,titleValue,table,titles=[],className="tinymce-table-of-contents";for(index=0;index',index=0;index",""),generatedIndentation=generateIndentation(higherTitle,titleIndex,indentation),addLinks?(originalId=orderedTitles[index].id,""===originalId?(linkLocation=createLink(higherTitle,titleIndex,index+1),addIdToTitle(linkLocation,"h"+titleIndex.toString(),titleValue),linkLocation=''):linkLocation='',tableLine=generatedIndentation+linkLocation+titleValue+"
"):tableLine=generatedIndentation+titleValue+"
",table+=tableLine;return table+=""}function generateIndentation(higherTitle,currentTitle,indentationLevel){var depth,index,indentation="";for(depth=currentTitle-higherTitle,index=0;index"}function createLink(higherTitleIndex,currentTitleIndex){var sectionIndex,link,isTopSection,index;for(sectionIndex=currentTitleIndex-higherTitleIndex,void 0===_sectionsCounter[sectionIndex]||null===_sectionsCounter[sectionIndex]?_sectionsCounter[sectionIndex]=1:_sectionsCounter[sectionIndex]++,link="#section_",index=0;index<=sectionIndex;index++)link+=_sectionsCounter[index]+"_";if(link=link.slice(0,-1),isTopSection=0===sectionIndex)for(index=1;index<_sectionsCounter.length;index++)_sectionsCounter[index]=null;return link}function addIdToTitle(location,titleTag,titleValue){var id,documentTitles,index,titleNode,titleNodeValue,editorDocument=tinyMCE.activeEditor.getBody();for(id=location.substring(1),documentTitles=editorDocument.getElementsByTagName(titleTag),index=0;index",""),titleNodeValue===titleValue&&""===titleNode.id){titleNode.id=id;break}}var _sectionsConcat="",_sectionsCounter=[];tinymce.PluginManager.add("table_of_contents",function(editor,url){editor.addButton("table_of_contents",{title:"Table of contents",cmd:"table_of_contents",image:url+"/../img/table-of-contents.png"}),editor.addCommand("table_of_contents",function(){editor.windowManager.open({title:"Table of contents",body:[{type:"textbox",name:"depth",label:"Table depth",value:"2"},{type:"textbox",name:"indentation",label:"Indentation ( in spaces )",value:"4"},{type:"textbox",name:"table_class",label:"Table class",value:"toc"},{type:"checkbox",name:"add_links",label:"Add links to sections",checked:!0}],onsubmit:function(e){var contentNode,higherTitle,table,depth=e.data.depth,indentation=e.data.indentation,tableClass=e.data.table_class,addLinks=e.data.add_links;contentNode=document.createElement("html"),contentNode.innerHTML=tinyMCE.activeEditor.getContent({format:"raw"}),higherTitle=getHigherTitle(contentNode),table=createTable(contentNode,depth,indentation,tableClass,higherTitle,addLinks),editor.insertContent(table),_sectionsConcat="",_sectionsCounter=[]}})})})}(); \ No newline at end of file diff --git a/node_modules/.bin/grunt b/node_modules/.bin/grunt new file mode 120000 index 0000000..47724d2 --- /dev/null +++ b/node_modules/.bin/grunt @@ -0,0 +1 @@ +../grunt/bin/grunt \ No newline at end of file diff --git a/node_modules/grunt-contrib-uglify/README.md b/node_modules/grunt-contrib-uglify/README.md new file mode 100644 index 0000000..d7e85d7 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/README.md @@ -0,0 +1,558 @@ +# grunt-contrib-uglify v1.0.2 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-uglify.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-uglify) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/ybtf5vbvtenii561/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-uglify/branch/master) + +> Minify javascript files with UglifyJS + + + +## Getting Started + +If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: + +```shell +npm install grunt-contrib-uglify --save-dev +``` + +Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript: + +```js +grunt.loadNpmTasks('grunt-contrib-uglify'); +``` + + + + +## Uglify task +_Run this task with the `grunt uglify` command._ + +Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide. + +### Migrating from 2.x to 3.x + +Version `3.x` introduced changes to configuring source maps. Accordingly, if you don't use the source map options you should be able to upgrade seamlessly. If you do use source maps, see below. + +#### Removed options + +`sourceMappingURL` - This is calculated automatically now +`sourceMapPrefix` - No longer necessary for the above reason + +#### Changed options + +`sourceMap` - Only accepts a `Boolean` value. Generates a map with a default name for you +`sourceMapRoot` - The location of your sources is now calculated for you when `sourceMap` is set to `true` but you can set manual source root if needed + +#### New options + +`sourceMapName` - Accepts a string or function to change the location or name of your map +`sourceMapIncludeSources` - Embed the content of your source files directly into the map +`expression` - Accepts a `Boolean` value. Parse a single expression (JSON or single functions) +`quoteStyle` - Accepts integers `0` (default), `1`, `2`, `3`. Enforce or preserve quotation mark style. + +### Options + +This task primarily delegates to [UglifyJS2][], so please consider the [UglifyJS documentation][] as required reading for advanced configuration. + +[UglifyJS2]: https://github.com/mishoo/UglifyJS2 +[UglifyJS documentation]: http://lisperator.net/uglifyjs/ + + +#### mangle +Type: `Boolean` `Object` +Default: `{}` + +Turn on or off mangling with default options. If an `Object` is specified, it is passed directly to `ast.mangle_names()` *and* `ast.compute_char_frequency()` (mimicking command line behavior). [View all options here](https://github.com/mishoo/UglifyJS2#mangler-options). + +#### compress +Type: `Boolean` `Object` +Default: `{}` + +Turn on or off source compression with default options. If an `Object` is specified, it is passed as options to `UglifyJS.Compressor()`. [View all options here](https://github.com/mishoo/UglifyJS2#compressor-options). + +#### beautify +Type: `Boolean` `Object` +Default: `false` + +Turns on beautification of the generated source code. An `Object` will be merged and passed with the options sent to `UglifyJS.OutputStream()`. [View all options here](https://github.com/mishoo/UglifyJS2#beautifier-options) + +###### expression +Type: `Boolean` +Default: `false` + +Parse a single expression, rather than a program (for parsing JSON) + +#### report +Choices: `'none'`, `'min'`, `'gzip'` +Default: `'min'` + +Either report only minification result or report minification and gzip results. +This is useful to see exactly how well UglifyJS is performing but using `'gzip'` will make the task take 5-10x longer to complete. [Example output](https://github.com/sindresorhus/maxmin#readme). +If `'none'` is used the report will be generated on the verbose output. + +#### sourceMap +Type: `Boolean` +Default: `false` + +If `true`, a source map file will be generated in the same directory as the `dest` file. By default it will have the same basename as the `dest` file, but with a `.map` extension. + +#### sourceMapName +Type: `String` `Function` +Default: `undefined` + +To customize the name or location of the generated source map, pass a string to indicate where to write the source map to. If a function is provided, the uglify destination is passed as the argument and the return value will be used as the file name. + +#### sourceMapIn +Type: `String` `Function` +Default: `undefined` + +The location of an input source map from an earlier compilation, e.g. from CoffeeScript. If a function is provided, the +uglify source is passed as the argument and the return value will be used as the sourceMap name. This only makes sense +when there's one source file. + +#### sourceMapIncludeSources +Type: `Boolean` +Default: `false` + +Pass this flag if you want to include the content of source files in the source map as sourcesContent property. + +###### sourceMapRoot +Type: `String` +Default: `undefined` + +With this option you can customize root URL that browser will use when looking for sources. + +If the sources are not absolute URLs after prepending of the `sourceMapRoot`, the sources are resolved relative to the source map. + +#### sourceMapUrl +Type: `String` +Default: `undefined` + +Override the calculated value for `sourceMappingURL` in the source map. This is useful if the source map location is not relative to the base path of the minified file, i.e. when using a CDN + +###### enclose +Type: `Object` +Default: `undefined` + +Wrap all of the code in a closure with a configurable arguments/parameters list. +Each key-value pair in the `enclose` object is effectively an argument-parameter pair. + +#### wrap +Type: `String` +Default: `undefined` + +Wrap all of the code in a closure, an easy way to make sure nothing is leaking. +For variables that need to be public `exports` and `global` variables are made available. +The value of wrap is the global variable exports will be available as. + +#### maxLineLen +Type: `Number` +Default: `32000` + +Limit the line length in symbols. Pass maxLineLen = 0 to disable this safety feature. + +#### ASCIIOnly +Type: `Boolean` +Default: `false` + +Enables to encode non-ASCII characters as \uXXXX. + +#### exportAll +Type: `Boolean` +Default: `false` + +When using `wrap` this will make all global functions and variables available via the export variable. + +#### preserveComments +Type: `Boolean` `String` `Function` +Default: `undefined` +Options: `false` `'all'` `'some'` + +Turn on preservation of comments. + +- `false` will strip all comments +- `'all'` will preserve all comments in code blocks that have not been squashed or dropped +- `'some'` will preserve all comments that start with a bang (`!`) or include a closure compiler style directive (`@preserve` `@license` `@cc_on`) +- `Function` specify your own comment preservation function. You will be passed the current node and the current comment and are expected to return either `true` or `false` + +#### banner +Type: `String` +Default: `''` + +This string will be prepended to the minified output. Template strings (e.g. `<%= config.value %>` will be expanded automatically. + +#### footer +Type: `String` +Default: `''` + +This string will be appended to the minified output. Template strings (e.g. `<%= config.value %>` will be expanded automatically. + +#### screwIE8 +Type: `Boolean` +Default: `false` + +Pass this flag if you don't care about full compliance with Internet Explorer 6-8 quirks. + +#### mangleProperties +Type: `Boolean` `Object` +Default: `false` + +Turn on or off property mangling with default options. If an `Object` is specified, it is passed directly to `ast.mangle_properties()` (mimicking command line behavior). [View all options here](https://github.com/mishoo/UglifyJS2#mangler-options). + +#### reserveDOMProperties +Type: `Boolean` +Default: `false` + +Use this flag in conjunction with `mangleProperties` to prevent built-in browser object properties from being mangled. + +#### exceptionsFiles +Type: `Array` +Default: `[]` + +Use this with `mangleProperties` to pass one or more JSON files containing a list of variables and object properties +that should not be mangled. See the [UglifyJS docs](https://www.npmjs.com/package/uglify-js) for more info on the file syntax. + +#### nameCache +Type: `String` +Default: `''` + +A string that is a path to a JSON cache file that uglify will create and use to coordinate symbol mangling between +multiple runs of uglify. Note: this generated file uses the same JSON format as the `exceptionsFiles` files. + +#### quoteStyle +Type: `Integer` +Default: `0` + +Preserve or enforce quotation mark style. + +* `0` will use single or double quotes such as to minimize the number of bytes (prefers double quotes when both will do) +* `1` will always use single quotes +* `2` will always use double quotes +* `3` will preserve original quotation marks + +### Usage examples + +#### Basic compression + +This configuration will compress and mangle the input files using the default options. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + my_target: { + files: { + 'dest/output.min.js': ['src/input1.js', 'src/input2.js'] + } + } + } +}); +``` + +#### No mangling + +Specify `mangle: false` to prevent changes to your variable and function names. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + options: { + mangle: false + }, + my_target: { + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Reserved identifiers + +You can specify identifiers to leave untouched with an `except` array in the `mangle` options. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + options: { + mangle: { + except: ['jQuery', 'Backbone'] + } + }, + my_target: { + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Source maps + +Generate a source map by setting the `sourceMap` option to `true`. The generated +source map will be in the same directory as the destination file. Its name will be the +basename of the destination file with a `.map` extension. Override these +defaults with the `sourceMapName` attribute. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + my_target: { + options: { + sourceMap: true, + sourceMapName: 'path/to/sourcemap.map' + }, + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Advanced source maps + +Set the `sourceMapIncludeSources` option to `true` to embed your sources directly into the map. To include +a source map from a previous compilation pass it as the value of the `sourceMapIn` option. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + my_target: { + options: { + sourceMap: true, + sourceMapIncludeSources: true, + sourceMapIn: 'example/coffeescript-sourcemap.js', // input sourcemap from a previous compilation + }, + files: { + 'dest/output.min.js': ['src/input.js'], + }, + }, + }, +}); +``` + +Refer to the [UglifyJS SourceMap Documentation](http://lisperator.net/uglifyjs/codegen#source-map) for more information. + +#### Turn off console warnings + +Specify `drop_console: true` as part of the `compress` options to discard calls to `console.*` functions. +This will suppress warning messages in the console. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + options: { + compress: { + drop_console: true + } + }, + my_target: { + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Beautify + +Specify `beautify: true` to beautify your code for debugging/troubleshooting purposes. +Pass an object to manually configure any other output options passed directly to `UglifyJS.OutputStream()`. + +See [UglifyJS Codegen documentation](http://lisperator.net/uglifyjs/codegen) for more information. + +_Note that manual configuration will require you to explicitly set `beautify: true` if you want traditional, beautified output._ + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + my_target: { + options: { + beautify: true + }, + files: { + 'dest/output.min.js': ['src/input.js'] + } + }, + my_advanced_target: { + options: { + beautify: { + width: 80, + beautify: true + } + }, + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Banner comments + +In this example, running `grunt uglify:my_target` will prepend a banner created by interpolating the `banner` template string with the config object. Here, those properties are the values imported from the `package.json` file (which are available via the `pkg` config property) plus today's date. + +_Note: you don't have to use an external JSON file. It's also valid to create the `pkg` object inline in the config. That being said, if you already have a JSON file, you might as well reference it._ + +```js +// Project configuration. +grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + uglify: { + options: { + banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + + '<%= grunt.template.today("yyyy-mm-dd") %> */' + }, + my_target: { + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Conditional compilation + +You can also enable UglifyJS conditional compilation. This is commonly used to remove debug code blocks for production builds. This is equivalent to the command line [`--define` option](https://github.com/mishoo/UglifyJS#use-as-a-code-pre-processor). + +See [UglifyJS global definitions documentation](http://lisperator.net/uglifyjs/compress#global-defs) for more information. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + options: { + compress: { + global_defs: { + 'DEBUG': false + }, + dead_code: true + } + }, + my_target: { + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Compiling all files in a folder dynamically + +This configuration will compress and mangle the files dynamically. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + my_target: { + files: [{ + expand: true, + cwd: 'src/js', + src: '**/*.js', + dest: 'dest/js' + }] + } + } +}); +``` + +#### Turn on object property name mangling + +This configuration will turn on object property name mangling, but not mangle built-in browser object properties. +Additionally, variables and object properties listed in the `myExceptionsFile.json` will be mangled. For more info, +on the format of the exception file format please see the [UglifyJS docs](https://www.npmjs.com/package/uglify-js). + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + options: { + mangleProperties: true, + reserveDOMCache: true, + exceptionsFiles: [ 'myExceptionsFile.json' ] + }, + my_target: { + files: { + 'dest/output.min.js': ['src/input.js'] + } + } + } +}); +``` + +#### Turn on use of name mangling cache + +Turn on use of name mangling cache to coordinate mangled symbols between outputted uglify files. uglify will the +generate a JSON cache file with the name provided in the options. Note: this generated file uses the same JSON format +as the `exceptionsFiles` files. + +```js +// Project configuration. +grunt.initConfig({ + uglify: { + options: { + nameCache: '.tmp/grunt-uglify-cache.json', + }, + my_target: { + files: { + 'dest/output1.min.js': ['src/input1.js'], + 'dest/output2.min.js': ['src/input2.js'] + } + } + } +}); +``` + + +## Release History + + * 2016-03-19   v1.0.2   Update grunt to ^1.0.0. Fix `beautify` when passed as an object. Fix docs about `report` values. + * 2016-03-16   v1.0.1   Downgrade maxmin for Node.js 0.10. + * 2016-03-04   v1.0.0   Use uglify-js ~2.6.2 to fix sourcemap issue. Improve docs for `global-defs` and `--define` options. Add `sourceMapUrl` option. Add `bare_returns` option. Optionally set report verbosity level using report option. + * 2016-01-29   v0.11.1   Update lodash to ^4.0.1. Update grunt-contrib-clean to ^0.7.0. Update grunt-contrib-jshint to ^0.12.0. + * 2015-11-20   v0.11.0   Update uglify-js to ~2.6.0. + * 2015-11-12   v0.10.1   Update uglify-js to ~2.5. + * 2015-10-27   v0.10.0   Update uglify-js to ^2.5. + * 2015-08-24   v0.9.2   Update uglify-js to ^2.4.24 + * 2015-04-07   v0.9.1   More fixes for `mangle` options. + * 2015-04-07   v0.9.0   Add hook into uglify-js's mangling functionality. + * 2015-03-30   v0.8.1   Lock uglify-js to 2.4.17 due to breaking changes. + * 2015-02-19   v0.8.0   Add `screwIE8` option. Fix issue with explicit `compress` in Node.js 0.12.0. + * 2014-12-23   v0.7.0   Add `sourceMapRoot` options. Update readme descriptions. Remove reference to clean-css. + * 2014-09-17   v0.6.0   Output fixes. Add `ASCIIOnly` option. Other fixes. + * 2014-07-25   v0.5.1   Update chalk to ^0.5.1. Output updates. + * 2014-03-01   v0.4.0   Remove grunt-lib-contrib dependency and add more colors. + * 2014-02-27   v0.3.3   Remove unnecessary calls to `grunt.template.process`. + * 2014-01-22   v0.3.2   Fix handling of `sourceMapIncludeSources` option. + * 2014-01-20   v0.3.1   Fix relative path issue in sourcemaps. + * 2014-01-16   v0.3.0   Refactor sourcemap support. + * 2013-11-09   v0.2.7   Prepend banner if `sourceMap` option not set, addresses #109. + * 2013-11-08   v0.2.6   Merge #45, #53, #85 (#105 by way of duping #53). Add support for banners in uglified files with sourcemaps. Update docs. + * 2013-10-28   v0.2.5   Add warning for banners when using sourcemaps. + * 2013-09-02   v0.2.4   Update sourcemap format via #83. + * 2013-06-10   v0.2.3   Add `footer` option. + * 2013-05-31   v0.2.2   Revert #56 due to #58 until [chrome/239660](https://code.google.com/p/chromium/issues/detail?id=239660&q=sourcemappingurl&colspec=ID%20Pri%20M%20Iteration%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified) [firefox/870361](https://bugzilla.mozilla.org/show_bug.cgi?id=870361) drop. + * 2013-05-22   v0.2.1   Update uglify-js to ~2.3.5 #55 #40. Change `sourcemappingUrl` syntax #56. Disable sorting of names for consistent mangling #44. Update docs for `sourceMapRoot` #47 #25. + * 2013-03-14   v0.2.0   No longer report gzip results by default. Support `report` option. + * 2013-01-30   v0.1.2   Add better error reporting. Support for dynamic names of multiple sourcemaps. + * 2013-02-15   v0.1.1   First official release for Grunt 0.4.0. + * 2013-01-18   v0.1.1rc6   Update grunt/gruntplugin dependencies to rc6. Change in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. + * 2013-01-09   v0.1.1rc5   Update to work with grunt v0.4.0rc5. Switch back to `this.files` API. + * 2012-11-28   v0.1.0   Work in progress, not officially released yet. + +--- + +Task submitted by ["Cowboy" Ben Alman](http://benalman.com) + +*This file was generated on Tue Jul 19 2016 16:34:56.* diff --git a/node_modules/grunt-contrib-uglify/node_modules/.bin/uglifyjs b/node_modules/grunt-contrib-uglify/node_modules/.bin/uglifyjs new file mode 120000 index 0000000..fef3468 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/index.js new file mode 100644 index 0000000..2d85a91 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..7894527 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..cd4ad68 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/package.json @@ -0,0 +1,68 @@ +{ + "name": "ansi-styles", + "version": "2.2.1", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/chalk/ansi-styles" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "devDependencies": { + "mocha": "*" + }, + "readme": "# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)\n\n> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal\n\nYou probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.\n\n![](screenshot.png)\n\n\n## Install\n\n```\n$ npm install --save ansi-styles\n```\n\n\n## Usage\n\n```js\nvar ansi = require('ansi-styles');\n\nconsole.log(ansi.green.open + 'Hello world!' + ansi.green.close);\n```\n\n\n## API\n\nEach style has an `open` and `close` property.\n\n\n## Styles\n\n### Modifiers\n\n- `reset`\n- `bold`\n- `dim`\n- `italic` *(not widely supported)*\n- `underline`\n- `inverse`\n- `hidden`\n- `strikethrough` *(not widely supported)*\n\n### Colors\n\n- `black`\n- `red`\n- `green`\n- `yellow`\n- `blue`\n- `magenta`\n- `cyan`\n- `white`\n- `gray`\n\n### Background colors\n\n- `bgBlack`\n- `bgRed`\n- `bgGreen`\n- `bgYellow`\n- `bgBlue`\n- `bgMagenta`\n- `bgCyan`\n- `bgWhite`\n\n\n## Advanced usage\n\nBy default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.\n\n- `ansi.modifiers`\n- `ansi.colors`\n- `ansi.bgColors`\n\n\n###### Example\n\n```js\nconsole.log(ansi.colors.green.open);\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "_id": "ansi-styles@2.2.1", + "_from": "ansi-styles@^2.2.1" +} diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/readme.md b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..3f933f6 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/index.js new file mode 100644 index 0000000..7834bf9 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/package.json new file mode 100644 index 0000000..112da81 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/package.json @@ -0,0 +1,59 @@ +{ + "name": "escape-string-regexp", + "version": "1.0.5", + "description": "Escape RegExp special characters", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/escape-string-regexp" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + } + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "escape", + "regex", + "regexp", + "re", + "regular", + "expression", + "string", + "str", + "special", + "characters" + ], + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "readme": "# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)\n\n> Escape RegExp special characters\n\n\n## Install\n\n```\n$ npm install --save escape-string-regexp\n```\n\n\n## Usage\n\n```js\nconst escapeStringRegexp = require('escape-string-regexp');\n\nconst escapedString = escapeStringRegexp('how much $ for a unicorn?');\n//=> 'how much \\$ for a unicorn\\?'\n\nnew RegExp(escapedString);\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/sindresorhus/escape-string-regexp/issues" + }, + "_id": "escape-string-regexp@1.0.5", + "_from": "escape-string-regexp@^1.0.2" +} diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/readme.md b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/readme.md new file mode 100644 index 0000000..87ac82d --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/escape-string-regexp/readme.md @@ -0,0 +1,27 @@ +# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) + +> Escape RegExp special characters + + +## Install + +``` +$ npm install --save escape-string-regexp +``` + + +## Usage + +```js +const escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('how much $ for a unicorn?'); +//=> 'how much \$ for a unicorn\?' + +new RegExp(escapedString); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/index.js new file mode 100644 index 0000000..98fae06 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +var ansiRegex = require('ansi-regex'); +var re = new RegExp(ansiRegex().source); // remove the `g` flag +module.exports = re.test.bind(re); diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..4906755 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; +}; diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..ba475d9 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,74 @@ +{ + "name": "ansi-regex", + "version": "2.0.0", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-regex" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "mocha": "*" + }, + "readme": "# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)\n\n> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)\n\n\n## Install\n\n```\n$ npm install --save ansi-regex\n```\n\n\n## Usage\n\n```js\nvar ansiRegex = require('ansi-regex');\n\nansiRegex().test('\\u001b[4mcake\\u001b[0m');\n//=> true\n\nansiRegex().test('cake');\n//=> false\n\n'\\u001b[4mcake\\u001b[0m'.match(ansiRegex());\n//=> ['\\u001b[4m', '\\u001b[0m']\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "_id": "ansi-regex@2.0.0", + "_from": "ansi-regex@^2.0.0" +} diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..1a4894e --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,31 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/package.json new file mode 100644 index 0000000..b95a12e --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/package.json @@ -0,0 +1,73 @@ +{ + "name": "has-ansi", + "version": "2.0.0", + "description": "Check if a string has ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/has-ansi" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern", + "has" + ], + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "devDependencies": { + "ava": "0.0.4" + }, + "readme": "# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi)\n\n> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)\n\n\n## Install\n\n```\n$ npm install --save has-ansi\n```\n\n\n## Usage\n\n```js\nvar hasAnsi = require('has-ansi');\n\nhasAnsi('\\u001b[4mcake\\u001b[0m');\n//=> true\n\nhasAnsi('cake');\n//=> false\n```\n\n\n## Related\n\n- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module\n- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes\n- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes\n- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/sindresorhus/has-ansi/issues" + }, + "_id": "has-ansi@2.0.0", + "_from": "has-ansi@^2.0.0" +} diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/readme.md b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/readme.md new file mode 100644 index 0000000..02bc7c2 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/has-ansi/readme.md @@ -0,0 +1,36 @@ +# has-ansi [![Build Status](https://travis-ci.org/sindresorhus/has-ansi.svg?branch=master)](https://travis-ci.org/sindresorhus/has-ansi) + +> Check if a string has [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save has-ansi +``` + + +## Usage + +```js +var hasAnsi = require('has-ansi'); + +hasAnsi('\u001b[4mcake\u001b[0m'); +//=> true + +hasAnsi('cake'); +//=> false +``` + + +## Related + +- [has-ansi-cli](https://github.com/sindresorhus/has-ansi-cli) - CLI for this module +- [strip-ansi](https://github.com/sindresorhus/strip-ansi) - Strip ANSI escape codes +- [ansi-regex](https://github.com/sindresorhus/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/sindresorhus/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/index.js new file mode 100644 index 0000000..099480f --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/index.js @@ -0,0 +1,6 @@ +'use strict'; +var ansiRegex = require('ansi-regex')(); + +module.exports = function (str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..4906755 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; +}; diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..ba475d9 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -0,0 +1,74 @@ +{ + "name": "ansi-regex", + "version": "2.0.0", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/sindresorhus/ansi-regex" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha test/test.js", + "view-supported": "node test/viewCodes.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "mocha": "*" + }, + "readme": "# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex)\n\n> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)\n\n\n## Install\n\n```\n$ npm install --save ansi-regex\n```\n\n\n## Usage\n\n```js\nvar ansiRegex = require('ansi-regex');\n\nansiRegex().test('\\u001b[4mcake\\u001b[0m');\n//=> true\n\nansiRegex().test('cake');\n//=> false\n\n'\\u001b[4mcake\\u001b[0m'.match(ansiRegex());\n//=> ['\\u001b[4m', '\\u001b[0m']\n```\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/sindresorhus/ansi-regex/issues" + }, + "_id": "ansi-regex@2.0.0", + "_from": "ansi-regex@^2.0.0" +} diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..1a4894e --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/node_modules/ansi-regex/readme.md @@ -0,0 +1,31 @@ +# ansi-regex [![Build Status](https://travis-ci.org/sindresorhus/ansi-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +var ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/package.json new file mode 100644 index 0000000..7325f6d --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/package.json @@ -0,0 +1,79 @@ +{ + "name": "strip-ansi", + "version": "3.0.1", + "description": "Strip ANSI escape codes", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/chalk/strip-ansi" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Boy Nicolai Appelman", + "email": "joshua@jbna.nl", + "url": "jbna.nl" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "readme": "# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)\n\n> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)\n\n\n## Install\n\n```\n$ npm install --save strip-ansi\n```\n\n\n## Usage\n\n```js\nvar stripAnsi = require('strip-ansi');\n\nstripAnsi('\\u001b[4mcake\\u001b[0m');\n//=> 'cake'\n```\n\n\n## Related\n\n- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module\n- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes\n- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes\n- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/chalk/strip-ansi/issues" + }, + "_id": "strip-ansi@3.0.1", + "_from": "strip-ansi@^3.0.0" +} diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/readme.md b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/readme.md new file mode 100644 index 0000000..cb7d9ff --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/strip-ansi/readme.md @@ -0,0 +1,33 @@ +# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi) + +> Strip [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save strip-ansi +``` + + +## Usage + +```js +var stripAnsi = require('strip-ansi'); + +stripAnsi('\u001b[4mcake\u001b[0m'); +//=> 'cake' +``` + + +## Related + +- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module +- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes +- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/index.js b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/index.js new file mode 100644 index 0000000..4346e27 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/index.js @@ -0,0 +1,50 @@ +'use strict'; +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function (flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +module.exports = (function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/package.json new file mode 100644 index 0000000..2b36828 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/package.json @@ -0,0 +1,67 @@ +{ + "name": "supports-color", + "version": "2.0.0", + "description": "Detect whether a terminal supports color", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/chalk/supports-color" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + } + ], + "engines": { + "node": ">=0.8.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "ansi", + "styles", + "tty", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "support", + "supports", + "capability", + "detect" + ], + "devDependencies": { + "mocha": "*", + "require-uncached": "^1.0.2" + }, + "readme": "# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)\n\n> Detect whether a terminal supports color\n\n\n## Install\n\n```\n$ npm install --save supports-color\n```\n\n\n## Usage\n\n```js\nvar supportsColor = require('supports-color');\n\nif (supportsColor) {\n\tconsole.log('Terminal supports color');\n}\n```\n\nIt obeys the `--color` and `--no-color` CLI flags.\n\nFor situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.\n\n\n## Related\n\n- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module\n- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", + "readmeFilename": "readme.md", + "bugs": { + "url": "https://github.com/chalk/supports-color/issues" + }, + "_id": "supports-color@2.0.0", + "_from": "supports-color@^2.0.0" +} diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/readme.md b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/readme.md new file mode 100644 index 0000000..b4761f1 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/node_modules/supports-color/readme.md @@ -0,0 +1,36 @@ +# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) + +> Detect whether a terminal supports color + + +## Install + +``` +$ npm install --save supports-color +``` + + +## Usage + +```js +var supportsColor = require('supports-color'); + +if (supportsColor) { + console.log('Terminal supports color'); +} +``` + +It obeys the `--color` and `--no-color` CLI flags. + +For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`. + + +## Related + +- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module +- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/grunt-contrib-uglify/node_modules/chalk/package.json b/node_modules/grunt-contrib-uglify/node_modules/chalk/package.json new file mode 100644 index 0000000..6351ac4 --- /dev/null +++ b/node_modules/grunt-contrib-uglify/node_modules/chalk/package.json @@ -0,0 +1,92 @@ +{ + "name": "chalk", + "version": "1.1.3", + "description": "Terminal string styling done right. Much color.", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/chalk/chalk" + }, + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "xo && mocha", + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" + }, + "files": [ + "index.js" + ], + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "xo": { + "envs": [ + "node", + "mocha" + ] + }, + "readme": "

\n\t
\n\t
\n\t\"chalk\"\n\t
\n\t
\n\t
\n

\n\n> Terminal string styling done right\n\n[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk)\n[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master)\n[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4)\n\n\n[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.\n\n**Chalk is a clean and focused alternative.**\n\n![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png)\n\n\n## Why\n\n- Highly performant\n- Doesn't extend `String.prototype`\n- Expressive API\n- Ability to nest styles\n- Clean and focused\n- Auto-detects color support\n- Actively maintained\n- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015\n\n\n## Install\n\n```\n$ npm install --save chalk\n```\n\n\n## Usage\n\nChalk comes with an easy to use composable API where you just chain and nest the styles you want.\n\n```js\nvar chalk = require('chalk');\n\n// style a string\nchalk.blue('Hello world!');\n\n// combine styled and normal strings\nchalk.blue('Hello') + 'World' + chalk.red('!');\n\n// compose multiple styles using the chainable API\nchalk.blue.bgRed.bold('Hello world!');\n\n// pass in multiple arguments\nchalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz');\n\n// nest styles\nchalk.red('Hello', chalk.underline.bgBlue('world') + '!');\n\n// nest styles of the same type even (color, underline, background)\nchalk.green(\n\t'I am a green line ' +\n\tchalk.blue.underline.bold('with a blue substring') +\n\t' that becomes green again!'\n);\n```\n\nEasily define your own themes.\n\n```js\nvar chalk = require('chalk');\nvar error = chalk.bold.red;\nconsole.log(error('Error!'));\n```\n\nTake advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data).\n\n```js\nvar name = 'Sindre';\nconsole.log(chalk.green('Hello %s'), name);\n//=> Hello Sindre\n```\n\n\n## API\n\n### chalk.`", + "expected": [ + { + "type": "style", + "name": "style", + "attribs": { + "type": "text/css" + }, + "children": [ + { + "data": "\n body > p\n\t{ font-weight: bold; }", + "type": "text" + } + ] + } + ] +} \ No newline at end of file diff --git a/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json b/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json new file mode 100644 index 0000000..5c2492e --- /dev/null +++ b/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json @@ -0,0 +1,20 @@ +{ + "name": "Extra spaces in tag", + "options": {}, + "html": "the text", + "expected": [ + { + "type": "tag", + "name": "font", + "attribs": { + "size": "14" + }, + "children": [ + { + "data": "the text", + "type": "text" + } + ] + } + ] +} \ No newline at end of file diff --git a/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/09-unquoted_attrib.json b/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/09-unquoted_attrib.json new file mode 100644 index 0000000..543ccee --- /dev/null +++ b/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/09-unquoted_attrib.json @@ -0,0 +1,20 @@ +{ + "name": "Unquoted attributes", + "options": {}, + "html": "the text", + "expected": [ + { + "type": "tag", + "name": "font", + "attribs": { + "size": "14" + }, + "children": [ + { + "data": "the text", + "type": "text" + } + ] + } + ] +} \ No newline at end of file diff --git a/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/10-singular_attribute.json b/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/10-singular_attribute.json new file mode 100644 index 0000000..544636e --- /dev/null +++ b/node_modules/grunt-jscs/node_modules/jscs/node_modules/htmlparser2/node_modules/domhandler/test/cases/10-singular_attribute.json @@ -0,0 +1,15 @@ +{ + "name": "Singular attribute", + "options": {}, + "html": "