mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 07:36:12 +08:00
rm(composer): Dead code related to Scribe / Bower
This commit is contained in:
parent
96bbbb6904
commit
0ff48ca9a6
6 changed files with 0 additions and 184 deletions
|
@ -1,3 +0,0 @@
|
|||
## 0.1.0 - First Release
|
||||
* Every feature added
|
||||
* Every bug fixed
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
"name": "composer",
|
||||
"version": "0.0.0",
|
||||
"authors": [
|
||||
"Nylas"
|
||||
],
|
||||
"moduleType": [
|
||||
"amd"
|
||||
],
|
||||
"license": "Proprietary",
|
||||
"private": true,
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"scribe": "1.0.0",
|
||||
"almond": "~0.3",
|
||||
"html-janitor": "~0.3",
|
||||
"scribe-plugin-toolbar": "~0.1",
|
||||
"scribe-plugin-sanitizer": "0.1",
|
||||
"scribe-plugin-smart-lists": "~0.1",
|
||||
"scribe-plugin-curly-quotes": "~0.1",
|
||||
"scribe-plugin-blockquote-command": "~0.1",
|
||||
"scribe-plugin-link-prompt-command": "~0.1",
|
||||
"scribe-plugin-inline-styles-to-elements": "~0.1",
|
||||
"scribe-plugin-intelligent-unlink-command": "~0.1",
|
||||
"scribe-plugin-formatter-html-ensure-semantic-elements": "~1.0",
|
||||
"scribe-plugin-formatter-plain-text-convert-new-lines-to-html": "~0.1"
|
||||
}
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
baseUrl: "./bower_components",
|
||||
paths: {
|
||||
"scribe": "scribe/scribe",
|
||||
"html-janitor": "html-janitor/html-janitor",
|
||||
"scribe-plugin-toolbar": "scribe-plugin-toolbar/scribe-plugin-toolbar",
|
||||
"scribe-plugin-sanitizer": "scribe-plugin-sanitizer/scribe-plugin-sanitizer",
|
||||
"scribe-plugin-smart-lists": "scribe-plugin-smart-lists/scribe-plugin-smart-lists",
|
||||
"scribe-plugin-curly-quotes": "scribe-plugin-curly-quotes/scribe-plugin-curly-quotes",
|
||||
"scribe-plugin-blockquote-command": "scribe-plugin-blockquote-command/scribe-plugin-blockquote-command",
|
||||
"scribe-plugin-link-prompt-command": "scribe-plugin-link-prompt-command/scribe-plugin-link-prompt-command",
|
||||
"scribe-plugin-inline-styles-to-elements": "scribe-plugin-inline-styles-to-elements/scribe-plugin-inline-styles-to-elements",
|
||||
"scribe-plugin-intelligent-unlink-command": "scribe-plugin-intelligent-unlink-command/scribe-plugin-intelligent-unlink-command",
|
||||
"scribe-plugin-formatter-html-ensure-semantic-elements": "scribe-plugin-formatter-html-ensure-semantic-elements/scribe-plugin-formatter-html-ensure-semantic-elements",
|
||||
"scribe-plugin-formatter-plain-text-convert-new-lines-to-html": "scribe-plugin-formatter-plain-text-convert-new-lines-to-html/scribe-plugin-formatter-plain-text-convert-new-lines-to-html"
|
||||
},
|
||||
name: "almond/almond",
|
||||
out: "lib/scribe.js",
|
||||
include: [
|
||||
"scribe",
|
||||
"html-janitor",
|
||||
"scribe-plugin-toolbar",
|
||||
"scribe-plugin-sanitizer",
|
||||
"scribe-plugin-smart-lists",
|
||||
"scribe-plugin-curly-quotes",
|
||||
"scribe-plugin-blockquote-command",
|
||||
"scribe-plugin-link-prompt-command",
|
||||
"scribe-plugin-inline-styles-to-elements",
|
||||
"scribe-plugin-intelligent-unlink-command",
|
||||
"scribe-plugin-formatter-html-ensure-semantic-elements",
|
||||
"scribe-plugin-formatter-plain-text-convert-new-lines-to-html"
|
||||
],
|
||||
wrap: {
|
||||
startFile: 'start.frag',
|
||||
endFile: 'end.frag'
|
||||
},
|
||||
namespace: 'wrap',
|
||||
optimize: 'none',
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
return {
|
||||
HtmlJanitor: wrap.require('html-janitor'),
|
||||
Scribe: wrap.require('scribe'),
|
||||
ScribePluginToolbar: wrap.require("scribe-plugin-toolbar"),
|
||||
ScribePluginSanitizer: wrap.require("scribe-plugin-sanitizer"),
|
||||
ScribePluginSmartLists: wrap.require("scribe-plugin-smart-lists"),
|
||||
ScribePluginCurlyQuotes: wrap.require("scribe-plugin-curly-quotes"),
|
||||
ScribePluginBlockquoteCommand: wrap.require("scribe-plugin-blockquote-command"),
|
||||
ScribePluginLinkPromptCommand: wrap.require("scribe-plugin-link-prompt-command"),
|
||||
ScribePluginInlineStylesToElements: wrap.require("scribe-plugin-inline-styles-to-elements"),
|
||||
ScribePluginIntelligentUnlinkCommand: wrap.require("scribe-plugin-intelligent-unlink-command"),
|
||||
ScribePluginFormatterHtmlEnsureSemanticElements: wrap.require("scribe-plugin-formatter-html-ensure-semantic-elements"),
|
||||
ScribePluginFormatterPlainTextConvertNewLinesToHtml: wrap.require("scribe-plugin-formatter-plain-text-convert-new-lines-to-html")
|
||||
};
|
||||
})();
|
|
@ -1,92 +0,0 @@
|
|||
module.exports = function () {
|
||||
return function (scribe) {
|
||||
/**
|
||||
* If the paragraphs option is set to true, we unapply the blockquote on
|
||||
* <enter> keypresses if the caret is on a new line.
|
||||
*/
|
||||
|
||||
scribe.el.addEventListener('mouseup', function (event) {
|
||||
var codeNodes = scribe.el.getElementsByTagName('code');
|
||||
scribe.transactionManager.run(function () {
|
||||
|
||||
var selection = new scribe.api.Selection();
|
||||
var range = selection.range;
|
||||
|
||||
for (var i = 0; i < codeNodes.length; i++) {
|
||||
var codeNode = codeNodes[i];
|
||||
|
||||
if ((selection.selection.focusNode.parentNode == codeNode) &&
|
||||
(codeNode.classList.contains("empty"))) {
|
||||
range.selectNode(codeNode);
|
||||
selection.selection.removeAllRanges();
|
||||
selection.selection.addRange(range);
|
||||
event.preventDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
scribe.el.addEventListener('input', function (event) {
|
||||
var codeNodes = scribe.el.getElementsByTagName('code');
|
||||
|
||||
scribe.transactionManager.run(function () {
|
||||
var selection = new scribe.api.Selection();
|
||||
for (var i = 0; i < codeNodes.length; i++) {
|
||||
if (selection.selection.focusNode.parentNode == codeNodes[i]) {
|
||||
codeNodes[i].classList.remove("empty");
|
||||
break;
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
scribe.el.addEventListener('keydown', function (event) {
|
||||
if (event.keyCode === 9) { // tab
|
||||
var codeNodes = scribe.el.getElementsByTagName('code');
|
||||
|
||||
scribe.transactionManager.run(function () {
|
||||
var selection = new scribe.api.Selection();
|
||||
var range = selection.range;
|
||||
|
||||
var jumpOptionNodes = [];
|
||||
for (var i = 0; i < codeNodes.length; i++) {
|
||||
if ((selection.selection.focusNode.parentNode === codeNodes[i]) ||
|
||||
(!codeNodes[i].classList.contains("empty"))) {
|
||||
continue;
|
||||
}
|
||||
jumpOptionNodes.push(codeNodes[i]);
|
||||
}
|
||||
|
||||
var found = function(codeNode) {
|
||||
range.selectNode(codeNode);
|
||||
selection.selection.removeAllRanges();
|
||||
selection.selection.addRange(range);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
|
||||
if (!event.shiftKey) {
|
||||
for (var i = 0; i < jumpOptionNodes.length; i++) {
|
||||
if (range.comparePoint(jumpOptionNodes[i],1) === 1) {
|
||||
found(jumpOptionNodes[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
for (var i = jumpOptionNodes.length-1; i >= 0; i--) {
|
||||
var codeNode = jumpOptionNodes[i];
|
||||
if (range.comparePoint(jumpOptionNodes[i],1) === -1) {
|
||||
found(jumpOptionNodes[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
|
@ -1 +0,0 @@
|
|||
module.exports = (function () {
|
Loading…
Reference in a new issue