This repository has been archived by the owner on Jul 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from j6s/development
Extract Library
- Loading branch information
Showing
43 changed files
with
382 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "J2M", | ||
"homepage": "https://github.com/FokkeZB/J2M", | ||
"authors": [ | ||
"Fokke Zandbergen <[email protected]>" | ||
], | ||
"description": "Convert from JIRA text formatting to GitHub Flavored MarkDown and back again", | ||
"main": "src/J2M.js", | ||
"moduleType": [ | ||
"globals", | ||
"node" | ||
], | ||
"keywords": [ | ||
"jira", | ||
"atlassian", | ||
"markdown", | ||
"convert" | ||
], | ||
"license": "Apache-2.0", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"site" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "j2m", | ||
"version": "1.0.0", | ||
"description": "Convert from JIRA text formatting to GitHub Flavored MarkDown and back again", | ||
"main": "src/J2M.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"bin": { | ||
"j2m": "src/bin/j2m.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/FokkeZB/J2M.git" | ||
}, | ||
"keywords": [ | ||
"jira", | ||
"atlassian", | ||
"markdown", | ||
"convert" | ||
], | ||
"author": "Fokke Zandbergen <[email protected]>", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/FokkeZB/J2M/issues" | ||
}, | ||
"homepage": "https://github.com/FokkeZB/J2M#readme", | ||
"dependencies": { | ||
"colors": "^1.1.2", | ||
"minimist": "^1.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../src/J2M.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Sets up handlers for inputs | ||
* | ||
* TODO make more readable | ||
*/ | ||
(function () { | ||
var jiraInput = ace.edit("j"); | ||
var markdownInput = ace.edit("m"); | ||
|
||
// setup inputs | ||
jiraInput.setTheme('ace/theme/twilight'); | ||
markdownInput.setTheme('ace/theme/twilight'); | ||
markdownInput.getSession().setMode('ace/mode/markdown'); | ||
|
||
var jiraCallback = function () { | ||
var markdown = J2M.toM(jiraInput.getValue()); | ||
markdownInput.setValue(markdown); | ||
}; | ||
|
||
var markdownCallback = function () { | ||
var jira = J2M.toJ(markdownInput.getValue()); | ||
jiraInput.setValue(jira); | ||
}; | ||
|
||
jiraInput.on('focus', function () { | ||
jiraInput.on('change', jiraCallback); | ||
}); | ||
jiraInput.on('blur', function () { | ||
jiraInput.off('change', jiraCallback); | ||
}); | ||
|
||
markdownInput.on('focus', function () { | ||
markdownInput.on('change', markdownCallback); | ||
}); | ||
markdownInput.on('blur', function () { | ||
markdownInput.off('change', markdownCallback); | ||
}); | ||
})(); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.