mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(bower) smalltalk v2.1.4
This commit is contained in:
parent
f53bef95bf
commit
73a5d22041
11 changed files with 59 additions and 19 deletions
|
|
@ -12,6 +12,8 @@ modules/fancybox/lib/
|
|||
modules/fancybox/demo
|
||||
modules/fancybox/sprite.psd
|
||||
|
||||
modules/execon
|
||||
|
||||
client
|
||||
legacy
|
||||
server_
|
||||
|
|
|
|||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -12,6 +12,8 @@ modules/fancybox/lib/
|
|||
modules/fancybox/demo
|
||||
modules/fancybox/sprite.psd
|
||||
|
||||
modules/execon
|
||||
|
||||
legacy
|
||||
server_
|
||||
|
||||
|
|
|
|||
12
.npmignore
12
.npmignore
|
|
@ -6,6 +6,18 @@ shell
|
|||
test
|
||||
coverage
|
||||
|
||||
modules/jquery/dist
|
||||
modules/jquery/external
|
||||
modules/jquery/src
|
||||
|
||||
!modules/jquery/dist/jquery.min.js
|
||||
|
||||
modules/fancybox/lib/
|
||||
modules/fancybox/demo
|
||||
modules/fancybox/sprite.psd
|
||||
|
||||
modules/execon
|
||||
|
||||
app.json
|
||||
circle.yml
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
"menu": "~1.0.2",
|
||||
"olark": "^1.0.0",
|
||||
"philip": "^1.3.3",
|
||||
"smalltalk": "2.1.3",
|
||||
"jquery": "3.1.1"
|
||||
"jquery": "3.1.1",
|
||||
"smalltalk": "2.1.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,14 +24,15 @@
|
|||
"test"
|
||||
],
|
||||
"dependencies": {},
|
||||
"version": "2.1.3",
|
||||
"_release": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"_release": "2.1.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v2.1.3",
|
||||
"commit": "9914a8d9d581af0594e140c2d1af92892a626c94"
|
||||
"tag": "v2.1.4",
|
||||
"commit": "e543b688db2bb971195812138c3cd7b4dde2109d"
|
||||
},
|
||||
"_source": "https://github.com/coderaiser/smalltalk.git",
|
||||
"_target": "2.1.3",
|
||||
"_originalSource": "smalltalk"
|
||||
"_target": "^2.1.4",
|
||||
"_originalSource": "smalltalk",
|
||||
"_direct": true
|
||||
}
|
||||
|
|
@ -1,3 +1,18 @@
|
|||
2017.02.23, v2.1.4
|
||||
|
||||
fix:
|
||||
- (smalltalk) double quotes (#2)
|
||||
|
||||
feature:
|
||||
- (package) stylelint-config-standard v16.0.0
|
||||
- (package) browserify v14.0.0
|
||||
- (package) systemjs v0.20.2
|
||||
- (package) nyc v10.0.0
|
||||
- (package) stylelint-config-standard v15.0.0
|
||||
- (package) nyc v9.0.1
|
||||
- (package) stylelint-config-standard v14.0.0
|
||||
|
||||
|
||||
2016.10.04, v2.1.3
|
||||
|
||||
feature:
|
||||
|
|
|
|||
|
|
@ -61,6 +61,14 @@ smalltalk.prompt('Question', 'How old are you?', '10').then(function(value) {
|
|||
});
|
||||
```
|
||||
|
||||
## Bundlers
|
||||
|
||||
When `webpack` `rollup` or `browserify` used, you can import `es5` version with:
|
||||
|
||||
```js
|
||||
import smalltalk from 'smalltalk/legacy';
|
||||
```
|
||||
|
||||
#License
|
||||
MIT
|
||||
|
||||
|
|
|
|||
2
modules/smalltalk/dist/smalltalk.min.js
vendored
2
modules/smalltalk/dist/smalltalk.min.js
vendored
|
|
@ -1 +1 @@
|
|||
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.smalltalk=n()}}(function(){return function n(e,t,r){function o(u,i){if(!t[u]){if(!e[u]){var c="function"==typeof require&&require;if(!i&&c)return c(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var l=t[u]={exports:{}};e[u][0].call(l.exports,function(n){var t=e[u][1][n];return o(t?t:n)},l,l.exports,n,e,t,r)}return t[u].exports}for(var a="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({smalltalk:[function(n,e,t){"use strict";function r(n,e,t,r){if(!Array.isArray(r))throw Error("buttons should be array!");return'<div class="page">\n <div data-name="js-close" class="close-button"></div>\n <header>'+n+'</header>\n <div class="content-area">\n '+e+"\n "+t+'\n </div>\n <div class="action-area">\n <div class="button-strip"> '+r.map(function(n,e){return"<button tabindex="+e+' data-name="js-'+n.toLowerCase()+'">'+n+"</button>"}).join("")+"\n </div>\n </div>\n </div>"}function o(n,e,t,o,u){var i=void 0,c=void 0,s=document.createElement("div"),p=["cancel","close","ok"],v=new Promise(function(n,e){var t=u&&!u.cancel,r=function(){};i=n,c=t?r:e}),m=r(n,e,t,o);return s.innerHTML=m,s.className="smalltalk",document.body.appendChild(s),l(s,["ok","input"]).forEach(function(n){return n.focus()}),l(s,["input"]).forEach(function(n){n.setSelectionRange(0,t.length)}),d("click",s,p,function(n){return f(n.target,s,i,c)}),["click","contextmenu"].forEach(function(n){return s.addEventListener(n,function(){return l(s,["ok","input"]).forEach(function(n){return n.focus()})})}),s.addEventListener("keydown",a(s,i,c)),v}function a(n,e,t){return function(r){var o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},a=r.keyCode,d=r.target,s=["ok","cancel","input"],p=l(n,s).map(function(n){return u(n)}),m=void 0;switch(a){case o.ENTER:f(d,n,e,t),r.preventDefault();break;case o.ESC:v(),t();break;case o.TAB:r.shiftKey&&c(n,p),c(n,p),r.preventDefault();break;default:m=["left","right","up","down"].some(function(n){return a===o[n.toUpperCase()]}),m&&i(n,p)}r.stopPropagation()}}function u(n){return n.getAttribute("data-name").replace("js-","")}function i(n,e){var t="",r=document.activeElement,o=u(r),a=/ok|cancel/.test(o),i=e.length-1;"input"!==o&&i&&a&&(t="cancel"===o?"ok":"cancel",l(n,[t]).forEach(function(n){n.focus()}))}function c(n,e){var t=document.activeElement,r=u(t),o=e.length-1,a=e.indexOf(r);a===o?a=0:a<o&&++a;var i=e[a];l(n,[i]).forEach(function(n){return n.focus()})}function f(n,e,t,r){var o=void 0,a=n.getAttribute("data-name").replace("js-","");/close|cancel/.test(a)?r():(o=l(e,["input"]).reduce(function(n,e){return e.value},null),t(o)),v()}function l(n,e){var t=e.map(function(e){return n.querySelector('[data-name="js-'+e+'"]')}).filter(function(n){return n});return t}function d(n,e,t,r){l(e,t).forEach(function(e){return e.addEventListener(n,r)})}function s(n){var e=document.querySelector(n);e.parentElement.removeChild(e)}function p(n){for(var e=arguments.length,t=Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return function(){return n.apply(void 0,t)}}var v=p(s,".smalltalk"),m=["OK"],E=["OK","Cancel"];t.alert=function(n,e){return o(n,e,"",m,{cancel:!1})},t.prompt=function(n,e,t,r){var a=t||"",u='<input type="text" value="'+a+'" data-name="js-input">';return o(n,e,u,E,r)},t.confirm=function(n,e,t){return o(n,e,"",E,t)}},{}]},{},["smalltalk"])("smalltalk")});
|
||||
!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.smalltalk=n()}}(function(){return function n(e,t,r){function o(u,i){if(!t[u]){if(!e[u]){var c="function"==typeof require&&require;if(!i&&c)return c(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var l=t[u]={exports:{}};e[u][0].call(l.exports,function(n){var t=e[u][1][n];return o(t?t:n)},l,l.exports,n,e,t,r)}return t[u].exports}for(var a="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({smalltalk:[function(n,e,t){"use strict";function r(n,e,t,r){if(!Array.isArray(r))throw Error("buttons should be array!");return'<div class="page">\n <div data-name="js-close" class="close-button"></div>\n <header>'+n+'</header>\n <div class="content-area">\n '+e+"\n "+t+'\n </div>\n <div class="action-area">\n <div class="button-strip"> '+r.map(function(n,e){return"<button tabindex="+e+' data-name="js-'+n.toLowerCase()+'">'+n+"</button>"}).join("")+"\n </div>\n </div>\n </div>"}function o(n,e,t,o,u){var i=void 0,c=void 0,s=document.createElement("div"),p=["cancel","close","ok"],v=new Promise(function(n,e){var t=u&&!u.cancel,r=function(){};i=n,c=t?r:e}),m=r(n,e,t,o);return s.innerHTML=m,s.className="smalltalk",document.body.appendChild(s),l(s,["ok","input"]).forEach(function(n){return n.focus()}),l(s,["input"]).forEach(function(n){n.setSelectionRange(0,t.length)}),d("click",s,p,function(n){return f(n.target,s,i,c)}),["click","contextmenu"].forEach(function(n){return s.addEventListener(n,function(){return l(s,["ok","input"]).forEach(function(n){return n.focus()})})}),s.addEventListener("keydown",a(s,i,c)),v}function a(n,e,t){return function(r){var o={ENTER:13,ESC:27,TAB:9,LEFT:37,UP:38,RIGHT:39,DOWN:40},a=r.keyCode,d=r.target,s=["ok","cancel","input"],p=l(n,s).map(function(n){return u(n)}),m=void 0;switch(a){case o.ENTER:f(d,n,e,t),r.preventDefault();break;case o.ESC:v(),t();break;case o.TAB:r.shiftKey&&c(n,p),c(n,p),r.preventDefault();break;default:m=["left","right","up","down"].some(function(n){return a===o[n.toUpperCase()]}),m&&i(n,p)}r.stopPropagation()}}function u(n){return n.getAttribute("data-name").replace("js-","")}function i(n,e){var t="",r=document.activeElement,o=u(r),a=/ok|cancel/.test(o),i=e.length-1;"input"!==o&&i&&a&&(t="cancel"===o?"ok":"cancel",l(n,[t]).forEach(function(n){n.focus()}))}function c(n,e){var t=document.activeElement,r=u(t),o=e.length-1,a=e.indexOf(r);a===o?a=0:a<o&&++a;var i=e[a];l(n,[i]).forEach(function(n){return n.focus()})}function f(n,e,t,r){var o=void 0,a=n.getAttribute("data-name").replace("js-","");/close|cancel/.test(a)?r():(o=l(e,["input"]).reduce(function(n,e){return e.value},null),t(o)),v()}function l(n,e){var t=e.map(function(e){return n.querySelector('[data-name="js-'+e+'"]')}).filter(function(n){return n});return t}function d(n,e,t,r){l(e,t).forEach(function(e){return e.addEventListener(n,r)})}function s(n){var e=document.querySelector(n);e.parentElement.removeChild(e)}function p(n){for(var e=arguments.length,t=Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return function(){return n.apply(void 0,t)}}var v=p(s,".smalltalk"),m=["OK"],h=["OK","Cancel"];t.alert=function(n,e){return o(n,e,"",m,{cancel:!1})},t.prompt=function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],a=t.replace(/\"/g,"""),u='<input type="text" value="'+a+'" data-name="js-input">';return o(n,e,u,h,r)},t.confirm=function(n,e,t){return o(n,e,"",h,t)}},{}]},{},["smalltalk"])("smalltalk")});
|
||||
|
|
|
|||
2
modules/smalltalk/dist/smalltalk.poly.min.js
vendored
2
modules/smalltalk/dist/smalltalk.poly.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -9,9 +9,9 @@ exports.alert = (title, msg) => {
|
|||
return showDialog(title, msg, '', BUTTON_OK, {cancel: false});
|
||||
};
|
||||
|
||||
exports.prompt = (title, msg, value, options) => {
|
||||
const val = value || '';
|
||||
const valueStr = `<input type="text" value="${ val }" data-name="js-input">`;
|
||||
exports.prompt = (title, msg, value = '', options) => {
|
||||
const val = value.replace(/\"/g, '"');
|
||||
const valueStr = `<input type="text" value="${ val }" data-name="js-input">`;
|
||||
|
||||
return showDialog(title, msg, valueStr, BUTTON_OK_CANCEL, options);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "smalltalk",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"description": "Promise-based Alert, Confirm and Prompt replacement",
|
||||
"homepage": "http://github.com/coderaiser/smalltalk",
|
||||
"repository": {
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
"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",
|
||||
"compile:css": "postcss css/*.css -d dist --use autoprefixer",
|
||||
"minify:css": "minify dist/smalltalk.css > dist/smalltalk.min.css",
|
||||
"minify:js": "minify dist/smalltalk.js > dist/smalltalk.min.js",
|
||||
"minify:js-native": "minify dist/smalltalk.native.js > dist/smalltalk.native.min.js",
|
||||
|
|
@ -64,22 +64,22 @@
|
|||
"autoprefixer": "^6.3.7",
|
||||
"babel-cli": "^6.1.1",
|
||||
"babel-preset-es2015": "^6.0.15",
|
||||
"browserify": "^13.0.1",
|
||||
"browserify": "^14.0.0",
|
||||
"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": "^8.1.0",
|
||||
"nyc": "^10.0.0",
|
||||
"postcss-cli": "^2.5.2",
|
||||
"promise-polyfill": "^6.0.0",
|
||||
"redrun": "^5.0.1",
|
||||
"rimraf": "^2.5.3",
|
||||
"sinon": "^1.17.4",
|
||||
"stylelint": "^7.0.2",
|
||||
"stylelint-config-standard": "^13.0.0",
|
||||
"systemjs": "^0.19.31",
|
||||
"stylelint-config-standard": "^16.0.0",
|
||||
"systemjs": "^0.20.2",
|
||||
"tape": "^4.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue