mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 10:38:26 +00:00
feature(bower) smalltalk v2.1.1
This commit is contained in:
parent
caa6bd61cd
commit
f69036f5a3
10 changed files with 45 additions and 26 deletions
|
|
@ -39,7 +39,7 @@
|
|||
"olark": "^1.0.0",
|
||||
"philip": "^1.3.3",
|
||||
"jquery": "3.1.0",
|
||||
"smalltalk": "2.1.0",
|
||||
"promise-polyfill": "6.0.0"
|
||||
"promise-polyfill": "6.0.0",
|
||||
"smalltalk": "2.1.1"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
"commit": "33dbcad07b762540f0f743f917be9bc829108bae"
|
||||
},
|
||||
"_source": "https://github.com/taylorhakes/promise-polyfill.git",
|
||||
"_target": "^6.0.0",
|
||||
"_originalSource": "promise-polyfill",
|
||||
"_direct": true
|
||||
"_target": "6.0.0",
|
||||
"_originalSource": "promise-polyfill"
|
||||
}
|
||||
|
|
@ -20,17 +20,19 @@
|
|||
"ignore": [
|
||||
"**/.*",
|
||||
"screen",
|
||||
"example"
|
||||
"example",
|
||||
"test"
|
||||
],
|
||||
"dependencies": {},
|
||||
"version": "2.1.0",
|
||||
"_release": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"_release": "2.1.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v2.1.0",
|
||||
"commit": "c94a49648f0ffff6f24e5770581b0528cc130664"
|
||||
"tag": "v2.1.1",
|
||||
"commit": "d5fbf701270e46919e63d287be0834c6b718ae51"
|
||||
},
|
||||
"_source": "https://github.com/coderaiser/smalltalk.git",
|
||||
"_target": "2.1.0",
|
||||
"_originalSource": "smalltalk"
|
||||
"_target": "^2.1.1",
|
||||
"_originalSource": "smalltalk",
|
||||
"_direct": true
|
||||
}
|
||||
|
|
@ -1,3 +1,12 @@
|
|||
2016.07.25, v2.1.1
|
||||
|
||||
fix:
|
||||
- (smalltalk.native) confirm options: noCancel -> cancel
|
||||
|
||||
feature:
|
||||
- (package) promise-polyfill v6.0.0
|
||||
|
||||
|
||||
2016.07.20, v2.1.0
|
||||
|
||||
fix:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@
|
|||
"ignore": [
|
||||
"**/.*",
|
||||
"screen",
|
||||
"example"
|
||||
"example",
|
||||
"test"
|
||||
],
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.smalltalk=e()}}(function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var l="function"==typeof require&&require;if(!u&&l)return l(i,!0);if(f)return f(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return o(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({smalltalk:[function(e,n,r){"use strict";r.alert=function(e,n){var r=new Promise(function(e){alert(n),e()});return r},r.prompt=function(e,n,r,t){var o=t,f=new Promise(function(e,t){var f=o&&!o.cancel,i=prompt(n,r);null!==i?e(i):f||t()});return f},r.confirm=function(e,n,r){var t=r,o=t&&!t.noCancel,f=new Promise(function(e,r){var t=confirm(n);t?e():o||r()});return f}},{}]},{},["smalltalk"])("smalltalk")});
|
||||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.smalltalk=e()}}(function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var l="function"==typeof require&&require;if(!u&&l)return l(i,!0);if(f)return f(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return o(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({smalltalk:[function(e,n,r){"use strict";r.alert=function(e,n){var r=new Promise(function(e){alert(n),e()});return r},r.prompt=function(e,n,r,t){var o=t,f=new Promise(function(e,t){var f=o&&!o.cancel,i=prompt(n,r);null!==i?e(i):f||t()});return f},r.confirm=function(e,n,r){var t=r,o=t&&!t.cancel,f=new Promise(function(e,r){var t=confirm(n);t||o?e():r()});return f}},{}]},{},["smalltalk"])("smalltalk")});
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
!function(t){function e(){}function n(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],s(t,this)}function r(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void a(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?i:f)(e.promise,t._value);var o;try{o=n(t._value)}catch(r){return void f(e.promise,r)}i(e.promise,o)}))}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if(e instanceof o)return t._state=3,t._value=e,void u(t);if("function"==typeof r)return void s(n(r,e),t)}t._state=1,t._value=e,u(t)}catch(i){f(t,i)}}function f(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&a(function(){t._handled||d(t._value)});for(var e=0,n=t._deferreds.length;n>e;e++)r(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function s(t,e){var n=!1;try{t(function(t){n||(n=!0,i(e,t))},function(t){n||(n=!0,f(e,t))})}catch(o){if(n)return;n=!0,f(e,o)}}var l=setTimeout,a="function"==typeof setImmediate&&setImmediate||function(t){l(t,0)},d=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};o.prototype["catch"]=function(t){return this.then(null,t)},o.prototype.then=function(t,n){var o=new this.constructor(e);return r(this,new c(t,n,o)),o},o.all=function(t){var e=Array.prototype.slice.call(t);return new o(function(t,n){function o(i,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(t){o(i,t)},n)}e[i]=f,0===--r&&t(e)}catch(c){n(c)}}if(0===e.length)return t([]);for(var r=e.length,i=0;i<e.length;i++)o(i,e[i])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var o=0,r=t.length;r>o;o++)t[o].then(e,n)})},o._setImmediateFn=function(t){a=t},o._setUnhandledRejectionFn=function(t){d=t},"undefined"!=typeof module&&module.exports?module.exports=o:t.Promise||(t.Promise=o)}(this);!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.smalltalk=e()}}(function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var l="function"==typeof require&&require;if(!u&&l)return l(i,!0);if(f)return f(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return o(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({smalltalk:[function(e,n,r){"use strict";r.alert=function(e,n){var r=new Promise(function(e){alert(n),e()});return r},r.prompt=function(e,n,r,t){var o=t,f=new Promise(function(e,t){var f=o&&!o.cancel,i=prompt(n,r);null!==i?e(i):f||t()});return f},r.confirm=function(e,n,r){var t=r,o=t&&!t.noCancel,f=new Promise(function(e,r){var t=confirm(n);t?e():o||r()});return f}},{}]},{},["smalltalk"])("smalltalk")});
|
||||
!function(t){function e(){}function n(t,e){return function(){t.apply(e,arguments)}}function o(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],s(t,this)}function r(t,e){for(;3===t._state;)t=t._value;return 0===t._state?void t._deferreds.push(e):(t._handled=!0,void a(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._state?i:f)(e.promise,t._value);var o;try{o=n(t._value)}catch(r){return void f(e.promise,r)}i(e.promise,o)}))}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if(e instanceof o)return t._state=3,t._value=e,void u(t);if("function"==typeof r)return void s(n(r,e),t)}t._state=1,t._value=e,u(t)}catch(i){f(t,i)}}function f(t,e){t._state=2,t._value=e,u(t)}function u(t){2===t._state&&0===t._deferreds.length&&a(function(){t._handled||d(t._value)});for(var e=0,n=t._deferreds.length;n>e;e++)r(t,t._deferreds[e]);t._deferreds=null}function c(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function s(t,e){var n=!1;try{t(function(t){n||(n=!0,i(e,t))},function(t){n||(n=!0,f(e,t))})}catch(o){if(n)return;n=!0,f(e,o)}}var l=setTimeout,a="function"==typeof setImmediate&&setImmediate||function(t){l(t,0)},d=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)};o.prototype["catch"]=function(t){return this.then(null,t)},o.prototype.then=function(t,n){var o=new this.constructor(e);return r(this,new c(t,n,o)),o},o.all=function(t){var e=Array.prototype.slice.call(t);return new o(function(t,n){function o(i,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(t){o(i,t)},n)}e[i]=f,0===--r&&t(e)}catch(c){n(c)}}if(0===e.length)return t([]);for(var r=e.length,i=0;i<e.length;i++)o(i,e[i])})},o.resolve=function(t){return t&&"object"==typeof t&&t.constructor===o?t:new o(function(e){e(t)})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){for(var o=0,r=t.length;r>o;o++)t[o].then(e,n)})},o._setImmediateFn=function(t){a=t},o._setUnhandledRejectionFn=function(t){d=t},"undefined"!=typeof module&&module.exports?module.exports=o:t.Promise||(t.Promise=o)}(this);!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.smalltalk=e()}}(function(){return function e(n,r,t){function o(i,u){if(!r[i]){if(!n[i]){var l="function"==typeof require&&require;if(!u&&l)return l(i,!0);if(f)return f(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var c=r[i]={exports:{}};n[i][0].call(c.exports,function(e){var r=n[i][1][e];return o(r?r:e)},c,c.exports,e,n,r,t)}return r[i].exports}for(var f="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({smalltalk:[function(e,n,r){"use strict";r.alert=function(e,n){var r=new Promise(function(e){alert(n),e()});return r},r.prompt=function(e,n,r,t){var o=t,f=new Promise(function(e,t){var f=o&&!o.cancel,i=prompt(n,r);null!==i?e(i):f||t()});return f},r.confirm=function(e,n,r){var t=r,o=t&&!t.cancel,f=new Promise(function(e,r){var t=confirm(n);t||o?e():r()});return f}},{}]},{},["smalltalk"])("smalltalk")});
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ function showDialog(title, msg, value, buttons, options) {
|
|||
el.setSelectionRange(0, value.length);
|
||||
});
|
||||
|
||||
addListeterAll('click', dialog, closeButtons, event =>
|
||||
addListenerAll('click', dialog, closeButtons, event =>
|
||||
closeDialog(event.target, dialog, ok, cancel)
|
||||
);
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ function find(element, names) {
|
|||
return elements;
|
||||
}
|
||||
|
||||
function addListeterAll(event, parent, elements, fn) {
|
||||
function addListenerAll(event, parent, elements, fn) {
|
||||
find(parent, elements).forEach(el =>
|
||||
el.addEventListener(event, fn)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ exports.prompt = (title, message, value, options) => {
|
|||
|
||||
exports.confirm = (title, message, options) => {
|
||||
const o = options,
|
||||
noCancel = o && !o.noCancel,
|
||||
noCancel = o && !o.cancel,
|
||||
promise = new Promise(function(resolve, reject) {
|
||||
const is = confirm(message);
|
||||
|
||||
if (is)
|
||||
if (is || noCancel)
|
||||
resolve();
|
||||
else if (!noCancel)
|
||||
else
|
||||
reject();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "smalltalk",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"description": "Promise-based Alert, Confirm and Prompt replacement",
|
||||
"homepage": "http://github.com/coderaiser/smalltalk",
|
||||
"repository": {
|
||||
|
|
@ -17,7 +17,11 @@
|
|||
]
|
||||
},
|
||||
"scripts": {
|
||||
"watch": "watch 'npm run 6to5' dist",
|
||||
"watch": "nodemon --watch lib --watch test --exec",
|
||||
"watch:test": "npm run watch -- npm test",
|
||||
"watch:coverage": "redrun watch -- redrun coverage",
|
||||
"coverage": "nyc npm test",
|
||||
"report": "nyc report --reporter=text-lcov | coveralls",
|
||||
"compile:js": "babel -d legacy lib",
|
||||
"compile:css": "postcss --use autoprefixer css/*.css -d dist",
|
||||
"minify:css": "minify dist/smalltalk.css > dist/smalltalk.min.css",
|
||||
|
|
@ -41,9 +45,9 @@
|
|||
"minify": "minify",
|
||||
"wisdom": "npm run build",
|
||||
"lint:css": "stylelint css/*.css",
|
||||
"lint:js": "jshint lib && jscs lib && eslint lib",
|
||||
"lint:js": "jshint lib test && jscs lib test && eslint lib test",
|
||||
"lint": "redrun lint:*",
|
||||
"test": "redrun lint:*"
|
||||
"test": "tape 'test/**/*.js'"
|
||||
},
|
||||
"keywords": [
|
||||
"modal",
|
||||
|
|
@ -61,17 +65,21 @@
|
|||
"babel-cli": "^6.1.1",
|
||||
"babel-preset-es2015": "^6.0.15",
|
||||
"browserify": "^13.0.1",
|
||||
"coveralls": "^2.11.11",
|
||||
"eslint": "^3.0.1",
|
||||
"jscs": "^3.0.3",
|
||||
"jshint": "^2.8.0",
|
||||
"minify": "^2.0.0",
|
||||
"nodemon": "^1.9.2",
|
||||
"nyc": "^7.0.0",
|
||||
"postcss-cli": "^2.5.2",
|
||||
"promise-polyfill": "^5.1.0",
|
||||
"promise-polyfill": "^6.0.0",
|
||||
"redrun": "^5.0.1",
|
||||
"rimraf": "^2.5.3",
|
||||
"sinon": "^1.17.4",
|
||||
"stylelint": "^7.0.2",
|
||||
"stylelint-config-standard": "^11.0.0",
|
||||
"systemjs": "^0.19.31",
|
||||
"watch": "^0.19.1"
|
||||
"tape": "^4.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue