Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replacing `make` with `grunt` for builds.

Make does not work on Windows, Grunt works cross-platform.
Fixes #71.
Closes #71.
  • Loading branch information...
commit 067f56bd0ce72dbee4a81c0dcd7cdd05b81276de 1 parent 6560660
@JamesMGreene JamesMGreene authored
View
4 .travis.yml
@@ -1,3 +1,5 @@
language: node_js
node_js:
- - 0.8
+ - "0.10"
+before_script:
+ - npm install -g grunt-cli
View
17 CONTRIBUTING.md
@@ -1,7 +1,7 @@
Contributing
==============
-If you find an issue, a pull request is always better than a bug report. Please fork and submit your code fixes.
+If you find an issue, submitting a pull request is always better than a bug report! Please fork and submit your code fixes.
If you want to build some new features, we have a [roadmap.md](docs/roadmap.md) of features we want. You can add features you want there, or just code the feature and send a pull request.
@@ -9,8 +9,17 @@ If you want to build some new features, we have a [roadmap.md](docs/roadmap.md)
$ git clone https://github.com/zeroclipboard/ZeroClipboard.git
$ cd ZeroClipboard/
- $ make
+ $ npm install -g grunt-cli
+ $ npm install
+ $ grunt
-### Tests
- $ make test
+### Developing
+
+ $ npm install
+ $ grunt
+
+
+### Testing
+
+ $ grunt test
View
128 Gruntfile.js
@@ -0,0 +1,128 @@
+/*jshint -W106 */
+module.exports = function(grunt) {
+
+ // Metadata
+ var pkg = grunt.file.readJSON('package.json');
+
+ // Project configuration.
+ grunt.initConfig({
+ // Task configuration
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ Gruntfile: ['Gruntfile.js'],
+ js: ['src/javascript/ZeroClipboard/**/*.js'],
+ test: {
+ options: {
+ jshintrc: 'test/.jshintrc'
+ },
+ src: ['test/*.js']
+ }
+ },
+ clean: {
+ dist: ['ZeroClipboard.*', 'bower.json', 'LICENSE']
+ },
+ concat: {
+ options: {
+ stripBanners: true,
+ process: {
+ data: pkg
+ }
+ },
+ js: {
+ src: [
+ 'src/meta/source-banner.tmpl',
+ 'src/javascript/start.js',
+ 'src/javascript/ZeroClipboard/utils.js',
+ 'src/javascript/ZeroClipboard/client.js',
+ 'src/javascript/ZeroClipboard/core.js',
+ 'src/javascript/ZeroClipboard/dom.js',
+ 'src/javascript/ZeroClipboard/event.js',
+ 'src/javascript/end.js'
+ ],
+ dest: 'ZeroClipboard.js'
+ }
+ },
+ uglify: {
+ options: {
+ preserveComments: 'some',
+ report: 'min'
+ },
+ js: {
+ options: {
+ beautify: {
+ beautify: true,
+ // `indent_level` requires jshint -W106
+ indent_level: 2
+ },
+ mangle: false,
+ compress: false
+ },
+ src: ['ZeroClipboard.js'],
+ dest: 'ZeroClipboard.js'
+ },
+ minjs: {
+ src: ['ZeroClipboard.js'],
+ dest: 'ZeroClipboard.min.js'
+ }
+ },
+ mxmlc: {
+ options: {
+ rawConfig: '-static-link-runtime-shared-libraries=true'
+ },
+ swf: {
+ files: {
+ 'ZeroClipboard.swf': ['src/flash/ZeroClipboard.as']
+ }
+ }
+ },
+ template: {
+ options: {
+ data: pkg
+ },
+ bower: {
+ files: {
+ 'bower.json': ['src/meta/bower.json.tmpl']
+ }
+ },
+ LICENSE: {
+ files: {
+ 'LICENSE': ['src/meta/LICENSE.tmpl']
+ }
+ }
+ },
+ chmod: {
+ options: {
+ mode: '444'
+ },
+ dist: ['ZeroClipboard.*', 'bower.json', 'LICENSE']
+ },
+ nodeunit: {
+ all: ['test/*.js']
+ }
+ });
+
+ // These plugins provide necessary tasks
+ grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-mxmlc');
+ grunt.loadNpmTasks('grunt-chmod');
+ grunt.loadNpmTasks('grunt-template');
+
+
+ //
+ // Task aliases and chains
+ //
+
+ // Default task
+ grunt.registerTask('default', ['jshint', 'clean', 'concat', 'uglify', 'mxmlc', 'template', 'chmod', 'nodeunit']);
+
+ // Other tasks
+ grunt.registerTask('test', ['jshint', 'nodeunit']);
+ grunt.registerTask('travis', ['test']);
+
+};
View
3  LICENSE
@@ -1,9 +1,8 @@
The MIT License (MIT)
-Copyright (c) 2013 Jon Rohan, James M. Greene,
+Copyright (c) 2013 Jon Rohan, James M. Greene
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
View
62 Makefile
@@ -1,62 +0,0 @@
-# set an environment variable to override this to your location. export SWF_COMPILER = /My/Location/bin/mxmlc
-SWF_COMPILER ?= /Applications/Adobe\ Flash\ Builder\ 4.7/sdks/4.6.0/bin/mxmlc -static-link-runtime-shared-libraries=true
-
-NODE_PATH = ./node_modules
-JS_COMPILER = $(NODE_PATH)/uglify-js/bin/uglifyjs
-JS_BEAUTIFIER = $(NODE_PATH)/uglify-js/bin/uglifyjs -b -i 2 -nm -ns
-JS_TEST = $(NODE_PATH)/nodeunit/bin/nodeunit
-JS_HINT = $(NODE_PATH)/jshint/bin/hint
-
-all: \
- node_modules \
- ZeroClipboard.min.js \
- ZeroClipboard.swf \
- bower.json \
- LICENSE \
- test \
-
-node_modules: Makefile
- npm install
-
-.INTERMEDIATE ZeroClipboard.js: \
- src/javascript/start.js \
- src/javascript/ZeroClipboard/utils.js \
- src/javascript/ZeroClipboard/client.js \
- src/javascript/ZeroClipboard/core.js \
- src/javascript/ZeroClipboard/dom.js \
- src/javascript/ZeroClipboard/event.js \
- src/javascript/end.js
-
-ZeroClipboard.js:
- @rm -f $@
- cat $^ | node src/build.js | $(JS_BEAUTIFIER) > $@
- @chmod a-w $@
-
-ZeroClipboard.min.js: ZeroClipboard.js
- @rm -f $@
- $(JS_COMPILER) ./ZeroClipboard.js > $@
- @chmod a-w $@
-
-ZeroClipboard.swf: src/flash/ZeroClipboard.as
- @rm -f $@
- $(SWF_COMPILER) -output $@ $^ -source-path src/flash
- @chmod a-w $@
-
-LICENSE: Makefile
- @rm -f $@
- cat ./src/license.js | node src/build.js > $@
- @chmod a-w $@
-
-bower.json: Makefile
- @rm -f $@
- cat ./src/bower.js | node src/build.js > $@
- @chmod a-w $@
-
-test: ZeroClipboard.min.js
- $(JS_HINT) ./src/javascript/ZeroClipboard/*.js
- $(JS_TEST) ./test
-
-clean:
- rm -rf ./bower.json ./ZeroClipboard* ./LICENSE
-
-.PHONY: all test clean
View
23 ZeroClipboard.js
@@ -1,11 +1,12 @@
/*!
- * zeroclipboard
- * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.
- * Copyright 2013 Jon Rohan, James M. Greene, .
- * Released under the MIT license
- * http://zeroclipboard.github.io/ZeroClipboard/
- * v1.2.0-beta.4
- */(function() {
+* ZeroClipboard
+* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
+* Copyright (c) 2013 Jon Rohan, James M. Greene
+* Licensed MIT
+* http://zeroclipboard.github.io/ZeroClipboard/
+* v1.2.0-beta.4 (2013-08-23)
+*/
+(function() {
"use strict";
var _camelizeCssPropName = function() {
var matcherRegex = /\-([a-z])/g, replacerFn = function(match, group) {
@@ -158,7 +159,7 @@
var _noCache = function(path) {
var client = ZeroClipboard.prototype._singleton;
if (client.options.useNoCache) {
- return (path.indexOf("?") >= 0 ? "&nocache=" : "?nocache=") + (new Date).getTime();
+ return (path.indexOf("?") >= 0 ? "&nocache=" : "?nocache=") + new Date().getTime();
} else {
return "";
}
@@ -373,19 +374,24 @@
}
this.htmlBridge.setAttribute("data-clipboard-ready", true);
break;
+
case "mouseover":
_addClass(element, this.options.hoverClass);
break;
+
case "mouseout":
_removeClass(element, this.options.hoverClass);
this.resetBridge();
break;
+
case "mousedown":
_addClass(element, this.options.activeClass);
break;
+
case "mouseup":
_removeClass(element, this.options.activeClass);
break;
+
case "datarequested":
var targetId = element.getAttribute("data-clipboard-target"), targetEl = !targetId ? null : document.getElementById(targetId);
if (targetEl) {
@@ -397,6 +403,7 @@
}
performCallbackAsync = false;
break;
+
case "complete":
this.options.text = null;
break;
View
15 ZeroClipboard.min.js
@@ -1,8 +1,9 @@
/*!
- * zeroclipboard
- * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.
- * Copyright 2013 Jon Rohan, James M. Greene, .
- * Released under the MIT license
- * http://zeroclipboard.github.io/ZeroClipboard/
- * v1.2.0-beta.4
- */(function(){"use strict";var a=function(){var a=/\-([a-z])/g,b=function(a,b){return b.toUpperCase()};return function(c){return c.replace(a,b)}}(),b=function(b,c){var d,e,f,g,h,i;window.getComputedStyle?d=window.getComputedStyle(b,null).getPropertyValue(c):(e=a(c),b.currentStyle?d=b.currentStyle[e]:d=b.style[e]);if(c==="cursor")if(!d||d==="auto"){f=b.tagName.toLowerCase(),g=["a"];for(h=0,i=g.length;h<i;h++)if(f===g[h])return"pointer"}return d},c=function(a){if(!o.prototype._singleton)return;a||(a=window.event);var b;this!==window?b=this:a.target?b=a.target:a.srcElement&&(b=a.srcElement),o.prototype._singleton.setCurrent(b)},d=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},e=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},f=function(a,b){if(a.addClass)return a.addClass(b),a;if(b&&typeof b=="string"){var c=(b||"").split(/\s+/);if(a.nodeType===1)if(!a.className)a.className=b;else{var d=" "+a.className+" ",e=a.className;for(var f=0,g=c.length;f<g;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}}return a},g=function(a,b){if(a.removeClass)return a.removeClass(b),a;if(b&&typeof b=="string"||b===undefined){var c=(b||"").split(/\s+/);if(a.nodeType===1&&a.className)if(b){var d=(" "+a.className+" ").replace(/[\n\t]/g," ");for(var e=0,f=c.length;e<f;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},h=function(){var a,b,c,d=1;return typeof document.body.getBoundingClientRect=="function"&&(a=document.body.getBoundingClientRect(),b=a.right-a.left,c=document.body.offsetWidth,d=Math.round(b/c*100)/100),d},i=function(a){var c={left:0,top:0,width:0,height:0,zIndex:999999999},d=b(a,"z-index");d&&d!=="auto"&&(c.zIndex=parseInt(d,10));if(a.getBoundingClientRect){var e=a.getBoundingClientRect(),f,g,i;"pageXOffset"in window&&"pageYOffset"in window?(f=window.pageXOffset,g=window.pageYOffset):(i=h(),f=Math.round(document.documentElement.scrollLeft/i),g=Math.round(document.documentElement.scrollTop/i));var j=document.documentElement.clientLeft||0,k=document.documentElement.clientTop||0;c.left=e.left+f-j,c.top=e.top+g-k,c.width="width"in e?e.width:e.right-e.left,c.height="height"in e?e.height:e.bottom-e.top}return c},j=function(a){var b=o.prototype._singleton;return b.options.useNoCache?(a.indexOf("?")>=0?"&nocache=":"?nocache=")+(new Date).getTime():""},k=function(a){var b=[];if(a.trustedDomains){var c;typeof a.trustedDomains=="string"&&a.trustedDomains?c=[a.trustedDomains]:"length"in a.trustedDomains&&(c=a.trustedDomains),b.push("trustedDomain="+encodeURIComponent(c.join(",")))}return typeof a.amdModuleId=="string"&&a.amdModuleId&&b.push("amdModuleId="+encodeURIComponent(a.amdModuleId)),typeof a.cjsModuleId=="string"&&a.cjsModuleId&&b.push("cjsModuleId="+encodeURIComponent(a.cjsModuleId)),b.join("&")},l=function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},m=function(a){if(typeof a=="string")throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},n=function(a,b,c,d,e){e?window.setTimeout(function(){a.call(b,c,d)},0):a.call(b,c,d)},o=function(a,b){a&&(o.prototype._singleton||this).glue(a);if(o.prototype._singleton)return o.prototype._singleton;o.prototype._singleton=this,this.options={};for(var c in s)this.options[c]=s[c];for(var d in b)this.options[d]=b[d];this.handlers={},o.detectFlashSupport()&&v()},p,q=[];o.prototype.setCurrent=function(a){p=a,this.reposition();var c=a.getAttribute("title");c&&this.setTitle(c);var d=this.options.forceHandCursor===!0||b(a,"cursor")==="pointer";r.call(this,d)},o.prototype.setText=function(a){a&&a!==""&&(this.options.text=a,this.ready()&&this.flashBridge.setText(a))},o.prototype.setTitle=function(a){a&&a!==""&&this.htmlBridge.setAttribute("title",a)},o.prototype.setSize=function(a,b){this.ready()&&this.flashBridge.setSize(a,b)},o.prototype.setHandCursor=function(a){a=typeof a=="boolean"?a:!!a,r.call(this,a),this.options.forceHandCursor=a};var r=function(a){this.ready()&&this.flashBridge.setHandCursor(a)};o.version="1.2.0-beta.4";var s={moviePath:"ZeroClipboard.swf",trustedDomains:null,text:null,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",allowScriptAccess:"sameDomain",useNoCache:!0,forceHandCursor:!1};o.setDefaults=function(a){for(var b in a)s[b]=a[b]},o.destroy=function(){o.prototype._singleton.unglue(q);var a=o.prototype._singleton.htmlBridge;a.parentNode.removeChild(a),delete o.prototype._singleton},o.detectFlashSupport=function(){var a=!1;if(typeof ActiveXObject=="function")try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){}return!a&&navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0),a};var t=null,u=null,v=function(){var a=o.prototype._singleton,b=document.getElementById("global-zeroclipboard-html-bridge");if(!b){var c={};for(var d in a.options)c[d]=a.options[d];c.amdModuleId=t,c.cjsModuleId=u;var e=k(c),f=' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%"> <param name="movie" value="'+a.options.moviePath+j(a.options.moviePath)+'"/> <param name="allowScriptAccess" value="'+a.options.allowScriptAccess+'"/> <param name="scale" value="exactfit"/> <param name="loop" value="false"/> <param name="menu" value="false"/> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff"/> <param name="wmode" value="transparent"/> <param name="flashvars" value="'+e+'"/> <embed src="'+a.options.moviePath+j(a.options.moviePath)+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+e+'" scale="exactfit"> </embed> </object>';b=document.createElement("div"),b.id="global-zeroclipboard-html-bridge",b.setAttribute("class","global-zeroclipboard-container"),b.setAttribute("data-clipboard-ready",!1),b.style.position="absolute",b.style.left="-9999px",b.style.top="-9999px",b.style.width="15px",b.style.height="15px",b.style.zIndex="9999",b.innerHTML=f,document.body.appendChild(b)}a.htmlBridge=b,a.flashBridge=document["global-zeroclipboard-flash-bridge"]||b.children[0].lastElementChild};o.prototype.resetBridge=function(){this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),g(p,this.options.activeClass),p=null,this.options.text=null},o.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return a==="true"||a===!0},o.prototype.reposition=function(){if(!p)return!1;var a=i(p);this.htmlBridge.style.top=a.top+"px",this.htmlBridge.style.left=a.left+"px",this.htmlBridge.style.width=a.width+"px",this.htmlBridge.style.height=a.height+"px",this.htmlBridge.style.zIndex=a.zIndex+1,this.setSize(a.width,a.height)},o.dispatch=function(a,b){o.prototype._singleton.receiveEvent(a,b)},o.prototype.on=function(a,b){var c=a.toString().split(/\s/g);for(var d=0;d<c.length;d++)a=c[d].toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=b);this.handlers.noflash&&!o.detectFlashSupport()&&this.receiveEvent("onNoFlash",null)},o.prototype.addEventListener=o.prototype.on,o.prototype.off=function(a,b){var c=a.toString().split(/\s/g);for(var d=0;d<c.length;d++){a=c[d].toLowerCase().replace(/^on/,"");for(var e in this.handlers)e===a&&this.handlers[e]===b&&delete this.handlers[e]}},o.prototype.removeEventListener=o.prototype.off,o.prototype.receiveEvent=function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");var c=p,d=!0;switch(a){case"load":if(b&&parseFloat(b.flashVersion.replace(",",".").replace(/[^0-9\.]/gi,""))<10){this.receiveEvent("onWrongFlash",{flashVersion:b.flashVersion});return}this.htmlBridge.setAttribute("data-clipboard-ready",!0);break;case"mouseover":f(c,this.options.hoverClass);break;case"mouseout":g(c,this.options.hoverClass),this.resetBridge();break;case"mousedown":f(c,this.options.activeClass);break;case"mouseup":g(c,this.options.activeClass);break;case"datarequested":var e=c.getAttribute("data-clipboard-target"),h=e?document.getElementById(e):null;if(h){var i=h.value||h.textContent||h.innerText;i&&this.setText(i)}else{var j=c.getAttribute("data-clipboard-text");j&&this.setText(j)}d=!1;break;case"complete":this.options.text=null}if(this.handlers[a]){var k=this.handlers[a];typeof k=="string"&&typeof window[k]=="function"&&(k=window[k]),typeof k=="function"&&n(k,c,this,b,d)}},o.prototype.glue=function(a){a=m(a);for(var b=0;b<a.length;b++)l(a[b],q)==-1&&(q.push(a[b]),d(a[b],"mouseover",c))},o.prototype.unglue=function(a){a=m(a);for(var b=0;b<a.length;b++){e(a[b],"mouseover",c);var d=l(a[b],q);d!=-1&&q.splice(d,1)}},typeof define=="function"&&define.amd?define(["require","exports","module"],function(a,b,c){return t=c&&c.id||null,o}):typeof module!="undefined"&&module?(u=module.id||null,module.exports=o):window.ZeroClipboard=o})();
+* ZeroClipboard
+* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
+* Copyright (c) 2013 Jon Rohan, James M. Greene
+* Licensed MIT
+* http://zeroclipboard.github.io/ZeroClipboard/
+* v1.2.0-beta.4 (2013-08-23)
+*/
+!function(){"use strict";var a,b=function(){var a=/\-([a-z])/g,b=function(a,b){return b.toUpperCase()};return function(c){return c.replace(a,b)}}(),c=function(a,c){var d,e,f,g,h,i;if(window.getComputedStyle?d=window.getComputedStyle(a,null).getPropertyValue(c):(e=b(c),d=a.currentStyle?a.currentStyle[e]:a.style[e]),"cursor"===c&&(!d||"auto"===d))for(f=a.tagName.toLowerCase(),g=["a"],h=0,i=g.length;i>h;h++)if(f===g[h])return"pointer";return d},d=function(a){if(p.prototype._singleton){a||(a=window.event);var b;this!==window?b=this:a.target?b=a.target:a.srcElement&&(b=a.srcElement),p.prototype._singleton.setCurrent(b)}},e=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},f=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},g=function(a,b){if(a.addClass)return a.addClass(b),a;if(b&&"string"==typeof b){var c=(b||"").split(/\s+/);if(1===a.nodeType)if(a.className){for(var d=" "+a.className+" ",e=a.className,f=0,g=c.length;g>f;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}else a.className=b}return a},h=function(a,b){if(a.removeClass)return a.removeClass(b),a;if(b&&"string"==typeof b||void 0===b){var c=(b||"").split(/\s+/);if(1===a.nodeType&&a.className)if(b){for(var d=(" "+a.className+" ").replace(/[\n\t]/g," "),e=0,f=c.length;f>e;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},i=function(){var a,b,c,d=1;return"function"==typeof document.body.getBoundingClientRect&&(a=document.body.getBoundingClientRect(),b=a.right-a.left,c=document.body.offsetWidth,d=Math.round(100*(b/c))/100),d},j=function(a){var b={left:0,top:0,width:0,height:0,zIndex:999999999},d=c(a,"z-index");if(d&&"auto"!==d&&(b.zIndex=parseInt(d,10)),a.getBoundingClientRect){var e,f,g,h=a.getBoundingClientRect();"pageXOffset"in window&&"pageYOffset"in window?(e=window.pageXOffset,f=window.pageYOffset):(g=i(),e=Math.round(document.documentElement.scrollLeft/g),f=Math.round(document.documentElement.scrollTop/g));var j=document.documentElement.clientLeft||0,k=document.documentElement.clientTop||0;b.left=h.left+e-j,b.top=h.top+f-k,b.width="width"in h?h.width:h.right-h.left,b.height="height"in h?h.height:h.bottom-h.top}return b},k=function(a){var b=p.prototype._singleton;return b.options.useNoCache?(a.indexOf("?")>=0?"&nocache=":"?nocache=")+(new Date).getTime():""},l=function(a){var b=[];if(a.trustedDomains){var c;"string"==typeof a.trustedDomains&&a.trustedDomains?c=[a.trustedDomains]:"length"in a.trustedDomains&&(c=a.trustedDomains),b.push("trustedDomain="+encodeURIComponent(c.join(",")))}return"string"==typeof a.amdModuleId&&a.amdModuleId&&b.push("amdModuleId="+encodeURIComponent(a.amdModuleId)),"string"==typeof a.cjsModuleId&&a.cjsModuleId&&b.push("cjsModuleId="+encodeURIComponent(a.cjsModuleId)),b.join("&")},m=function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;d>c;c++)if(b[c]===a)return c;return-1},n=function(a){if("string"==typeof a)throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},o=function(a,b,c,d,e){e?window.setTimeout(function(){a.call(b,c,d)},0):a.call(b,c,d)},p=function(a,b){if(a&&(p.prototype._singleton||this).glue(a),p.prototype._singleton)return p.prototype._singleton;p.prototype._singleton=this,this.options={};for(var c in s)this.options[c]=s[c];for(var d in b)this.options[d]=b[d];this.handlers={},p.detectFlashSupport()&&v()},q=[];p.prototype.setCurrent=function(b){a=b,this.reposition();var d=b.getAttribute("title");d&&this.setTitle(d);var e=this.options.forceHandCursor===!0||"pointer"===c(b,"cursor");r.call(this,e)},p.prototype.setText=function(a){a&&""!==a&&(this.options.text=a,this.ready()&&this.flashBridge.setText(a))},p.prototype.setTitle=function(a){a&&""!==a&&this.htmlBridge.setAttribute("title",a)},p.prototype.setSize=function(a,b){this.ready()&&this.flashBridge.setSize(a,b)},p.prototype.setHandCursor=function(a){a="boolean"==typeof a?a:!!a,r.call(this,a),this.options.forceHandCursor=a};var r=function(a){this.ready()&&this.flashBridge.setHandCursor(a)};p.version="1.2.0-beta.4";var s={moviePath:"ZeroClipboard.swf",trustedDomains:null,text:null,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",allowScriptAccess:"sameDomain",useNoCache:!0,forceHandCursor:!1};p.setDefaults=function(a){for(var b in a)s[b]=a[b]},p.destroy=function(){p.prototype._singleton.unglue(q);var a=p.prototype._singleton.htmlBridge;a.parentNode.removeChild(a),delete p.prototype._singleton},p.detectFlashSupport=function(){var a=!1;if("function"==typeof ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){}return!a&&navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0),a};var t=null,u=null,v=function(){var a=p.prototype._singleton,b=document.getElementById("global-zeroclipboard-html-bridge");if(!b){var c={};for(var d in a.options)c[d]=a.options[d];c.amdModuleId=t,c.cjsModuleId=u;var e=l(c),f=' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%"> <param name="movie" value="'+a.options.moviePath+k(a.options.moviePath)+'"/> <param name="allowScriptAccess" value="'+a.options.allowScriptAccess+'"/> <param name="scale" value="exactfit"/> <param name="loop" value="false"/> <param name="menu" value="false"/> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff"/> <param name="wmode" value="transparent"/> <param name="flashvars" value="'+e+'"/> <embed src="'+a.options.moviePath+k(a.options.moviePath)+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+e+'" scale="exactfit"> </embed> </object>';b=document.createElement("div"),b.id="global-zeroclipboard-html-bridge",b.setAttribute("class","global-zeroclipboard-container"),b.setAttribute("data-clipboard-ready",!1),b.style.position="absolute",b.style.left="-9999px",b.style.top="-9999px",b.style.width="15px",b.style.height="15px",b.style.zIndex="9999",b.innerHTML=f,document.body.appendChild(b)}a.htmlBridge=b,a.flashBridge=document["global-zeroclipboard-flash-bridge"]||b.children[0].lastElementChild};p.prototype.resetBridge=function(){this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),h(a,this.options.activeClass),a=null,this.options.text=null},p.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return"true"===a||a===!0},p.prototype.reposition=function(){if(!a)return!1;var b=j(a);this.htmlBridge.style.top=b.top+"px",this.htmlBridge.style.left=b.left+"px",this.htmlBridge.style.width=b.width+"px",this.htmlBridge.style.height=b.height+"px",this.htmlBridge.style.zIndex=b.zIndex+1,this.setSize(b.width,b.height)},p.dispatch=function(a,b){p.prototype._singleton.receiveEvent(a,b)},p.prototype.on=function(a,b){for(var c=a.toString().split(/\s/g),d=0;d<c.length;d++)a=c[d].toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=b);this.handlers.noflash&&!p.detectFlashSupport()&&this.receiveEvent("onNoFlash",null)},p.prototype.addEventListener=p.prototype.on,p.prototype.off=function(a,b){for(var c=a.toString().split(/\s/g),d=0;d<c.length;d++){a=c[d].toLowerCase().replace(/^on/,"");for(var e in this.handlers)e===a&&this.handlers[e]===b&&delete this.handlers[e]}},p.prototype.removeEventListener=p.prototype.off,p.prototype.receiveEvent=function(b,c){b=b.toString().toLowerCase().replace(/^on/,"");var d=a,e=!0;switch(b){case"load":if(c&&parseFloat(c.flashVersion.replace(",",".").replace(/[^0-9\.]/gi,""))<10)return this.receiveEvent("onWrongFlash",{flashVersion:c.flashVersion}),void 0;this.htmlBridge.setAttribute("data-clipboard-ready",!0);break;case"mouseover":g(d,this.options.hoverClass);break;case"mouseout":h(d,this.options.hoverClass),this.resetBridge();break;case"mousedown":g(d,this.options.activeClass);break;case"mouseup":h(d,this.options.activeClass);break;case"datarequested":var f=d.getAttribute("data-clipboard-target"),i=f?document.getElementById(f):null;if(i){var j=i.value||i.textContent||i.innerText;j&&this.setText(j)}else{var k=d.getAttribute("data-clipboard-text");k&&this.setText(k)}e=!1;break;case"complete":this.options.text=null}if(this.handlers[b]){var l=this.handlers[b];"string"==typeof l&&"function"==typeof window[l]&&(l=window[l]),"function"==typeof l&&o(l,d,this,c,e)}},p.prototype.glue=function(a){a=n(a);for(var b=0;b<a.length;b++)-1==m(a[b],q)&&(q.push(a[b]),e(a[b],"mouseover",d))},p.prototype.unglue=function(a){a=n(a);for(var b=0;b<a.length;b++){f(a[b],"mouseover",d);var c=m(a[b],q);-1!=c&&q.splice(c,1)}},"function"==typeof define&&define.amd?define(["require","exports","module"],function(a,b,c){return t=c&&c.id||null,p}):"undefined"!=typeof module&&module?(u=module.id||null,module.exports=p):window.ZeroClipboard=p}();
View
BIN  ZeroClipboard.swf
Binary file not shown
View
2  bower.json
@@ -2,4 +2,4 @@
"name": "zeroclipboard",
"version": "1.2.0-beta.4",
"main": ["./ZeroClipboard.js", "./ZeroClipboard.swf"]
-}
+}
View
32 package.json
@@ -1,8 +1,8 @@
{
"name": "zeroclipboard",
+ "title": "ZeroClipboard",
"version": "1.2.0-beta.4",
- "main": "./ZeroClipboard.js",
- "description": "The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.",
+ "description": "The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.",
"keywords": [
"flash",
"clipboard",
@@ -10,7 +10,12 @@
"paste"
],
"homepage": "http://zeroclipboard.github.io/ZeroClipboard/",
- "license": "MIT",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/zeroclipboard/ZeroClipboard/blob/master/LICENSE"
+ }
+ ],
"contributors": [
{
"name": "Jon Rohan",
@@ -30,19 +35,26 @@
"send": "0"
},
"devDependencies": {
- "uglify-js": "1.2.3",
- "nodeunit": "0.7.4",
- "jshint": "0.9.1",
- "handlebars": "1.0.7",
- "jsdom": "0.3.4",
- "jquery": "1.8.3"
+ "nodeunit": "~0.8.1",
+ "jsdom": "~0.8.3",
+ "jquery": "1.8.3",
+ "grunt": "~0.4.1",
+ "grunt-contrib-clean": "~0.5.0",
+ "grunt-contrib-jshint": "~0.6.3",
+ "grunt-contrib-nodeunit": "~0.2.0",
+ "grunt-contrib-concat": "~0.3.0",
+ "grunt-contrib-uglify": "~0.2.2",
+ "grunt-chmod": "~1.0.3",
+ "grunt-mxmlc": "~0.2.0",
+ "grunt-template": "~0.2.0"
},
+ "main": "./ZeroClipboard.js",
"component": {
"scripts": {
"zeroclipboard": "ZeroClipboard.js"
}
},
"scripts": {
- "test": "make test"
+ "test": "grunt travis --verbose"
}
}
View
13 src/build.js
@@ -1,13 +0,0 @@
-var FILE_ENCODING = 'utf-8';
-
-var _handlebars = require('handlebars'),
- _fs = require('fs');
-
-var distContent = _fs.readFileSync('/dev/stdin', FILE_ENCODING);
-var template = _handlebars.compile(distContent);
-
-//reuse package.json data and add build date
-var data = JSON.parse( _fs.readFileSync('package.json', FILE_ENCODING) );
-data.build_date = (new Date()).toUTCString();
-
-console.log(template(data));
View
2  src/javascript/ZeroClipboard/core.js
@@ -1,4 +1,4 @@
-ZeroClipboard.version = "{{version}}";
+ZeroClipboard.version = "<%= version %>";
// ZeroClipboard options defaults
var _defaults = {
moviePath: "ZeroClipboard.swf", // URL to movie
View
8 src/javascript/start.js
@@ -1,10 +1,2 @@
-/*!
- * {{name}}
- * {{description}}
- * Copyright 2013 {{#each contributors}}{{name}}, {{/each}}.
- * Released under the {{license}} license
- * {{homepage}}
- * v{{version}}
- */
(function () {
"use strict";
View
2  src/license.js → src/meta/LICENSE.tmpl
@@ -1,5 +1,5 @@
The MIT License (MIT)
-Copyright (c) 2013 {{#each contributors}}{{name}}, {{/each}}
+Copyright (c) <%= grunt.template.today("yyyy") %> <%= _.pluck(contributors, "name").join(", ") %>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
View
4 src/bower.js → src/meta/bower.json.tmpl
@@ -1,5 +1,5 @@
{
- "name": "{{name}}",
- "version": "{{version}}",
+ "name": "<%= name %>",
+ "version": "<%= version %>",
"main": ["./ZeroClipboard.js", "./ZeroClipboard.swf"]
}
View
8 src/meta/source-banner.tmpl
@@ -0,0 +1,8 @@
+/*!
+* <%= title || name %>
+* <%= description %>
+* Copyright (c) <%= grunt.template.today("yyyy") %> <%= _.pluck(contributors, "name").join(", ") %>
+* Licensed <%= _.pluck(licenses, "type").join(", ") %>
+* <%= homepage %>
+* v<%= version %> (<%= grunt.template.today("yyyy-mm-dd") %>)
+*/
View
14 test/.jshintrc
@@ -0,0 +1,14 @@
+{
+ "camelcase": true,
+ "indent": 2,
+ "strict": false,
+ "trailing": true,
+ "boss": true,
+ "browser": true,
+ "node": true,
+ "multistr": true,
+ "evil": true,
+ "globals": {
+ "$": false
+ }
+}
View
12 test/client.js
@@ -1,6 +1,6 @@
"use strict";
-require("./fixtures/env")
+require("./fixtures/env");
var zeroClipboard, clip;
exports.client = {
@@ -64,7 +64,7 @@ exports.client = {
clip.setCurrent(element);
- test.equal(clip.htmlBridge.getAttribute("title"), "Click me to copy to clipboard.")
+ test.equal(clip.htmlBridge.getAttribute("title"), "Click me to copy to clipboard.");
clip.resetBridge();
@@ -93,7 +93,7 @@ exports.client = {
zeroClipboard.dispatch("datarequested", { flashVersion: "MAC 11,0,0" });
- test.equal(clip.options.text, "Copy me!")
+ test.equal(clip.options.text, "Copy me!");
clip.resetBridge();
@@ -114,7 +114,7 @@ exports.client = {
"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n"+
"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n"+
"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n"+
- "proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
+ "proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
clip.resetBridge();
@@ -135,7 +135,7 @@ exports.client = {
"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\n"+
"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\n"+
"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\n"+
- "proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
+ "proident, sunt in culpa qui officia deserunt mollit anim id est laborum.");
clip.resetBridge();
@@ -151,7 +151,7 @@ exports.client = {
zeroClipboard.dispatch("datarequested", { flashVersion: "MAC 11,0,0" });
- test.equal(clip.options.text, "Clipboard Text")
+ test.equal(clip.options.text, "Clipboard Text");
clip.resetBridge();
View
4 test/core.js
@@ -1,6 +1,6 @@
"use strict";
-require("./fixtures/env")
+require("./fixtures/env");
var zeroClipboard, clip;
exports.core = {
@@ -96,4 +96,4 @@ exports.core = {
zeroClipboard.destroy();
},
-}
+};
View
4 test/dom.js
@@ -1,6 +1,6 @@
"use strict";
-require("./fixtures/env")
+require("./fixtures/env");
var zeroClipboard, clip;
exports.dom = {
@@ -24,4 +24,4 @@ exports.dom = {
test.done();
},
-}
+};
View
58 test/event.js
@@ -1,6 +1,6 @@
"use strict";
-require("./fixtures/env")
+require("./fixtures/env");
var zeroClipboard, clip;
exports.event = {
@@ -18,7 +18,7 @@ exports.event = {
"Glue element after new client": function (test) {
test.expect(2);
- clip.glue($("#d_clip_button"))
+ clip.glue($("#d_clip_button"));
// Test the client was created properly
test.ok(clip.htmlBridge);
@@ -29,7 +29,7 @@ exports.event = {
"unglue element removes items": function (test) {
test.expect(0);
- clip.glue($("#d_clip_button, #d_clip_button2, #d_clip_button3"))
+ clip.glue($("#d_clip_button, #d_clip_button2, #d_clip_button3"));
clip.unglue($("#d_clip_button3, #d_clip_button2"));
@@ -39,7 +39,7 @@ exports.event = {
"Glue element with query string throws TypeError": function (test) {
test.expect(1);
test.throws(function(){
- clip.glue("#d_clip_button")
+ clip.glue("#d_clip_button");
}, TypeError);
test.done();
@@ -115,7 +115,7 @@ exports.event = {
test.done();
},
-
+
"Unregistering two events works": function (test) {
test.expect(2);
var func = function(){};
@@ -224,14 +224,14 @@ exports.event = {
zeroClipboard.dispatch("complete", { flashVersion: "MAC 11,0,0" });
zeroClipboard.dispatch("mouseout", { flashVersion: "MAC 11,0,0" });
},
-
+
"Test onLoad Event with AMD": function (test) {
test.expect(4);
-
+
// This is a special private variable inside of ZeroClipboard, so we can
// only simulate its functionality here
var _amdModuleId = "zc";
-
+
var requireFn = (function() {
var amdCache = {};
amdCache[_amdModuleId] = zeroClipboard;
@@ -255,26 +255,24 @@ exports.event = {
// fake load event
eval(
-'\
-(function(eventName, args, amdModuleId) {\
- requireFn([amdModuleId], function(ZeroClipboard) {\
- test.equal(ZeroClipboard, zeroClipboard);\
- test.equal(eventName, "load");\
- test.deepEqual(args, { flashVersion: "MAC 11,0,0" });\
- ZeroClipboard.dispatch(eventName, args);\
- });\
-})("load", { flashVersion: "MAC 11,0,0" }, ' + JSON.stringify(_amdModuleId) + ');\
-'
+'(function(eventName, args, amdModuleId) {' +
+' requireFn([amdModuleId], function(ZeroClipboard) {' +
+' test.equal(ZeroClipboard, zeroClipboard);' +
+' test.equal(eventName, "load");' +
+' test.deepEqual(args, { flashVersion: "MAC 11,0,0" });' +
+' ZeroClipboard.dispatch(eventName, args);' +
+' });' +
+'})("load", { flashVersion: "MAC 11,0,0" }, ' + JSON.stringify(_amdModuleId) + ');'
);
},
-
+
"Test onLoad Event with CommonJS": function (test) {
test.expect(4);
-
+
// This is a special private variable inside of ZeroClipboard, so we can
// only simulate its functionality here
var _cjsModuleId = "zc";
-
+
var requireFn = (function() {
var cjsCache = {};
cjsCache[_cjsModuleId] = zeroClipboard;
@@ -295,16 +293,14 @@ exports.event = {
// fake load event
eval(
-'\
-(function(eventName, args, cjsModuleId) {\
- var ZeroClipboard = requireFn(cjsModuleId);\
- test.equal(ZeroClipboard, zeroClipboard);\
- test.equal(eventName, "load");\
- test.deepEqual(args, { flashVersion: "MAC 11,0,0" });\
- ZeroClipboard.dispatch(eventName, args);\
-})("load", { flashVersion: "MAC 11,0,0" }, ' + JSON.stringify(_cjsModuleId) + ');\
-'
+'(function(eventName, args, cjsModuleId) {' +
+' var ZeroClipboard = requireFn(cjsModuleId);' +
+' test.equal(ZeroClipboard, zeroClipboard);' +
+' test.equal(eventName, "load");' +
+' test.deepEqual(args, { flashVersion: "MAC 11,0,0" });' +
+' ZeroClipboard.dispatch(eventName, args);' +
+'})("load", { flashVersion: "MAC 11,0,0" }, ' + JSON.stringify(_cjsModuleId) + ');'
);
}
-}
+};
View
34 test/utils.js
@@ -1,6 +1,6 @@
"use strict";
-require("./fixtures/env")
+require("./fixtures/env");
var sandbox = require('nodeunit').utils.sandbox;
var ZeroClipboard, clip, _utils;
@@ -22,7 +22,7 @@ exports.utils = {
ZeroClipboard.destroy();
callback();
},
-
+
"_camelizeCssPropName converts CSS property names": function (test) {
test.expect(3);
test.strictEqual(_utils._camelizeCssPropName("z-index"), "zIndex");
@@ -33,10 +33,10 @@ exports.utils = {
"_getStyle returns computed styles": function (test) {
test.expect(10);
-
+
test.equal(_utils._getStyle($("a.no_cursor_style")[0], "cursor"), "pointer");
test.notEqual(_utils._getStyle($("a.no_pointer_anchor")[0], "cursor"), "pointer");
-
+
var els = {
zIndex: $(".zindex-auto")[0],
clipButton: $("#d_clip_button")[0],
@@ -44,14 +44,14 @@ exports.utils = {
};
// evergreen browsers: `window.getComputedStyle(el, null)`
- test.equal(_utils._getStyle(els.zIndex, "z-index"), "auto");
+ test.equal(_utils._getStyle(els.zIndex, "z-index"), "auto");
test.equal(_utils._getStyle(els.clipButton, "border-left-width"), 0);
test.equal(_utils._getStyle(els.bigBorder, "border-left-width"), 0);
// oldIE (IE8-), doesn't exist in jsdom: `el.currentStyle`
test.equal(typeof els.zIndex.currentStyle, "undefined");
test.equal(els.zIndex.currentStyle, null);
-
+
// Plain ole `el.style`
var tmp = window.getComputedStyle;
try {
@@ -61,12 +61,12 @@ exports.utils = {
test.equal(_utils._getStyle(els.bigBorder, "border-left-width"), 0);
}
catch (e) {
- test.ok(false, "An error occurred: " + e);
+ test.ok(false, "An error occurred: " + e);
}
finally {
window.getComputedStyle = tmp;
}
-
+
test.done();
},
@@ -165,20 +165,20 @@ exports.utils = {
"_vars builds flashvars": function (test) {
test.expect(5);
-
+
test.strictEqual(_utils._vars(clip.options), "");
clip.options.trustedDomains = ["*"];
test.strictEqual(_utils._vars(clip.options), "trustedDomain=*");
-
+
clip.options.trustedDomains = null;
clip.options.amdModuleId = "zcAMD";
test.strictEqual(_utils._vars(clip.options), "amdModuleId=zcAMD");
-
+
clip.options.amdModuleId = null;
clip.options.cjsModuleId = "zcCJS";
test.strictEqual(_utils._vars(clip.options), "cjsModuleId=zcCJS");
-
+
clip.options.trustedDomains = ["*"];
clip.options.amdModuleId = "zcAMD";
clip.options.cjsModuleId = "zcCJS";
@@ -220,26 +220,26 @@ exports.utils = {
"_dispatchCallback = function (func, element, instance, args, async) {": function (test) {
test.expect(6);
-
+
var async = false;
var proof = false;
var proveIt = function() {
proof = true;
-
+
if (async) {
test.strictEqual(proof, true);
-
+
process.nextTick(function() {
test.strictEqual(proof, true);
test.done();
});
}
};
-
+
test.strictEqual(proof, false);
_utils._dispatchCallback(proveIt, null, null, null, async);
test.strictEqual(proof, true);
-
+
async = true;
proof = false;
test.strictEqual(proof, false);
Please sign in to comment.
Something went wrong with that request. Please try again.