diff --git a/.editorconfig b/.editorconfig index 41a542a..4192a08 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,10 +1,12 @@ -# EditorConfig is awesome: +# This file is for unifying the coding style for different editors and IDEs +# editorconfig.org root = true [*] -charset = utf-8 -indent_style = tab end_of_line = lf -insert_final_newline = true +charset = utf-8 trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 4 diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..b509c88 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +coverage/ +node_modules/ diff --git a/.eslintrc.yaml b/.eslintrc.yaml new file mode 100644 index 0000000..ea5e41e --- /dev/null +++ b/.eslintrc.yaml @@ -0,0 +1,234 @@ +parserOptions: + ecmaVersion: 6 +env: + es6: true + jasmine: true + node: true +extends: + - eslint:recommended +rules: + accessor-pairs: error + array-bracket-spacing: + - error + - never + array-callback-return: error + arrow-body-style: + - error + - always + arrow-parens: error + arrow-spacing: error + block-spacing: + - error + - never + brace-style: error + comma-dangle: error + comma-spacing: error + comma-style: error + complexity: + - error + - 10 + computed-property-spacing: error + consistent-return: error + consistent-this: error + constructor-super: error + curly: error + default-case: error + dot-notation: error + eol-last: error + eqeqeq: error + generator-star-spacing: error + global-require: off + guard-for-in: error + indent: error + init-declarations: + - error + - never + jsx-quotes: error + key-spacing: error + keyword-spacing: error + linebreak-style: error + lines-around-comment: + - error + - + allowBlockStart: true + allowObjectStart: true + allowArrayStart: true + max-statements-per-line: error + new-cap: error + new-parens: error + newline-after-var: error + newline-before-return: error + no-alert: error + no-array-constructor: error + no-bitwise: error + no-caller: error + no-case-declarations: error + no-catch-shadow: error + no-class-assign: error + no-cond-assign: error + no-confusing-arrow: error + no-console: off + no-const-assign: error + no-constant-condition: error + no-continue: error + no-delete-var: error + no-dupe-args: error + no-dupe-class-members: error + no-dupe-keys: error + no-duplicate-case: error + no-duplicate-imports: error + no-else-return: error + no-empty: error + no-empty-character-class: error + no-empty-pattern: error + no-eq-null: error + no-eval: error + no-extend-native: error + no-extra-bind: error + no-extra-boolean-cast: error + no-extra-label: error + no-extra-parens: error + no-extra-semi: error + no-fallthrough: error + no-func-assign: error + no-implied-eval: error + no-inline-comments: error + no-inner-declarations: error + no-invalid-this: error + no-invalid-regexp: error + no-irregular-whitespace: error + no-iterator: error + no-label-var: error + no-labels: error + no-lone-blocks: error + no-lonely-if: error + no-loop-func: error + no-mixed-spaces-and-tabs: error + no-multi-spaces: error + no-multi-str: error + no-multiple-empty-lines: + - error + - + max: 2 + no-native-reassign: error + no-negated-condition: error + no-nested-ternary: error + no-new: error + no-new-func: error + no-new-object: error + no-new-symbol: error + no-new-wrappers: error + no-obj-calls: error + no-octal: error + no-octal-escape: error + no-path-concat: error + no-plusplus: error + no-process-exit: error + no-proto: error + no-redeclare: error + no-regex-spaces: error + no-restricted-globals: error + no-return-assign: error + no-script-url: error + no-self-assign: error + no-self-compare: error + no-sequences: error + no-shadow: error + no-shadow-restricted-names: error + no-spaced-func: error + no-sparse-arrays: error + no-sync: error + no-ternary: error + no-this-before-super: error + no-throw-literal: error + no-trailing-spaces: error + no-undef: error + no-undef-init: error + no-undefined: error + no-underscore-dangle: error + no-unexpected-multiline: error + no-unmodified-loop-condition: error + no-unneeded-ternary: error + no-unreachable: error + no-unsafe-finally: error + no-unused-expressions: error + no-unused-labels: error + no-unused-vars: error + no-use-before-define: error + no-useless-call: error + no-useless-computed-key: error + no-useless-concat: error + no-useless-constructor: error + no-useless-escape: error + no-void: error + no-warning-comments: warn + no-whitespace-before-property: error + no-with: error + object-curly-spacing: error + object-property-newline: error + object-shorthand: error + one-var: error + operator-assignment: error + operator-linebreak: + - error + - none + padded-blocks: + - error + - never + prefer-arrow-callback: + - error + - + allowNamedFunctions: true + prefer-const: error + prefer-template: error + quote-props: + - error + - as-needed + quotes: error + radix: error + require-jsdoc: + - error + - + require: + FunctionDeclaration: true + MethodDefinition: true + ClassDeclaration: true + require-yield: error + semi: error + semi-spacing: error + sort-imports: error + sort-vars: + - error + - + ignoreCase: true + space-before-blocks: error + space-before-function-paren: + - error + - + anonymous: always + named: never + space-in-parens: error + space-infix-ops: + - error + - + int32Hint: false + space-unary-ops: error + spaced-comment: error + strict: error + template-curly-spacing: error + use-isnan: error + valid-jsdoc: + - error + - + prefer: + returns: return + preferType: + object: Object + String: string + requireParamDescription: false + requireReturn: false + requireReturnDescription: false + valid-typeof: error + vars-on-top: error + wrap-iife: error + yield-star-spacing: error diff --git a/.gitignore b/.gitignore index 3c3629e..dc8c609 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,33 @@ -node_modules +# OS-specific +.DS_Store +._* +.Trash* +$* + +# Keys and Certs +*.pem +*.crt +*.csr +*.key + +# Backup files +*.sw[g-p] +*.bak +*~ +*# + +# IDEs +*.as3proj +.buildpath +.c9revisions/ +.cproject +.project +.idea/ +.settings* +.metadata/ +nbproject/ + +# Generated things, may not be applicable to your project +/coverage/ +/node_modules/ +npm-debug.log diff --git a/.istanbul.yml b/.istanbul.yml new file mode 100644 index 0000000..ca0e607 --- /dev/null +++ b/.istanbul.yml @@ -0,0 +1,4 @@ +instrumentation: + excludes: + - spec/**/*.js + include-all-sources: true diff --git a/.travis.yml b/.travis.yml index 6b3c716..6efc45f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,8 @@ language: node_js -branches: - only: - - gh-pages +node_js: + - "4" + - "5" + - "6.0" + - "6" +before_install: + - npm install -g npm@latest diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e6ee4fe --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +CHANGELOG +========= + + +2.0.0 - 2017-03-16 +------------------ + +* Rewrite from original `markdown2confluence` to address known issues, include additional tests, reduce dependencies. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..84c91d3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ +Contributing +============ + +Here's a quick list of tips for contributing to this project: + +1. We follow the Tests Always Included [Style Guide]. +2. You should make sure your editor uses [EditorConfig] so you can follow our whitespace rules easily. This is optional, but a convenient way to configure your editor to match our style. +3. Since this is JavaScript, please lint with [ESLint]. + +Thanks for helping out! + +[EditorConfig]: http://editorconfig.org/ +[ESLint]: http://eslint.org/ +[Style Guide]: https://tests-always-included.github.io/style-guide/ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..0c8a698 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,6 @@ +Copyright 2014-2016 chunpu <527653908@qq.com> +Copyright 2017 Connected World Services + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..316d971 --- /dev/null +++ b/README.md @@ -0,0 +1,140 @@ +Markdown2Confluence +=================== + +Convert [Markdown] to [Confluence Wiki Markup]. This is an updated version of the original [markdown2confluence](https://github.com/chunpu/markdown2confluence) project. + +[![npm version][npm-badge]][npm-link] +[![Build Status][travis-badge]][travis-link] +[![Dependencies][dependencies-badge]][dependencies-link] +[![Dev Dependencies][devdependencies-badge]][devdependencies-link] +[![codecov.io][codecov-badge]][codecov-link] + + +Overview +-------- + +Using [Markdown] is fast becoming a standard for open-source projects and their documentation. There are a few variants, such as [GitHub Flavored Markdown], which add additional features. + +Atlassian's Confluence has a different way of writing documentation, according to their [Confluence Wiki Markup] and [later pages](https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup) and [references](https://roundcorner.atlassian.net/secure/WikiRendererHelpAction.jspa?section=all). + +This project contains a library and a command-line tool that bridges the gap and converts from Markdown to Confluence. + + +Command-Line Use +---------------- + +Install the tool. + + npm install -g @connected-world-services/markdown2confluence + +Use it to convert a markdown file. + + markdown2confluence README.md + +Or pipe in a file. + + cat README.md | markdown2confluence + + +Library Use +----------- + +Use `npm` to install this package easily. + + $ npm install --save @connected-world-services/markdown2confluence + +Alternately you may edit your `package.json` and add this to your `dependencies` object: + + { + ... + "dependencies": { + ... + "@connected-world-services/markdown2confluence": "*" + ... + } + ... + } + +Now you write some JavaScript to load Markdown content and convert. + + markdown2confluence = require("markdown2confluence"); + markdown = fs.readFileSync("README.md"); + confluence = markdown2confluence(markdown); + console.log(confluence); // Converted! + +This uses the wonderful [marked](https://www.npmjs.com/package/marked) library to parse and reformat the Markdown text. Because of this, you are welcome to pass additional options to the conversion function. See the marked package for options. Besides configuring marked, you can also change additional behavior. + + // Showing how to set two of the options for the marked library. + confluence = markdown2confluence(markdown, { + // When code has more than this many lines, set the collapse property + // so Confluence shows a shorter block of code. + codeCollapseAt: 20, + + // Map between Markdown and Confluence languages. There's a healthy + // number of these defined. Setting this property overrides the + // default mapping. If you want to augment the map, you could + // add them to markdown2confluence.defaultLanguageMap. + codeLanguageMap: { + markdownLanguage: "confluenceLanguage" + }, + + // Additional code styling options. + codeStyling: { + linenumbers: true, + theme: "RDark" + }, + + // Rewrite image urls using your own custom logic. + imageRewrite: (href) => { + return href; + }, + + // Rewrite link urls using your own custom logic. + linkRewrite: (href) => { + return href; + }, + + // These options are passed to marked. A .renderer property is + // always added in order to change Markdown to Confluence Wiki Markup. + marked: { + gfm: true, + tables: true + } + }); + + +Supported Markdown +------------------ + +The aim of this library is to convert as much Markdown to Confluence Wiki Markup. As such, most Markdown is supported but there are going to be rare cases that are not supported (such as code blocks within lists) or other scenarios that people find. + +If it is possible to convert the Markdown to Confluence Wiki Markup (without resorting to HTML), then this library should be able to do it. If you find anything wrong, it is likely a bug and should be reported. I would need a sample of Markdown, the incorrect translation and the correct way to represent that in Confluence. Please file an issue with this information in order to help replicate and fix the issue. + +A good demonstration chunk of markdown is available in [demo.md](demo.md). + +**What does not work?** + +* HTML. It is copied verbatim to the output text. +* Did you find anything else? Please tell us about it by opening an issue. + + +License +------- + +This software is licensed under an [ISC license][LICENSE]. + + +[codecov-badge]: https://img.shields.io/codecov/c/github/connected-world-services/markdown2confluence-cws/master.svg +[codecov-link]: https://codecov.io/github/connected-world-services/markdown2confluence-cws?branch=master +[Confluence Wiki Markup]: https://confluence.atlassian.com/display/CONF42/Confluence+Wiki+Markup +[dependencies-badge]: https://img.shields.io/david/connected-world-services/markdown2confluence-cws.svg +[dependencies-link]: https://david-dm.org/connected-world-services/markdown2confluence-cws +[devdependencies-badge]: https://img.shields.io/david/dev/connected-world-services/markdown2confluence-cws.svg +[devdependencies-link]: https://david-dm.org/connected-world-services/markdown2confluence-cws#info=devDependencies +[GitHub Flavored Markdown]: https://guides.github.com/features/mastering-markdown/ +[LICENSE]: LICENSE.md +[Markdown]: http://daringfireball.net/projects/markdown/syntax +[npm-badge]: https://img.shields.io/npm/v/markdown2confluence-cws.svg +[npm-link]: https://npmjs.org/package/markdown2confluence-cws +[travis-badge]: https://img.shields.io/travis/connected-world-services/markdown2confluence-cws/master.svg +[travis-link]: http://travis-ci.org/connected-world-services/markdown2confluence-cws diff --git a/_readme.md b/_readme.md deleted file mode 100644 index 6d35641..0000000 --- a/_readme.md +++ /dev/null @@ -1,17 +0,0 @@ -Usage ---- - -```sh -markdown2confluence markdown.md -``` - -or - -Try in browser - -Document ---- - -[Confluence Wiki Markup](https://confluence.atlassian.com/display/CONF42/Confluence+Wiki+Markup) - -![demo preview](./preview.png) diff --git a/bin/markdown2confluence.js b/bin/markdown2confluence.js index 2ce82ac..a5512ac 100755 --- a/bin/markdown2confluence.js +++ b/bin/markdown2confluence.js @@ -1,13 +1,27 @@ #!/usr/bin/env node -var md2conflu = require('../') -var fs = require('fs') -var path = require('path') -var assert = require('assert') +/* eslint no-process-exit:off */ +"use strict"; -var filename = process.argv[2] -assert(filename, 'should have filename') +var filename, fs, getStdin, markdown2confluence, path; -fs.readFile(path.resolve(process.cwd(), filename), function(err, buf) { - assert(!err, 'read file ' + filename + ' error!') - console.log(md2conflu(buf + '')) -}) +getStdin = require("get-stdin"); +markdown2confluence = require("../"); +fs = require("fs"); +path = require("path"); +filename = process.argv[2]; + +if (filename && filename !== "-") { + filename = path.resolve(process.cwd(), filename); + fs.readFile(filename, (err, buf) => { + if (err) { + console.error(`Error reading file: ${filename}`); + process.exit(1); + } else { + console.log(markdown2confluence(buf.toString("utf8"))); + } + }); +} else { + getStdin().then((str) => { + console.log(markdown2confluence(str)); + }); +} diff --git a/browser/app.js b/browser/app.js deleted file mode 100644 index daa9891..0000000 --- a/browser/app.js +++ /dev/null @@ -1,14 +0,0 @@ -var convert = require('../') -var demoMarkdown = require('raw-loader!../demo.md') - -$('#convert').click(function() { - var markdown = $('#markdown').val() - $('#markup').val(convert(markdown)) -}) - -$(init) - -function init() { - $('#markdown').val(demoMarkdown) - $('#convert').trigger('click') -} diff --git a/browser/basic.jade b/browser/basic.jade deleted file mode 100644 index e5f051d..0000000 --- a/browser/basic.jade +++ /dev/null @@ -1,42 +0,0 @@ -//- basic layout - -//- use this by extend layout/basic -//- init mixin -include ../mixin/all - -doctype html -html - - head - //- set charset, should before title - meta(charset='utf-8') - - //- `IE=edge` tells IE to use the most recent standard - //- `chrome=1` means site to render in ChromeFrame - meta(http-equiv='X-UA-Compatible' content='IE=edge,chrome=1') - - title= title - - block meta - +meta({ - keywords: keywords - , description: description - , viewport: 'width=device-width' - , renderer: 'webkit' // for double core browsers like 360 use webkit first - }) - - block style - link(rel='stylesheet' href='/style.css') - - block icon - - //- old browser compat - block compat - - body - block header - block main - main(role='main') - block footer - block script - script(src='/app.js') diff --git a/browser/bundle.js b/browser/bundle.js deleted file mode 100644 index 43d1f0b..0000000 --- a/browser/bundle.js +++ /dev/null @@ -1,2851 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - var convert = __webpack_require__(1) - var demoMarkdown = __webpack_require__(15) - - $('#convert').click(function() { - var markdown = $('#markdown').val() - $('#markup').val(convert(markdown)) - }) - - $(init) - - function init() { - $('#markdown').val(demoMarkdown) - $('#convert').trigger('click') - } - - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - var marked = __webpack_require__(2) - var _ = __webpack_require__(3) - var qs = __webpack_require__(14) - var inlineLexer = marked.inlineLexer - - module.exports = exports = markdown2confluence - - // https://roundcorner.atlassian.net/secure/WikiRendererHelpAction.jspa?section=all - // https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup - // http://blogs.atlassian.com/2011/11/why-we-removed-wiki-markup-editor-in-confluence-4/ - - var MAX_CODE_LINE = 20 - - function Renderer() {} - - var rawRenderer = marked.Renderer - - var langArr = 'actionscript3 bash csharp coldfusion cpp css delphi diff erlang groovy java javafx javascript perl php none powershell python ruby scala sql vb html/xml'.split(/\s+/) - var langMap = { - shell: 'bash' - } - for (var i = 0, x; x = langArr[i++];) { - langMap[x] = x - } - - _.extend(Renderer.prototype, rawRenderer.prototype, { - paragraph: function(text) { - return text + '\n\n' - } - , html: function(html) { - return html - } - , heading: function(text, level, raw) { - return 'h' + level + '. ' + text + '\n\n' - } - , strong: function(text) { - return '*' + text + '*' - } - , em: function(text) { - return '_' + text + '_' - } - , del: function(text) { - return '-' + text + '-' - } - , codespan: function(text) { - return '{{' + text + '}}' - } - , blockquote: function(quote) { - return '{quote}' + quote + '{quote}' - } - , br: function() { - return '\n' - } - , hr: function() { - return '----' - } - , link: function(href, title, text) { - var arr = [href] - if (title) { - arr.unshift(title) - } - return '[' + arr.join('|') + ']' - } - , list: function(body, ordered) { - var arr = _.filter(_.trim(body).split('\n'), function(line) { - return line - }) - var type = ordered ? '#' : '*' - return _.map(arr, function(line) { - return type + ' ' + line - }).join('\n') + '\n\n' - - } - , listitem: function(body, ordered) { - return body + '\n' - } - , image: function(href, title, text) { - console.log(77777, href) - return '!' + href + '!' - } - , table: function(header, body) { - return header + body + '\n' - } - , tablerow: function(content, flags) { - return content + '\n' - } - , tablecell: function(content, flags) { - var type = flags.header ? '||' : '|' - return type + content - } - , code: function(code, lang) { - // {code:language=java|borderStyle=solid|theme=RDark|linenumbers=true|collapse=true} - lang = langMap[lang] || '' - var param = { - language: lang, - borderStyle: 'solid', - theme: 'RDark', // dark is good - linenumbers: true, - collapse: false - } - var lineCount = _.split(code, '\n').length - if (lineCount > MAX_CODE_LINE) { - // code is too long - param.collapse = true - } - param = qs.stringify(param, '|', '=') - return '{code:' + param + '}\n' + code + '\n{code}\n\n' - } - }) - - var renderer = new Renderer() - - function markdown2confluence(markdown) { - return marked(markdown, {renderer: renderer}) - } - - -/***/ }, -/* 2 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(global) {/** - * marked - a markdown parser - * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) - * https://github.com/chjj/marked - */ - - ;(function() { - - /** - * Block-Level Grammar - */ - - var block = { - newline: /^\n+/, - code: /^( {4}[^\n]+\n*)+/, - fences: noop, - hr: /^( *[-*_]){3,} *(?:\n+|$)/, - heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, - nptable: noop, - lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, - blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, - list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, - def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, - table: noop, - paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, - text: /^[^\n]+/ - }; - - block.bullet = /(?:[*+-]|\d+\.)/; - block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; - block.item = replace(block.item, 'gm') - (/bull/g, block.bullet) - (); - - block.list = replace(block.list) - (/bull/g, block.bullet) - ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') - ('def', '\\n+(?=' + block.def.source + ')') - (); - - block.blockquote = replace(block.blockquote) - ('def', block.def) - (); - - block._tag = '(?!(?:' - + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' - + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' - + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; - - block.html = replace(block.html) - ('comment', //) - ('closed', /<(tag)[\s\S]+?<\/\1>/) - ('closing', /])*?>/) - (/tag/g, block._tag) - (); - - block.paragraph = replace(block.paragraph) - ('hr', block.hr) - ('heading', block.heading) - ('lheading', block.lheading) - ('blockquote', block.blockquote) - ('tag', '<' + block._tag) - ('def', block.def) - (); - - /** - * Normal Block Grammar - */ - - block.normal = merge({}, block); - - /** - * GFM Block Grammar - */ - - block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, - paragraph: /^/, - heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ - }); - - block.gfm.paragraph = replace(block.paragraph) - ('(?!', '(?!' - + block.gfm.fences.source.replace('\\1', '\\2') + '|' - + block.list.source.replace('\\1', '\\3') + '|') - (); - - /** - * GFM + Tables Block Grammar - */ - - block.tables = merge({}, block.gfm, { - nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, - table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ - }); - - /** - * Block Lexer - */ - - function Lexer(options) { - this.tokens = []; - this.tokens.links = {}; - this.options = options || marked.defaults; - this.rules = block.normal; - - if (this.options.gfm) { - if (this.options.tables) { - this.rules = block.tables; - } else { - this.rules = block.gfm; - } - } - } - - /** - * Expose Block Rules - */ - - Lexer.rules = block; - - /** - * Static Lex Method - */ - - Lexer.lex = function(src, options) { - var lexer = new Lexer(options); - return lexer.lex(src); - }; - - /** - * Preprocessing - */ - - Lexer.prototype.lex = function(src) { - src = src - .replace(/\r\n|\r/g, '\n') - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\u2424/g, '\n'); - - return this.token(src, true); - }; - - /** - * Lexing - */ - - Lexer.prototype.token = function(src, top, bq) { - var src = src.replace(/^ +$/gm, '') - , next - , loose - , cap - , bull - , b - , item - , space - , i - , l; - - while (src) { - // newline - if (cap = this.rules.newline.exec(src)) { - src = src.substring(cap[0].length); - if (cap[0].length > 1) { - this.tokens.push({ - type: 'space' - }); - } - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - cap = cap[0].replace(/^ {4}/gm, ''); - this.tokens.push({ - type: 'code', - text: !this.options.pedantic - ? cap.replace(/\n+$/, '') - : cap - }); - continue; - } - - // fences (gfm) - if (cap = this.rules.fences.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'code', - lang: cap[2], - text: cap[3] || '' - }); - continue; - } - - // heading - if (cap = this.rules.heading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[1].length, - text: cap[2] - }); - continue; - } - - // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i].split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // lheading - if (cap = this.rules.lheading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[2] === '=' ? 1 : 2, - text: cap[1] - }); - continue; - } - - // hr - if (cap = this.rules.hr.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'hr' - }); - continue; - } - - // blockquote - if (cap = this.rules.blockquote.exec(src)) { - src = src.substring(cap[0].length); - - this.tokens.push({ - type: 'blockquote_start' - }); - - cap = cap[0].replace(/^ *> ?/gm, ''); - - // Pass `top` to keep the current - // "toplevel" state. This is exactly - // how markdown.pl works. - this.token(cap, top, true); - - this.tokens.push({ - type: 'blockquote_end' - }); - - continue; - } - - // list - if (cap = this.rules.list.exec(src)) { - src = src.substring(cap[0].length); - bull = cap[2]; - - this.tokens.push({ - type: 'list_start', - ordered: bull.length > 1 - }); - - // Get each top-level item. - cap = cap[0].match(this.rules.item); - - next = false; - l = cap.length; - i = 0; - - for (; i < l; i++) { - item = cap[i]; - - // Remove the list item's bullet - // so it is seen as the next token. - space = item.length; - item = item.replace(/^ *([*+-]|\d+\.) +/, ''); - - // Outdent whatever the - // list item contains. Hacky. - if (~item.indexOf('\n ')) { - space -= item.length; - item = !this.options.pedantic - ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') - : item.replace(/^ {1,4}/gm, ''); - } - - // Determine whether the next list item belongs here. - // Backpedal if it does not belong in this list. - if (this.options.smartLists && i !== l - 1) { - b = block.bullet.exec(cap[i + 1])[0]; - if (bull !== b && !(bull.length > 1 && b.length > 1)) { - src = cap.slice(i + 1).join('\n') + src; - i = l - 1; - } - } - - // Determine whether item is loose or not. - // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ - // for discount behavior. - loose = next || /\n\n(?!\s*$)/.test(item); - if (i !== l - 1) { - next = item.charAt(item.length - 1) === '\n'; - if (!loose) loose = next; - } - - this.tokens.push({ - type: loose - ? 'loose_item_start' - : 'list_item_start' - }); - - // Recurse. - this.token(item, false, bq); - - this.tokens.push({ - type: 'list_item_end' - }); - } - - this.tokens.push({ - type: 'list_end' - }); - - continue; - } - - // html - if (cap = this.rules.html.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: this.options.sanitize - ? 'paragraph' - : 'html', - pre: !this.options.sanitizer - && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), - text: cap[0] - }); - continue; - } - - // def - if ((!bq && top) && (cap = this.rules.def.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.links[cap[1].toLowerCase()] = { - href: cap[2], - title: cap[3] - }; - continue; - } - - // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i] - .replace(/^ *\| *| *\| *$/g, '') - .split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // top-level paragraph - if (top && (cap = this.rules.paragraph.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'paragraph', - text: cap[1].charAt(cap[1].length - 1) === '\n' - ? cap[1].slice(0, -1) - : cap[1] - }); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - // Top-level should never reach here. - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'text', - text: cap[0] - }); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return this.tokens; - }; - - /** - * Inline-Level Grammar - */ - - var inline = { - escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, - autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, - url: noop, - tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, - link: /^!?\[(inside)\]\(href\)/, - reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, - nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, - strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, - code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, - br: /^ {2,}\n(?!\s*$)/, - del: noop, - text: /^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/; - - inline.link = replace(inline.link) - ('inside', inline._inside) - ('href', inline._href) - (); - - inline.reflink = replace(inline.reflink) - ('inside', inline._inside) - (); - - /** - * Normal Inline Grammar - */ - - inline.normal = merge({}, inline); - - /** - * Pedantic Inline Grammar - */ - - inline.pedantic = merge({}, inline.normal, { - strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, - em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ - }); - - /** - * GFM Inline Grammar - */ - - inline.gfm = merge({}, inline.normal, { - escape: replace(inline.escape)('])', '~|])')(), - url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, - del: /^~~(?=\S)([\s\S]*?\S)~~/, - text: replace(inline.text) - (']|', '~]|') - ('|', '|https?://|') - () - }); - - /** - * GFM + Line Breaks Inline Grammar - */ - - inline.breaks = merge({}, inline.gfm, { - br: replace(inline.br)('{2,}', '*')(), - text: replace(inline.gfm.text)('{2,}', '*')() - }); - - /** - * Inline Lexer & Compiler - */ - - function InlineLexer(links, options) { - this.options = options || marked.defaults; - this.links = links; - this.rules = inline.normal; - this.renderer = this.options.renderer || new Renderer; - this.renderer.options = this.options; - - if (!this.links) { - throw new - Error('Tokens array requires a `links` property.'); - } - - if (this.options.gfm) { - if (this.options.breaks) { - this.rules = inline.breaks; - } else { - this.rules = inline.gfm; - } - } else if (this.options.pedantic) { - this.rules = inline.pedantic; - } - } - - /** - * Expose Inline Rules - */ - - InlineLexer.rules = inline; - - /** - * Static Lexing/Compiling Method - */ - - InlineLexer.output = function(src, links, options) { - var inline = new InlineLexer(links, options); - return inline.output(src); - }; - - /** - * Lexing/Compiling - */ - - InlineLexer.prototype.output = function(src) { - var out = '' - , link - , text - , href - , cap; - - while (src) { - // escape - if (cap = this.rules.escape.exec(src)) { - src = src.substring(cap[0].length); - out += cap[1]; - continue; - } - - // autolink - if (cap = this.rules.autolink.exec(src)) { - src = src.substring(cap[0].length); - if (cap[2] === '@') { - text = cap[1].charAt(6) === ':' - ? this.mangle(cap[1].substring(7)) - : this.mangle(cap[1]); - href = this.mangle('mailto:') + text; - } else { - text = escape(cap[1]); - href = text; - } - out += this.renderer.link(href, null, text); - continue; - } - - // url (gfm) - if (!this.inLink && (cap = this.rules.url.exec(src))) { - src = src.substring(cap[0].length); - text = escape(cap[1]); - href = text; - out += this.renderer.link(href, null, text); - continue; - } - - // tag - if (cap = this.rules.tag.exec(src)) { - if (!this.inLink && /^/i.test(cap[0])) { - this.inLink = false; - } - src = src.substring(cap[0].length); - out += this.options.sanitize - ? this.options.sanitizer - ? this.options.sanitizer(cap[0]) - : escape(cap[0]) - : cap[0] - continue; - } - - // link - if (cap = this.rules.link.exec(src)) { - src = src.substring(cap[0].length); - this.inLink = true; - out += this.outputLink(cap, { - href: cap[2], - title: cap[3] - }); - this.inLink = false; - continue; - } - - // reflink, nolink - if ((cap = this.rules.reflink.exec(src)) - || (cap = this.rules.nolink.exec(src))) { - src = src.substring(cap[0].length); - link = (cap[2] || cap[1]).replace(/\s+/g, ' '); - link = this.links[link.toLowerCase()]; - if (!link || !link.href) { - out += cap[0].charAt(0); - src = cap[0].substring(1) + src; - continue; - } - this.inLink = true; - out += this.outputLink(cap, link); - this.inLink = false; - continue; - } - - // strong - if (cap = this.rules.strong.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.strong(this.output(cap[2] || cap[1])); - continue; - } - - // em - if (cap = this.rules.em.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.em(this.output(cap[2] || cap[1])); - continue; - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.codespan(escape(cap[2], true)); - continue; - } - - // br - if (cap = this.rules.br.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.br(); - continue; - } - - // del (gfm) - if (cap = this.rules.del.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.del(this.output(cap[1])); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.text(escape(this.smartypants(cap[0]))); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return out; - }; - - /** - * Compile Link - */ - - InlineLexer.prototype.outputLink = function(cap, link) { - var href = escape(link.href) - , title = link.title ? escape(link.title) : null; - - return cap[0].charAt(0) !== '!' - ? this.renderer.link(href, title, this.output(cap[1])) - : this.renderer.image(href, title, escape(cap[1])); - }; - - /** - * Smartypants Transformations - */ - - InlineLexer.prototype.smartypants = function(text) { - if (!this.options.smartypants) return text; - return text - // em-dashes - .replace(/---/g, '\u2014') - // en-dashes - .replace(/--/g, '\u2013') - // opening singles - .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') - // closing singles & apostrophes - .replace(/'/g, '\u2019') - // opening doubles - .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') - // closing doubles - .replace(/"/g, '\u201d') - // ellipses - .replace(/\.{3}/g, '\u2026'); - }; - - /** - * Mangle Links - */ - - InlineLexer.prototype.mangle = function(text) { - if (!this.options.mangle) return text; - var out = '' - , l = text.length - , i = 0 - , ch; - - for (; i < l; i++) { - ch = text.charCodeAt(i); - if (Math.random() > 0.5) { - ch = 'x' + ch.toString(16); - } - out += '&#' + ch + ';'; - } - - return out; - }; - - /** - * Renderer - */ - - function Renderer(options) { - this.options = options || {}; - } - - Renderer.prototype.code = function(code, lang, escaped) { - if (this.options.highlight) { - var out = this.options.highlight(code, lang); - if (out != null && out !== code) { - escaped = true; - code = out; - } - } - - if (!lang) { - return '
'
-	      + (escaped ? code : escape(code, true))
-	      + '\n
'; - } - - return '
'
-	    + (escaped ? code : escape(code, true))
-	    + '\n
\n'; - }; - - Renderer.prototype.blockquote = function(quote) { - return '
\n' + quote + '
\n'; - }; - - Renderer.prototype.html = function(html) { - return html; - }; - - Renderer.prototype.heading = function(text, level, raw) { - return '' - + text - + '\n'; - }; - - Renderer.prototype.hr = function() { - return this.options.xhtml ? '
\n' : '
\n'; - }; - - Renderer.prototype.list = function(body, ordered) { - var type = ordered ? 'ol' : 'ul'; - return '<' + type + '>\n' + body + '\n'; - }; - - Renderer.prototype.listitem = function(text) { - return '
  • ' + text + '
  • \n'; - }; - - Renderer.prototype.paragraph = function(text) { - return '

    ' + text + '

    \n'; - }; - - Renderer.prototype.table = function(header, body) { - return '\n' - + '\n' - + header - + '\n' - + '\n' - + body - + '\n' - + '
    \n'; - }; - - Renderer.prototype.tablerow = function(content) { - return '\n' + content + '\n'; - }; - - Renderer.prototype.tablecell = function(content, flags) { - var type = flags.header ? 'th' : 'td'; - var tag = flags.align - ? '<' + type + ' style="text-align:' + flags.align + '">' - : '<' + type + '>'; - return tag + content + '\n'; - }; - - // span level renderer - Renderer.prototype.strong = function(text) { - return '' + text + ''; - }; - - Renderer.prototype.em = function(text) { - return '' + text + ''; - }; - - Renderer.prototype.codespan = function(text) { - return '' + text + ''; - }; - - Renderer.prototype.br = function() { - return this.options.xhtml ? '
    ' : '
    '; - }; - - Renderer.prototype.del = function(text) { - return '' + text + ''; - }; - - Renderer.prototype.link = function(href, title, text) { - if (this.options.sanitize) { - try { - var prot = decodeURIComponent(unescape(href)) - .replace(/[^\w:]/g, '') - .toLowerCase(); - } catch (e) { - return ''; - } - if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) { - return ''; - } - } - var out = '
    '; - return out; - }; - - Renderer.prototype.image = function(href, title, text) { - var out = '' + text + '' : '>'; - return out; - }; - - Renderer.prototype.text = function(text) { - return text; - }; - - /** - * Parsing & Compiling - */ - - function Parser(options) { - this.tokens = []; - this.token = null; - this.options = options || marked.defaults; - this.options.renderer = this.options.renderer || new Renderer; - this.renderer = this.options.renderer; - this.renderer.options = this.options; - } - - /** - * Static Parse Method - */ - - Parser.parse = function(src, options, renderer) { - var parser = new Parser(options, renderer); - return parser.parse(src); - }; - - /** - * Parse Loop - */ - - Parser.prototype.parse = function(src) { - this.inline = new InlineLexer(src.links, this.options, this.renderer); - this.tokens = src.reverse(); - - var out = ''; - while (this.next()) { - out += this.tok(); - } - - return out; - }; - - /** - * Next Token - */ - - Parser.prototype.next = function() { - return this.token = this.tokens.pop(); - }; - - /** - * Preview Next Token - */ - - Parser.prototype.peek = function() { - return this.tokens[this.tokens.length - 1] || 0; - }; - - /** - * Parse Text Tokens - */ - - Parser.prototype.parseText = function() { - var body = this.token.text; - - while (this.peek().type === 'text') { - body += '\n' + this.next().text; - } - - return this.inline.output(body); - }; - - /** - * Parse Current Token - */ - - Parser.prototype.tok = function() { - switch (this.token.type) { - case 'space': { - return ''; - } - case 'hr': { - return this.renderer.hr(); - } - case 'heading': { - return this.renderer.heading( - this.inline.output(this.token.text), - this.token.depth, - this.token.text); - } - case 'code': { - return this.renderer.code(this.token.text, - this.token.lang, - this.token.escaped); - } - case 'table': { - var header = '' - , body = '' - , i - , row - , cell - , flags - , j; - - // header - cell = ''; - for (i = 0; i < this.token.header.length; i++) { - flags = { header: true, align: this.token.align[i] }; - cell += this.renderer.tablecell( - this.inline.output(this.token.header[i]), - { header: true, align: this.token.align[i] } - ); - } - header += this.renderer.tablerow(cell); - - for (i = 0; i < this.token.cells.length; i++) { - row = this.token.cells[i]; - - cell = ''; - for (j = 0; j < row.length; j++) { - cell += this.renderer.tablecell( - this.inline.output(row[j]), - { header: false, align: this.token.align[j] } - ); - } - - body += this.renderer.tablerow(cell); - } - return this.renderer.table(header, body); - } - case 'blockquote_start': { - var body = ''; - - while (this.next().type !== 'blockquote_end') { - body += this.tok(); - } - - return this.renderer.blockquote(body); - } - case 'list_start': { - var body = '' - , ordered = this.token.ordered; - - while (this.next().type !== 'list_end') { - body += this.tok(); - } - - return this.renderer.list(body, ordered); - } - case 'list_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.token.type === 'text' - ? this.parseText() - : this.tok(); - } - - return this.renderer.listitem(body); - } - case 'loose_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.tok(); - } - - return this.renderer.listitem(body); - } - case 'html': { - var html = !this.token.pre && !this.options.pedantic - ? this.inline.output(this.token.text) - : this.token.text; - return this.renderer.html(html); - } - case 'paragraph': { - return this.renderer.paragraph(this.inline.output(this.token.text)); - } - case 'text': { - return this.renderer.paragraph(this.parseText()); - } - } - }; - - /** - * Helpers - */ - - function escape(html, encode) { - return html - .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); - } - - function unescape(html) { - // explicitly match decimal, hex, and named HTML entities - return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' - ? String.fromCharCode(parseInt(n.substring(2), 16)) - : String.fromCharCode(+n.substring(1)); - } - return ''; - }); - } - - function replace(regex, opt) { - regex = regex.source; - opt = opt || ''; - return function self(name, val) { - if (!name) return new RegExp(regex, opt); - val = val.source || val; - val = val.replace(/(^|[^\[])\^/g, '$1'); - regex = regex.replace(name, val); - return self; - }; - } - - function noop() {} - noop.exec = noop; - - function merge(obj) { - var i = 1 - , target - , key; - - for (; i < arguments.length; i++) { - target = arguments[i]; - for (key in target) { - if (Object.prototype.hasOwnProperty.call(target, key)) { - obj[key] = target[key]; - } - } - } - - return obj; - } - - - /** - * Marked - */ - - function marked(src, opt, callback) { - if (callback || typeof opt === 'function') { - if (!callback) { - callback = opt; - opt = null; - } - - opt = merge({}, marked.defaults, opt || {}); - - var highlight = opt.highlight - , tokens - , pending - , i = 0; - - try { - tokens = Lexer.lex(src, opt) - } catch (e) { - return callback(e); - } - - pending = tokens.length; - - var done = function(err) { - if (err) { - opt.highlight = highlight; - return callback(err); - } - - var out; - - try { - out = Parser.parse(tokens, opt); - } catch (e) { - err = e; - } - - opt.highlight = highlight; - - return err - ? callback(err) - : callback(null, out); - }; - - if (!highlight || highlight.length < 3) { - return done(); - } - - delete opt.highlight; - - if (!pending) return done(); - - for (; i < tokens.length; i++) { - (function(token) { - if (token.type !== 'code') { - return --pending || done(); - } - return highlight(token.text, token.lang, function(err, code) { - if (err) return done(err); - if (code == null || code === token.text) { - return --pending || done(); - } - token.text = code; - token.escaped = true; - --pending || done(); - }); - })(tokens[i]); - } - - return; - } - try { - if (opt) opt = merge({}, marked.defaults, opt); - return Parser.parse(Lexer.lex(src, opt), opt); - } catch (e) { - e.message += '\nPlease report this to https://github.com/chjj/marked.'; - if ((opt || marked.defaults).silent) { - return '

    An error occured:

    '
    -	        + escape(e.message + '', true)
    -	        + '
    '; - } - throw e; - } - } - - /** - * Options - */ - - marked.options = - marked.setOptions = function(opt) { - merge(marked.defaults, opt); - return marked; - }; - - marked.defaults = { - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: false, - sanitizer: null, - mangle: true, - smartLists: false, - silent: false, - highlight: null, - langPrefix: 'lang-', - smartypants: false, - headerPrefix: '', - renderer: new Renderer, - xhtml: false - }; - - /** - * Expose - */ - - marked.Parser = Parser; - marked.parser = Parser.parse; - - marked.Renderer = Renderer; - - marked.Lexer = Lexer; - marked.lexer = Lexer.lex; - - marked.InlineLexer = InlineLexer; - marked.inlineLexer = InlineLexer.output; - - marked.parse = marked; - - if (true) { - module.exports = marked; - } else if (typeof define === 'function' && define.amd) { - define(function() { return marked; }); - } else { - this.marked = marked; - } - - }).call(function() { - return this || (typeof window !== 'undefined' ? window : global); - }()); - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(4) - - /* webpack only - if (DEBUG && global.console) { - console.debug('debug mode') - } - */ - - -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - var cou = __webpack_require__(5) - - module.exports = cou.extend(_, cou) - - __webpack_require__(7) - __webpack_require__(8) - __webpack_require__(9) - __webpack_require__(11) - __webpack_require__(12) - __webpack_require__(13) - - _.mixin(_, _) - - function _(val) { - if (!(this instanceof _)) return new _(val) - this.__value = val - this.__chain = false - } - - - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - var is = __webpack_require__(6) - - var slice = [].slice - - var _ = exports - - _.is = is - - _.extend = _.assign = extend - - _.each = each - - _.map = function(arr, fn) { - var ret = [] - each(arr, function(item, i, arr) { - ret[i] = fn(item, i, arr) - }) - return ret - } - - _.filter = function(arr, fn) { - var ret = [] - each(arr, function(item, i, arr) { - var val = fn(item, i, arr) - if (val) ret.push(item) - }) - return ret - } - - _.some = function(arr, fn) { - return -1 != findIndex(arr, fn) - } - - _.every = function(arr, fn) { - return -1 == findIndex(arr, negate(fn)) - } - - _.reduce = reduce - - _.findIndex = findIndex - - _.find = function(arr, fn) { - var index = _.findIndex(arr, fn) - if (-1 != index) { - return arr[index] - } - } - - _.indexOf = indexOf - - _.includes = function(val, sub) { - return -1 != indexOf(val, sub) - } - - _.toArray = toArray - - _.slice = function(arr, start, end) { - // support array and string - var ret = [] // default return array - var len = getLength(arr) - if (len >= 0) { - start = start || 0 - end = end || len - // raw array and string use self slice - if (!is.fn(arr.slice)) { - arr = toArray(arr) - } - ret = arr.slice(start, end) - } - return ret - } - - _.negate = negate - - _.forIn = forIn - - _.keys = keys - - var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g - - _.trim = function(str) { - if (null == str) return '' - return ('' + str).replace(rtrim, '') - } - - _.noop = function() {} - - _.len = getLength - - function getLength(arr) { - if (null != arr) return arr.length - } - - function each(arr, fn) { - var len = getLength(arr) - if (len && is.fn(fn)) { - for (var i = 0; i < len; i++) { - if (false === fn(arr[i], i, arr)) break - } - } - return arr - } - - function findIndex(arr, fn) { - var ret = -1 - each(arr, function(item, i, arr) { - if (fn(item, i, arr)) { - ret = i - return false - } - }) - return ret - } - - function toArray(arr) { - var ret = [] - each(arr, function(item) { - ret.push(item) - }) - return ret - } - - - function extend(target) { - if (target) { - var sources = slice.call(arguments, 1) - each(sources, function(src) { - forIn(src, function(val, key) { - if (!is.undef(val)) { - target[key] = val - } - }) - }) - } - return target - } - - function negate(fn) { - return function() { - return !fn.apply(this, arguments) - } - } - - function indexOf(val, sub) { - if (is.string(val)) return val.indexOf(sub) - - return findIndex(val, function(item) { - // important! - return sub === item - }) - } - - function reduce(arr, fn, prev) { - each(arr, function(item, i) { - prev = fn(prev, item, i, arr) - }) - return prev - } - - function forIn(hash, fn) { - if (hash) { - for (var key in hash) { - if (is.owns(hash, key)) { - if (false === fn(hash[key], key, hash)) break - } - } - } - return hash - } - - function keys(hash) { - var ret = [] - forIn(hash, function(val, key) { - ret.push(key) - }) - return ret - } - - - -/***/ }, -/* 6 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(global) {var is = exports - - var obj = Object.prototype - - var navigator = global.navigator - - // reserved words in es3: instanceof null undefined arguments boolean false true function int - // only have is.string and is.object, not is.str and is.obj - // instanceof null undefined arguments boolean false true function int - - is.browser = function() { - if (!is.wechatApp()) { - if (navigator && global.window == global) { - return true - } - } - return false - } - - // simple modern browser detect - is.h5 = function() { - if (is.browser() && navigator.geolocation) { - return true - } - return false - } - - is.mobile = function() { - if (is.browser() && /mobile/i.test(navigator.userAgent)) { - return true - } - return false - } - - is.wechatApp = function() { - if ('object' == typeof wx) { - if (wx && is.fn(wx.createVideoContext)) { - // wechat js sdk has no createVideoContext - return true - } - } - return false - } - - function _class(val) { - var name = obj.toString.call(val) - // [object Class] - return name.substring(8, name.length - 1).toLowerCase() - } - - function _type(val) { - // undefined object boolean number string symbol function - return typeof val - } - - function owns(owner, key) { - return obj.hasOwnProperty.call(owner, key) - } - - is._class = _class - - is._type = _type - - is.owns = owns - - // not a number - is.nan = function(val) { - return val !== val - } - - is.bool = function(val) { - return 'boolean' == _class(val) - } - - is.infinite = function(val) { - return val == Infinity || val == -Infinity - } - - is.number = function(num) { - return !isNaN(num) && 'number' == _class(num) - } - - // integer or decimal - is.iod = function(val) { - if (is.number(val) && !is.infinite(val)) { - return true - } - return false - } - - is.decimal = function(val) { - if (is.iod(val)) { - return 0 != val % 1 - } - return false - } - - is.integer = function(val) { - if (is.iod(val)) { - return 0 == val % 1 - } - return false - } - - // object or function - is.oof = function(val) { - if (val) { - var tp = _type(val) - return 'object' == tp || 'function' == tp - } - return false - } - - // regexp should return object - is.object = function(obj) { - return is.oof(obj) && 'function' != _class(obj) - } - - is.hash = is.plainObject = function(hash) { - if (hash) { - if ('object' == _class(hash)) { - // old window is object - if (hash.nodeType || hash.setInterval) { - return false - } - return true - } - } - return false - } - - is.undef = function(val) { - return 'undefined' == _type(val) - } - - // host function should return function, e.g. alert - is.fn = function(fn) { - return 'function' == _class(fn) - } - - is.string = function(str) { - return 'string' == _class(str) - } - - // number or string - is.nos = function(val) { - return is.iod(val) || is.string(val) - } - - is.array = function(arr) { - return 'array' == _class(arr) - } - - is.arraylike = function(arr) { - // window has length for iframe too, but it is not arraylike - if (!is.window(arr) && is.object(arr)) { - var len = arr.length - if (is.integer(len) && len >= 0) { - return true - } - } - return false - } - - is.window = function(val) { - if (val && val.window == val) { - return true - } - return false - } - - is.empty = function(val) { - if (is.string(val) || is.arraylike(val)) { - return 0 === val.length - } - if (is.hash(val)) { - for (var key in val) { - if (owns(val, key)) { - return false - } - } - } - return true - } - - is.element = function(elem) { - if (elem && 1 === elem.nodeType) { - return true - } - return false - } - - is.regexp = function(val) { - return 'regexp' == _class(val) - } - - - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = module.exports = __webpack_require__(4) - - var each = _.each - var includes = _.includes - var is = _.is - var proto = Array.prototype - - _.reject = function(arr, fn) { - return _.filter(arr, function(val, i, arr) { - return !fn(val, i, arr) - }) - } - - _.without = function(arr) { - var other = _.slice(arguments, 1) - return _.difference(arr, other) - } - - _.difference = function(arr, other) { - var ret = [] - _.each(arr, function(val) { - if (!includes(other, val)) { - ret.push(val) - } - }) - return ret - } - - _.pluck = function(arr, key) { - return _.map(arr, function(item) { - if (item) return item[key] - }) - } - - _.size = function(arr) { - var len = _.len(arr) - if (null == len) { - len = _.keys(arr).length - } - return len - } - - _.first = function(arr) { - if (arr) return arr[0] - } - - _.last = function(arr) { - var len = _.len(arr) - if (len) { - return arr[len - 1] - } - } - - _.asyncMap = function(arr, fn, cb) { - // desperate - var ret = [] - var count = 0 - var hasDone, hasStart - - each(arr, function(arg, i) { - hasStart = true - fn(arg, function(err, val) { - if (hasDone) return - count++ - if (err) { - hasDone = true - return cb(err) - } - ret[i] = val - if (count == arr.length) { - hasDone = true - cb(null, ret) - } - }) - }) - - if (!hasStart) cb(null) // empty - } - - _.uniq = function(arr) { - return _.uniqBy(arr) - } - - _.uniqBy = function(arr, fn) { - var ret = [] - var pool = [] - if (!is.fn(fn)) { - fn = null - } - each(arr, function(item) { - var val = item - if (fn) { - val = fn(item) - } - if (!includes(pool, val)) { - pool.push(val) - ret.push(item) - } - }) - return ret - } - - _.flatten = function(arrs) { - var ret = [] - each(arrs, function(arr) { - if (is.arraylike(arr)) { - each(arr, function(item) { - ret.push(item) - }) - } else ret.push(arr) - }) - return ret - } - - _.union = function() { - return _.uniq(_.flatten(arguments)) - } - - _.sample = function(arr, n) { - var ret = _.toArray(arr) - var len = ret.length - var need = Math.min(n || 1, len) - for (var i = 0; i < len; i++) { - var rand = _.random(i, len - 1) - var tmp = ret[rand] - ret[rand] = ret[i] - ret[i] = tmp - } - ret.length = need - if (null == n) { - return ret[0] - } - return ret - } - - _.shuffle = function(arr) { - return _.sample(arr, Infinity) - } - - _.compact = function(arr) { - return _.filter(arr, _.identity) - } - - _.rest = function(arr) { - return _.slice(arr, 1) - } - - _.invoke = function() { - var args = arguments - var arr = args[0] - var fn = args[1] - var isFunc = is.fn(fn) - args = _.slice(args, 2) - - return _.map(arr, function(item) { - if (isFunc) { - return fn.apply(item, args) - } - if (null != item) { - var method = item[fn] - if (is.fn(method)) { - return method.apply(item, args) - } - } - }) - } - - _.partition = function(arr, fn) { - var hash = _.groupBy(arr, function(val, i, arr) { - var ret = fn(val, i, arr) - if (ret) return 1 - return 2 - }) - return [hash[1] || [], hash[2] || []] - } - - _.groupBy = function(arr, fn) { - var hash = {} - _.each(arr, function(val, i, arr) { - var ret = fn(val, i, arr) - hash[ret] = hash[ret] || [] - hash[ret].push(val) - }) - return hash - } - - _.range = function() { - var args = arguments - if (args.length < 2) { - return _.range(args[1], args[0]) - } - var start = args[0] || 0 - var last = args[1] || 0 - var step = args[2] - if (!is.number(step)) { - step = 1 - } - var count = last - start - if (0 != step) { - count = count / step - } - var ret = [] - var val = start - for (var i = 0; i < count; i++) { - ret.push(val) - val += step - } - return ret - } - - _.pullAt = function(arr) { - // `_.at` but mutate - var indexes = _.slice(arguments, 1) - return mutateDifference(arr, indexes) - } - - function mutateDifference(arr, indexes) { - var ret = [] - var len = _.len(indexes) - if (len) { - indexes = indexes.sort(function(a, b) { - return a - b - }) - while (len--) { - var index = indexes[len] - ret.push(proto.splice.call(arr, index, 1)[0]) - } - } - ret.reverse() - return ret - } - - _.remove = function(arr, fn) { - // `_.filter` but mutate - var len = _.len(arr) || 0 - var indexes = [] - while (len--) { - if (fn(arr[len], len, arr)) { - indexes.push(len) - } - } - return mutateDifference(arr, indexes) - } - - _.fill = function(val, start, end) { - // TODO - } - - -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = module.exports = __webpack_require__(4) - - var is = _.is - var each = _.each - var forIn = _.forIn - - _.only = function(obj, keys) { - obj = obj || {} - if (is.string(keys)) keys = keys.split(/ +/) - return _.reduce(keys, function(ret, key) { - if (null != obj[key]) ret[key] = obj[key] - return ret - }, {}) - } - - _.values = function(obj) { - return _.map(_.keys(obj), function(key) { - return obj[key] - }) - } - - _.pick = function(obj, fn) { - if (!is.fn(fn)) { - return _.pick(obj, function(val, key) { - return key == fn - }) - } - var ret = {} - forIn(obj, function(val, key, obj) { - if (fn(val, key, obj)) { - ret[key] = val - } - }) - return ret - } - - _.functions = function(obj) { - return _.keys(_.pick(obj, function(val) { - return is.fn(val) - })) - } - - _.mapKeys = function(obj, fn) { - var ret = {} - forIn(obj, function(val, key, obj) { - var newKey = fn(val, key, obj) - ret[newKey] = val - }) - return ret - } - - _.mapObject = _.mapValues = function(obj, fn) { - var ret = {} - forIn(obj, function(val, key, obj) { - ret[key] = fn(val, key, obj) - }) - return ret - } - - // return value when walk through path, otherwise return empty - _.get = function(obj, path) { - path = toPath(path) - if (path.length) { - var flag = _.every(path, function(key) { - if (null != obj) { // obj can be indexed - obj = obj[key] - return true - } - }) - if (flag) return obj - } - } - - _.has = function(obj, path) { - path = toPath(path) - if (path.length) { - var flag = _.every(path, function(key) { - if (null != obj && is.owns(obj, key)) { - obj = obj[key] - return true - } - }) - if (flag) return true - } - return false - } - - _.set = function(obj, path, val) { - path = toPath(path) - var cur = obj - _.every(path, function(key, i) { - if (is.oof(cur)) { - if (i + 1 == path.length) { - cur[key] = val - } else { - var item = cur[key] - if (null == item) { - // fill value with {} or [] - var item = {} - if (~~key == key) { - item = [] - } - } - cur = cur[key] = item - return true - } - } - }) - return obj - } - - _.create = (function() { - function Object() {} // so it seems like Object.create - return function(proto, property) { - // not same as Object.create, Object.create(proto, propertyDescription) - if ('object' != typeof proto) { - // null is ok - proto = null - } - Object.prototype = proto - return _.extend(new Object, property) - } - })() - - _.defaults = function() { - var args = arguments - var target = args[0] - var sources = _.slice(args, 1) - if (target) { - _.each(sources, function(src) { - _.mapObject(src, function(val, key) { - if (is.undef(target[key])) { - target[key] = val - } - }) - }) - } - return target - } - - _.isMatch = function(obj, src) { - var ret = true - obj = obj || {} - forIn(src, function(val, key) { - if (val !== obj[key]) { - ret = false - return false - } - }) - return ret - } - - _.toPlainObject = function(val) { - var ret = {} - forIn(val, function(val, key) { - ret[key] = val - }) - return ret - } - - _.invert = function(obj) { - var ret = {} - forIn(obj, function(val, key) { - ret[val] = key - }) - return ret - } - - // topath, copy from lodash - - var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g - var reEscapeChar = /\\(\\)?/g; - - function toPath(val) { - if (is.array(val)) return val - var ret = [] - _.tostr(val).replace(rePropName, function(match, number, quote, string) { - var item = number || match - if (quote) { - item = string.replace(reEscapeChar, '$1') - } - ret.push(item) - }) - return ret - } - - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = module.exports = __webpack_require__(4) - - var is = _.is - var slice = _.slice - - _.bind = function(fn, ctx) { - if (is.string(ctx)) { - var obj = fn - fn = obj[ctx] - ctx = obj - } - if (!is.fn(fn)) return fn - var args = slice(arguments, 2) - ctx = ctx || this - return function() { - return fn.apply(ctx, _.flatten([args, arguments])) - } - } - - // from lang.js `Function.prototype.inherits` - // so belong to function - _.inherits = function(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = _.create(superCtor.prototype, { - constructor: ctor - }) - } - - _.delay = function(fn, wait) { - var args = _.slice(arguments, 2) - return setTimeout(function() { - fn.apply(this, args) - }, wait) - } - - _.before = function(n, fn) { - return function() { - if (n > 1) { - n-- - return fn.apply(this, arguments) - } - } - } - - _.once = function(fn) { - return _.before(2, fn) - } - - _.after = function(n, fn) { - return function() { - if (n > 1) { - n-- - } else { - return fn.apply(this, arguments) - } - } - } - - _.throttle = function(fn, wait, opt) { - wait = wait || 0 - opt = _.extend({ - leading: true, - trailing: true, - maxWait: wait - }, opt) - return _.debounce(fn, wait, opt) - } - - _.debounce = function(fn, wait, opt) { - wait = wait || 0 - opt = _.extend({ - leading: false, - trailing: true - }, opt) - var maxWait = opt.maxWait - var lastExec = 0 // wait - var lastCall = 0 // just for maxWait - var now = _.now() - var timer - - if (!opt.leading) { - lastExec = now - } - - function ifIsCD() { - if (now - lastExec > wait) return false - if (maxWait && now - lastCall > maxWait) return false - return true - } - - function exec(fn, ctx, args) { - lastExec = _.now() // update last exec - return fn.apply(ctx, args) - } - - function cancel() { - if (timer) { - clearTimeout(timer) - timer = null - } - } - - function debounced() { - now = _.now() // update now - var isCD = ifIsCD() - lastCall = now // update last call - var me = this - var args = arguments - - cancel() - - if (!isCD) { - exec(fn, me, args) - } else { - if (opt.trailing) { - timer = _.delay(function() { - exec(fn, me, args) - }, wait) - } - } - } - - debounced.cancel = cancel - - return debounced - } - - function memoize(fn) { - var cache = new memoize.Cache - function memoized() { - var args = arguments - var key = args[0] - if (!cache.has(key)) { - var ret = fn.apply(this, args) - cache.set(key, ret) - } - return cache.get(key) - } - memoized.cache = cache - return memoized - } - - memoize.Cache = __webpack_require__(10) - - _.memoize = memoize - - _.wrap = function(val, fn) { - return function() { - var args = [val] - args.push.apply(args, arguments) - return fn.apply(this, args) - } - } - - _.curry = function(fn) { - var len = fn.length - return setter([]) - - function setter(args) { - return function() { - var arr = args.concat(_.slice(arguments)) - if (arr.length >= len) { - arr.length = len - return fn.apply(this, arr) - } - return setter(arr) - } - } - } - - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = __webpack_require__(4) - var is = _.is - - module.exports = Cache - - function Cache() { - this.data = {} - } - - var proto = Cache.prototype - - proto.has = function(key) { - return is.owns(this.data, key) - } - - proto.get = function(key) { - return this.data[key] - } - - proto.set = function(key, val) { - this.data[key] = val - } - - proto['delete'] = function(key) { - delete this.data[key] - } - - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = module.exports = __webpack_require__(4) - var is = _.is - - _.now = function() { - return +new Date - } - - _.constant = function(val) { - return function() { - return val - } - } - - _.identity = function(val) { - return val - } - - _.random = function(min, max) { - return min + Math.floor(Math.random() * (max - min + 1)) - } - - _.mixin = function(dst, src, opt) { - var keys = _.functions(src) - if (dst) { - if (is.fn(dst)) { - opt = opt || {} - var isChain = !!opt.chain - // add to prototype - var proto = dst.prototype - _.each(keys, function(key) { - var fn = src[key] - proto[key] = function() { - var me = this - var args = [me.__value] - args.push.apply(args, arguments) - var ret = fn.apply(me, args) - if (me.__chain) { - me.__value = ret - return me - } - return ret - } - }) - } else { - _.each(keys, function(key) { - dst[key] = src[key] - }) - } - } - return dst - } - - _.chain = function(val) { - var ret = _(val) - ret.__chain = true - return ret - } - - _.value = function() { - this.__chain = false - return this.__value - } - - -/***/ }, -/* 12 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = module.exports = __webpack_require__(4) - - _.tostr = tostr // lodash toString - - var indexOf = _.indexOf - - _.split = function(str, separator, limit) { - str = tostr(str) - return str.split(separator, limit) - } - - _.capitalize = function(str) { - str = tostr(str) - return str.charAt(0).toUpperCase() + str.substr(1) - } - - _.decapitalize = function(str) { - str = tostr(str) - return str.charAt(0).toLowerCase() + str.substr(1) - } - - _.camelCase = function(str) { - str = tostr(str) - var arr = str.split(/[^\w]|_+/) - arr = _.map(arr, function(val) { - return _.capitalize(val) - }) - return _.decapitalize(arr.join('')) - } - - _.startsWith = function(str, val) { - return 0 == indexOf(str, val) - } - - _.endsWith = function(str, val) { - val += '' // null => 'null' - return val == _.slice(str, _.len(str) - _.len(val)) - } - - _.lower = function(str) { - // lodash toLower - return tostr(str).toLowerCase() - } - - _.upper = function(str) { - // lodash toUpper - return tostr(str).toUpperCase() - } - - _.repeat = function(str, count) { - return _.map(_.range(count), function() { - return str - }).join('') - } - - _.padStart = function(str, len, chars) { - str = _.tostr(str) - len = len || 0 - var delta = len - str.length - return getPadStr(chars, delta) + str - } - - _.padEnd = function(str, len, chars) { - str = _.tostr(str) - len = len || 0 - var delta = len - str.length - return str + getPadStr(chars, delta) - } - - function getPadStr(chars, len) { - chars = _.tostr(chars) || ' ' // '' will never end - var count = Math.floor(len / chars.length) + 1 - return _.repeat(chars, count).slice(0, len) - } - - function tostr(str) { - if (str || 0 == str) return str + '' - return '' - } - - -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = module.exports = __webpack_require__(4) - - _.sum = function(arr) { - return _.reduce(arr, function(sum, val) { - return sum + val - }, 0) - } - - _.max = function(arr, fn) { - var index = -1 - var data = -Infinity - fn = fn || _.identity - _.each(arr, function(val, i) { - val = fn(val) - if (val > data) { - data = val - index = i - } - }) - if (index > -1) { - return arr[index] - } - return data - } - - _.min = function(arr, fn) { - var index = -1 - var data = Infinity - fn = fn || _.identity - _.each(arr, function(val, i) { - val = fn(val) - if (val < data) { - data = val - index = i - } - }) - if (index > -1) { - return arr[index] - } - return data - } - - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - - var _ = __webpack_require__(3) - var is = _.is - - var defaultOption = { - sep: '&', - eq: '=', - encode: encodeURIComponent, - decode: decodeURIComponent, - keepRaw: false, - sort: null, - ignoreValues: [undefined] - } - - exports.parse = function(qs, sep, eq, opt) { - qs += '' - opt = getOpt(sep, eq, opt) - var decode = opt.decode - // var ret = {} - qs = qs.split(opt.sep) - - return _.reduce(qs, function(ret, arr) { - arr = arr.split(opt.eq) - if (2 == arr.length) { - var k = arr[0] - var v = arr[1] - if (!opt.keepRaw) { - try { - k = decode(k) - v = decode(v) - } catch (ignore) {} - } - ret[k] = v - } - return ret - }, {}) - } - - exports.stringify = function(obj, sep, eq, opt) { - opt = getOpt(sep, eq, opt) - - var keys = _.keys(obj) - - var sort = opt.sort - if (sort) { - if (is.fn(sort)) { - keys.sort(sort) - } else { - keys.sort() - } - } - - var encode = opt.encode - - var arr = [] - _.each(keys, function(key) { - var val = obj[key] - if (!_.includes(opt.ignoreValues, val)) { - if (is.nan(val) || null == val) { - val = '' - } - if (!opt.keepRaw) { - key = encode(key) - val = encode(val) - } - arr.push(key + opt.eq + val) - } - }) - return arr.join(opt.sep) - } - - function getOpt(sep, eq, opt) { - // can be - // _ - // opt - // sep, opt - // sep, eq, opt - opt = _.find(arguments, function(val) { - return is.object(val) - }) - sep = is.nos(sep) ? sep : undefined - eq = is.nos(eq) ? eq : undefined - opt = _.extend({}, defaultOption, opt, {sep: sep, eq: eq}) - return opt - } - - - -/***/ }, -/* 15 */ -/***/ function(module, exports) { - - module.exports = "# h1\n\nhead1\n===\n\nhead2\n---\n\n### head3 ###\n\n- **strong**\n- *emphasis*\n- ~~del~~\n- `code inline`\n\n> block quote\n\n[github link address](https://github.com/chunpu/markdown2confluence)\n\n```javascript\nvar i = 1 // comment\nconsole.log(\"This is code block\")\n```\n\n![image](https://www.google.com.hk/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png)\n\n## GFM support\n\nFirst Header | Second Header\n------------- | -------------\nContent Cell | Content Cell\nContent Cell | Content Cell\n*inline style* | **inline style**\n\n:)\n" - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/browser/index.html b/browser/index.html deleted file mode 100644 index 0d9a9cf..0000000 --- a/browser/index.html +++ /dev/null @@ -1,5 +0,0 @@ -markdown2confluence

    put markdown here

    generated confluence markup

    \ No newline at end of file diff --git a/browser/index.jade b/browser/index.jade deleted file mode 100644 index e85cca9..0000000 --- a/browser/index.jade +++ /dev/null @@ -1,23 +0,0 @@ -block title - title markdown2confluence - -extend layout/basic - -block style - style. - textarea { - width: 600px; - height: 400px; - } - -block main - h1 put markdown here - textarea#markdown - p - button#convert convert - h1 generated confluence markup - textarea#markup - -block script - script(src='//code.jquery.com/jquery-1.11.2.min.js') - script(src='./bundle.js') diff --git a/demo.md b/demo.md index a09bb20..04f568c 100644 --- a/demo.md +++ b/demo.md @@ -1,35 +1,81 @@ -# h1 +Heading 1 +========= -head1 -=== +This is a paragraph of text. So far pretty uninteresting. +If you have GFM enabled, this should be on the next line. -head2 ---- -### head3 ### +## Subheading (level 2) + +> Amazing things happen when people work together! + +The above is a quote. + -- **strong** -- *emphasis* -- ~~del~~ -- `code inline` +## Formatting -> block quote +Strikethrough text looks ~~amazing~~ acceptable. -[github link address](https://github.com/chunpu/markdown2confluence) +Bolded text is really called **strong**. Italicized text shows *emphasis*. + + +## Code Blocks ```javascript -var i = 1 // comment -console.log("This is code block") +// This is JavaScript +console.log("This is JavaScript"); ``` -![image](https://www.google.com.hk/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png) +And `code()` within normal text is ok too. + + Code without a language should not have special formatting. + + +## Lists + +Careful with lists. There needs to be two blank lines after the ordered list otherwise the ordered list thinks it continues with the unordered list. + +1. Ordered list +2. Second item + + +* Unordered list +* Second item + +This list is a bit more complex. + +* Heading, unordered + 1. Subheading, ordered + * Third item, unordered + 2. Subheading 2 + 1. Alternate third item, ordered + + +## Tables + +| Heading 1 | Heading 2 | +|-----------------|-----------------| +| Row 1, Column 1 | Row 1, Column 2 | +| Row 2, Column 1 | Row 2, Column 2 | + + +## Other + +This is a horizontal rule. + +--- + +Here is another. + +---------- + +![broken image][IMG] <-- That is a broken image to [this url][IMG] and the "broken_image" alt text is unfortunately lost. + +[IMG]: http://example.com/broken-image.png -## GFM support -First Header | Second Header -------------- | ------------- -Content Cell | Content Cell -Content Cell | Content Cell -*inline style* | **inline style** +## Broken Features -:) +
    + HTML is copied directly to the text without conversion. HTML tags will be seen in the resulting page. +
    diff --git a/index.js b/index.js deleted file mode 100644 index c1852c3..0000000 --- a/index.js +++ /dev/null @@ -1,114 +0,0 @@ -var marked = require('marked') -var _ = require('min-util') -var qs = require('min-qs') -var inlineLexer = marked.inlineLexer - -module.exports = exports = markdown2confluence - -// https://roundcorner.atlassian.net/secure/WikiRendererHelpAction.jspa?section=all -// https://confluence.atlassian.com/display/DOC/Confluence+Wiki+Markup -// http://blogs.atlassian.com/2011/11/why-we-removed-wiki-markup-editor-in-confluence-4/ - -var MAX_CODE_LINE = 20 - -function Renderer() {} - -var rawRenderer = marked.Renderer - -var langArr = 'actionscript3 bash csharp coldfusion cpp css delphi diff erlang groovy java javafx javascript perl php none powershell python ruby scala sql vb html/xml'.split(/\s+/) -var langMap = { - shell: 'bash' -} -for (var i = 0, x; x = langArr[i++];) { - langMap[x] = x -} - -_.extend(Renderer.prototype, rawRenderer.prototype, { - paragraph: function(text) { - return text + '\n\n' - } - , html: function(html) { - return html - } - , heading: function(text, level, raw) { - return 'h' + level + '. ' + text + '\n\n' - } - , strong: function(text) { - return '*' + text + '*' - } - , em: function(text) { - return '_' + text + '_' - } - , del: function(text) { - return '-' + text + '-' - } - , codespan: function(text) { - return '{{' + text + '}}' - } - , blockquote: function(quote) { - return '{quote}' + quote + '{quote}' - } - , br: function() { - return '\n' - } - , hr: function() { - return '----' - } - , link: function(href, title, text) { - var arr = [href] - if (title || text) { - arr.unshift(title || text) - } - return '[' + arr.join('|') + ']' - } - , list: function(body, ordered) { - var arr = _.filter(_.trim(body).split('\n'), function(line) { - return line - }) - var type = ordered ? '#' : '*' - return _.map(arr, function(line) { - return type + ' ' + line - }).join('\n') + '\n\n' - - } - , listitem: function(body, ordered) { - return body + '\n' - } - , image: function(href, title, text) { - return '!' + href + '!' - } - , table: function(header, body) { - return header + body + '\n' - } - , tablerow: function(content, flags) { - return content + '\n' - } - , tablecell: function(content, flags) { - var type = flags.header ? '||' : '|' - return type + content - } - , code: function(code, lang) { - // {code:language=java|borderStyle=solid|theme=RDark|linenumbers=true|collapse=true} - lang = langMap[lang] || '' - var param = { - language: lang, - borderStyle: 'solid', - theme: 'RDark', // dark is good - linenumbers: true, - collapse: false - } - var lineCount = _.split(code, '\n').length - if (lineCount > MAX_CODE_LINE) { - // code is too long - param.collapse = true - } - param = qs.stringify(param, '|', '=') - return '{code:' + param + '}\n' + code + '\n{code}\n\n' - } -}) - -var renderer = new Renderer() - -function markdown2confluence(markdown) { - return marked(markdown, {renderer: renderer}) -} diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 0000000..72124bd --- /dev/null +++ b/lib/index.js @@ -0,0 +1,488 @@ +"use strict"; + +var defaultLanguageMap, marked, querystring; + +marked = require("marked"); +querystring = require("querystring"); + +// https://confluence.atlassian.com/doc/code-block-macro-139390.html +defaultLanguageMap = { + "": "none", + actionscript3: "actionscript3", + bash: "bash", + csharp: "csharp", + coldfusion: "coldfusion", + cpp: "cpp", + css: "css", + delphi: "delphi", + diff: "diff", + erlang: "erlang", + groovy: "groovy", + html: "html", + java: "java", + javafx: "javafx", + javascript: "javascript", + js: "javascript", + perl: "perl", + php: "php", + powershell: "powershell", + python: "python", + ruby: "ruby", + scala: "scala", + shell: "bash", + sql: "sql", + vb: "vb", + xml: "xml" +}; + + +/** + * This class is how the marked library translsates markdown into something + * else. + */ +class ConfluenceRenderer { + /** + * Creates a new instance. The `options` parameter control a few + * tweaks that can be applied by the user in order to render better + * markup. + * + * @param {Object} options + */ + constructor(options) { + // Must not save it as `this.options` because marked overwrites + // that property. + this.renderOptions = options; + } + + + /** + * Blockquote. + * + * > This is a blockquote. + * + * is changed into + * + * {quote} + * This is a blockquote. + * {quote} + * + * @param {string} text + * @return {string} + */ + blockquote(text) { + return `{quote}\n${text.trim()}\n{quote}\n\n`; + } + + + /** + * A line break. Supposedly if you have a line with 2 or more spaces + * followed by a line that doesn't have whitespace, then it turns into + * this element. I'm failing to reproduce that scenario. + * + * @return {string} + */ + br() { + return "\n"; + } + + + /** + * Code block. + * + * ```js + * // JavaScript code + * ``` + * + * is changed into + * + * {code:language=javascript|borderStyle=solid|theme=RDark|linenumbers=true|collapse=false} + * // JavaScript code + * {code} + * + * @param {string} text + * @param {string} lang + * @return {string} + */ + code(text, lang) { + var stylingOptions; + + // Simple clone of the options. + stylingOptions = JSON.parse(JSON.stringify(this.renderOptions.codeStyling)); + lang = lang || ""; + lang = lang.toLowerCase(); + lang = this.renderOptions.codeLanguageMap[lang] || this.renderOptions.codeLanguageMap[""]; + + if (lang) { + stylingOptions.language = lang; + } + + // If too big, collapse. + if (text.split("\n").length > this.renderOptions.codeCollapseAt) { + stylingOptions.collapse = true; + } + + // Convert to a string + stylingOptions = querystring.stringify(stylingOptions, "|"); + + if (stylingOptions) { + stylingOptions = `:${stylingOptions}`; + } + + return `{code${stylingOptions}}\n${text}\n{code}\n\n`; + } + + + /** + * Inline code. + * + * Text that has statements, like `a = true` or similar. + * + * turns into + * + * Text that has statements, like {{a = true}} or similar. + * + * @param {string} text + * @return {string} + */ + codespan(text) { + return `{{${text}}}`; + } + + + /** + * Strikethrough. + * + * Supported ~~everywhere~~ in GFM only. + * + * turns into + * + * Supported -everywhere- in GFM only. + * + * @param {string} text + * @return {string} + */ + del(text) { + return `-${text}-`; + } + + + /** + * Emphasis. + * + * Typically this is *italicized* text. + * + * turns into + * + * Typically this is _italicized_ text. + * + * @param {string} text + * @return {string} + */ + em(text) { + return `_${text}_`; + } + + + /** + * Headings 1 through 6. + * + * Heading 1 + * ========= + * + * # Heading 1 alternate + * + * ###### Heading 6 + * + * turns into + * + * h1. Heading 1 + * + * h1. Heading 1 alternate + * + * h6. Heading 6 + * + * @param {string} text + * @param {number} level + * @return {string} + */ + heading(text, level) { + return `h${level}. ${text}\n\n`; + } + + + /** + * Horizontal rule. + * + * --- + * + * turns into + * + * ---- + * + * @return {string} + */ + hr() { + return "----\n\n"; + } + + + /** + * Embedded HTML. + * + *
    + * + * turns into + * + *
    + * + * @param {string} text + * @return {string} + */ + html(text) { + return text; + } + + + /** + * An embedded image. + * + * ![alt-text](image-url) + * + * is changed into + * + * !image-url! + * + * Markdown supports alt text and titles. Confluence does not. + * + * @param {string} href + * @return {string} + */ + image(href) { + href = this.renderOptions.imageRewrite(href); + + return `!${href}!`; + } + + + /** + * Link to another resource. + * + * [Home](/) + * [Home](/ "some title") + * + * turns into + * + * [Home|/] + * [some title|/] + * + * @param {string} href + * @param {string} title + * @param {string} text + * @return {string} + */ + link(href, title, text) { + // Sadly, one must choose if the link's title should be displayed + // or the linked text should be displayed. We picked the linked text. + text = text || title; + + if (text) { + text += "|"; + } + + href = this.renderOptions.linkRewrite(href); + + return `[${text}${href}]`; + } + + + /** + * Converts a list. + * + * # ordered + * * unordered + * + * becomes + * + * # ordered + * #* unordered + * + * Note: This adds an extra "\r" before the list in order to cope + * with nested lists better. When there's a "\r" in a nested list, it + * is translated into a "\n". When the "\r" is left in the converted + * result then it is removed. + * + * @param {string} text + * @param {boolean} ordered + * @return {string} + */ + list(text, ordered) { + text = text.trim(); + + if (ordered) { + text = text.replace(/^\*/gm, "#"); + } + + return `\r${text}\n\n`; + } + + + /** + * Changes a list item. Always marks it as an unordered list, but + * list() will change it back. + * + * @param {string} text + * @return {string} + */ + listitem(text) { + // If a list item has a nested list, it will have a "\r" in the + // text. Turn that "\r" into "\n" but trim out other whitespace + // from the list. + text = text.replace(/\s*$/, "").replace(/\r/g, "\n"); + + // Convert newlines followed by a # or a * into sub-list items + text = text.replace(/\n([*#])/g, "\n*$1"); + + return `* ${text}\n`; + } + + + /** + * A paragraph of text. + * + * @param {string} text + * @return {string} + */ + paragraph(text) { + return `${text}\n\n`; + } + + + /** + * Creates strong text. + * + * This is typically **bolded**. + * + * becomes + * + * This is typically *bolded*. + * + * @param {string} text + * @return {string} + */ + strong(text) { + return `*${text}*`; + } + + + /** + * Renders a table. Most of the work is done in tablecell. + * + * @param {string} header + * @param {string} body + * @return {string} + */ + table(header, body) { + return `${header}${body}\n`; + } + + + /** + * Converts a table cell. When this is a header, the cell is prefixed + * with two bars instead of one. + * + * @param {string} text + * @param {Object} flags + * @return {string} + */ + tablecell(text, flags) { + var boundary; + + if (flags.header) { + boundary = "||"; + } else { + boundary = "|"; + } + + return `${boundary}${text}`; + } + + + /** + * Converts a table row. Most of the work is done in tablecell, however + * that can't tell if the cell is at the end of a row or not. Get the + * first cell's leading boundary and remove the double-boundary marks. + * + * @param {string} text + * @return {string} + */ + tablerow(text) { + var boundary; + + boundary = text.match(/^\|*/); + + if (boundary) { + boundary = boundary[0]; + } else { + boundary = "|"; + } + + return `${text}${boundary}\n`; + } + + + /** + * Simple text. + * + * @param {string} text + * @return {string} + */ + text(text) { + return text; + } +} + + +/** + * Set up a default URI rewriter + * + * @param {string} href + * @return {string} + */ +function defaultHrefRewrite(href) { + return href; +} + +module.exports = (markdown, options) => { + var result; + + // Set defaults. + options = options || {}; + options.marked = options.marked || {}; + options.codeLanguageMap = options.codeLanguageMap || defaultLanguageMap; + options.codeStyling = options.codeStyling || { + theme: "RDark", + linenumbers: true + }; + options.codeCollapseAt = options.codeCollapseAt || 20; + options.linkRewrite = options.linkRewrite || defaultHrefRewrite; + options.imageRewrite = options.imageRewrite || defaultHrefRewrite; + + // Always override this one property. + options.marked.renderer = new ConfluenceRenderer(options); + + // Replace "\r\n" and "\r" with "\n". + markdown = markdown.replace(/\r\n?/g, "\n"); + + // Convert. + result = marked(markdown, options.marked).trim(); + + // Fix the \r placeholder for list beginnings. See list() for more info. + result = result.replace(/\r/g, ""); + + // Remove trailing whitespace. + result = result.trim(); + + return result; +}; + +module.exports.defaultLanguageMap = defaultLanguageMap; diff --git a/package.json b/package.json index 3ed5b00..a88a5c2 100644 --- a/package.json +++ b/package.json @@ -1,43 +1,43 @@ { - "name": "markdown2confluence", - "version": "1.2.0", - "description": "convert markdown to confluence markup", - "main": "index.js", - "scripts": { - "test": "node test.js", - "build": "npm run build-html && npm run build-js", - "build-html": "jade -p node_modules/jade-gist/. < browser/index.jade > browser/index.html", - "build-js": "webpack browser/app.js --output-filename=browser/bundle.js", - "readme": "pretty-readme > readme.md" - }, - "author": "ft", - "license": "ISC", - "dependencies": { - "marked": "^0.3.2", - "min-qs": "^1.3.0", - "min-util": "^2.3.0" - }, - "bin": { - "markdown2confluence": "bin/markdown2confluence.js" - }, - "devDependencies": { - "jade": "^1.11.0", - "jade-gist": "^1.0.3", - "raw-loader": "^0.5.1", - "webpack": "^1.14.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/chunpu/markdown2confluence.git" - }, - "keywords": [ - "markdown", - "confluence", - "markup", - "convert" - ], - "bugs": { - "url": "https://github.com/chunpu/markdown2confluence/issues" - }, - "homepage": "https://github.com/chunpu/markdown2confluence" + "name": "markdown2confluence-cws", + "version": "2.0.0", + "description": "Convert Markdown to Confluence Wiki Markup.", + "main": "lib/index.js", + "scripts": { + "test": "script/test", + "watch": "script/watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/connected-world-services/markdown2confluence-cws.git" + }, + "keywords": [ + "markdown", + "confluence", + "markup", + "convert" + ], + "author": "ft", + "license": "ISC", + "bugs": { + "url": "https://github.com/connected-world-services/markdown2confluence-cws/issues" + }, + "homepage": "https://github.com/connected-world-services/markdown2confluence-cws#readme", + "devDependencies": { + "codecov": "~2.0.2", + "eslint": "~3.17.1", + "istanbul": "~0.4.5", + "jasmine": "~2.5.3", + "nodemon": "~1.11.0" + }, + "dependencies": { + "get-stdin": "~5.0.1", + "marked": "~0.3.6" + }, + "engines": { + "node": ">= 4.0.0" + }, + "bin": { + "markdown2confluence": "bin/markdown2confluence.js" + } } diff --git a/preview.png b/preview.png deleted file mode 100644 index 57e6c9e..0000000 Binary files a/preview.png and /dev/null differ diff --git a/readme.md b/readme.md deleted file mode 100644 index 04f92b5..0000000 --- a/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -markdown2confluence -=== - -[![Build status][travis-image]][travis-url] -[![NPM version][npm-image]][npm-url] -[![Downloads][downloads-image]][downloads-url] -[![Dependency Status][david-image]][david-url] -[npm-image]: https://img.shields.io/npm/v/markdown2confluence.svg?style=flat-square -[npm-url]: https://npmjs.org/package/markdown2confluence -[downloads-image]: http://img.shields.io/npm/dm/markdown2confluence.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/markdown2confluence -[david-image]: http://img.shields.io/david/chunpu/markdown2confluence.svg?style=flat-square -[david-url]: https://david-dm.org/chunpu/markdown2confluence - - -convert markdown to confluence markup - -Installation ---- - -```sh -npm i markdown2confluence -g -``` - -Usage ---- - -```sh -markdown2confluence markdown.md -``` - -or - -Try in browser - -Document ---- - -[Confluence Wiki Markup](https://confluence.atlassian.com/display/CONF42/Confluence+Wiki+Markup) - -![demo preview](./preview.png) - -License ---- - -[![License][license-image]][license-url] - -[travis-image]: https://img.shields.io/travis/chunpu/markdown2confluence.svg?style=flat-square -[travis-url]: https://travis-ci.org/chunpu/markdown2confluence -[license-image]: http://img.shields.io/npm/l/markdown2confluence.svg?style=flat-square -[license-url]: # diff --git a/script/test b/script/test new file mode 100755 index 0000000..d6a78a7 --- /dev/null +++ b/script/test @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Turn on strict mode. +set -eEo pipefail + +# Move to repo root +cd "${0%/*}/.." + +# Add node_modules/.bin to PATH +PATH="$(pwd)/node_modules/.bin:$PATH" +export PATH + +# Run the tests. +istanbul cover jasmine + +# Check the code coverage. +if [[ "$CI" == "true" ]]; then + codecov +elif [[ -d ".git" ]]; then + # Easiest way to generate coverage files and not upload the report + # is to use --dump. + echo "Executing codecov and generating coverage report." + codecov --dump > /dev/null +else + # codecov runs git and hg. If the folder is not under source control, + # codecov breaks with some nasty error. This situation happens during + # deployment, so we just don't worry about coverage during deployment. + echo "Not running code coverage report." +fi + +# Verify the coding standards are enforced. +eslint . + +echo "All tests pass." diff --git a/script/watch b/script/watch new file mode 100755 index 0000000..ec5ef25 --- /dev/null +++ b/script/watch @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Turn on strict mode. +set -eEo pipefail + +# Move to repo root +cd "${0%/*}/.." + +# Add node_modules/.bin to PATH +PATH="$(pwd)/node_modules/.bin:$PATH" +export PATH + +# Set up a watcher +nodemon --exec jasmine diff --git a/spec/lib/index.spec.js b/spec/lib/index.spec.js new file mode 100644 index 0000000..92c300f --- /dev/null +++ b/spec/lib/index.spec.js @@ -0,0 +1,267 @@ +"use strict"; + +var convert; + +convert = require("../../"); + +describe("markdown2confluence", () => { + describe("blockquote", () => { + it("converts a single line quote correctly", () => { + expect(convert(`Paragraph + +> one line quote + +Another paragraph`)).toEqual(`Paragraph + +{quote} +one line quote +{quote} + +Another paragraph`); + }); + it("works on multi-line quotes and multiple quotes", () => { + expect(convert(`> line 1 +> line 2 + +inner text + +> quote 2 +> More quote 2 +> and more`)).toEqual(`{quote} +line 1 +line 2 +{quote} + +inner text + +{quote} +quote 2 +More quote 2 +and more +{quote}`); + }); + }); + describe("br", () => { + // Not really sure how to get the "br" code to trigger. + }); + describe("code", () => { + it("formats with code fences", () => { + expect(convert("```js\nthis is code\n```")).toEqual(`{code:theme=RDark|linenumbers=true|language=javascript} +this is code +{code}`); + }); + it("formats with indentation", () => { + expect(convert(` + // different code +`)).toEqual(`{code:theme=RDark|linenumbers=true|language=none} +// different code +{code}`); + }); + it("uses the language map (lowercased) and code styling options", () => { + expect(convert("```Moo\ncow()```", { + codeLanguageMap: { + moo: "cowspeak" + }, + codeStyling: { + anything: "goes_here" + } + })).toEqual(`{code:anything=goes_here|language=cowspeak} +cow() +{code}`); + }); + it("allows 20 lines before collapsing", () => { + expect(convert("```\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n```", { + codeStyling: {} + })).toEqual("{code:language=none}\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n{code}"); + }); + it("collapses when too big", () => { + expect(convert("```\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n```", { + codeStyling: {} + })).toEqual("{code:language=none|collapse=true}\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n{code}"); + }); + it("collapses at a set number", () => { + expect(convert("```\n1\n2\n3\n```", { + codeStyling: {}, + codeCollapseAt: 2 + })).toEqual("{code:language=none|collapse=true}\n1\n2\n3\n{code}"); + }); + }); + describe("codespan", () => { + it("wraps things in braces", () => { + expect(convert("text `code` text text `code`")).toEqual("text {{code}} text text {{code}}"); + }); + }); + describe("del / strikethrough", () => { + it("converts in GFM", () => { + expect(convert("~~thing~~")).toEqual("-thing-"); + }); + }); + describe("em / italics", () => { + it("converts", () => { + expect(convert("*one* and _two_")).toEqual("_one_ and _two_"); + }); + }); + describe("headings", () => { + it("works on multi-line headings", () => { + expect(convert("multi-line\n====")).toEqual("h1. multi-line"); + }); + it("works on single-line headings", () => { + expect(convert("###### single-line")).toEqual("h6. single-line"); + }); + }); + describe("hr", () => { + it("provides a horizontal rule", () => { + expect(convert("---")).toEqual("----"); + }); + it("adds a blank line", () => { + expect(convert("--------------\nWords here")).toEqual("----\n\nWords here"); + }); + }); + describe("html", () => { + it("embeds HTML", () => { + expect(convert("
    \n
    ")).toEqual("
    \n
    "); + }); + }); + describe("image", () => { + it("embeds an image", () => { + expect(convert("![alt text](image.png \"title\")")).toEqual("!image.png!"); + }); + it("works with referenced links", () => { + expect(convert("![alt text][img]\n[img]: \"title\"")).toEqual("!image.png!"); + }); + it("allows href rewriting", () => { + expect(convert("![alt text](image.png)", { + imageRewrite: (href) => { + return `http://example.com/${href}`; + } + })).toEqual("!http://example.com/image.png!"); + }); + }); + describe("link", () => { + it("embeds a link", () => { + expect(convert("[text](url/ \"title\")")).toEqual("[text|url/]"); + }); + it("embeds a link with a link definition", () => { + expect(convert("[text][ref]\n[ref]: (title)")).toEqual("[text|url/]"); + }); + it("allows href rewriting", () => { + expect(convert("[text](url/)", { + linkRewrite: (href) => { + return `http://example.com/${href}`; + } + })).toEqual("[text|http://example.com/url/]"); + }); + }); + describe("list", () => { + // All of these tests have an extra newline above the list + // because there's really no other way handle nested lists. + // Check the source code for better explanations. + it("converts an unordered, collapsed list", () => { + expect(convert(`Unordered, collapsed + +* one +* two +* three`)).toEqual(`Unordered, collapsed + +* one +* two +* three`); + }); + it("converts an unordered, expanded list", () => { + expect(convert(`Unordered, expanded +* one + +* two + +* three`)).toEqual(`Unordered, expanded + +* one +* two +* three`); + }); + it("converts an ordered, collapsed list", () => { + expect(convert(`Ordered, collapsed + +1. one +2. two +3. three`)).toEqual(`Ordered, collapsed + +# one +# two +# three`); + }); + it("converts an ordered, expanded list", () => { + expect(convert(`Ordered, expanded + +1. one + +2. two + +3. three`)).toEqual(`Ordered, expanded + +# one +# two +# three`); + }); + it("converts a terribly complex list", () => { + expect(convert(`* unordered:1:1 +* unordered:1:2 + 1. ordered:2:1 + 1. ordered:3:1 + 2. ordered:3:2 + 2. ordered:2:2 + * unordered:4:1 + * unordered:4:2 + 3. ordered:2:3 + * unordered:5:1 +* unordered:1:3 + * unordered:6:1 + 1. ordered:7:1 + 2. ordered:7:2 + * unordered:6:2 + * unordered:8:1 + * unordered:8:2 +* unordered:1:4`)).toEqual(`* unordered:1:1 +* unordered:1:2 +*# ordered:2:1 +*## ordered:3:1 +*## ordered:3:2 +*# ordered:2:2 +*#* unordered:4:1 +*#* unordered:4:2 +*# ordered:2:3 +*#* unordered:5:1 +* unordered:1:3 +** unordered:6:1 +**# ordered:7:1 +**# ordered:7:2 +** unordered:6:2 +*** unordered:8:1 +*** unordered:8:2 +* unordered:1:4`); + }); + }); + describe("paragraphs", () => { + it("manages newlines", () => { + expect(convert("line1\n\n\n\nline2")).toEqual("line1\n\nline2"); + }); + }); + describe("strong / bold", () => { + it("converts", () => { + expect(convert("**one** and __two__")).toEqual("*one* and *two*"); + }); + }); + describe("tables", () => { + it("converts a simple table", () => { + expect(convert(`| heading | heading2 | +|---|---| +| cell1 | cell2 |`)).toEqual(`||heading||heading2|| +|cell1|cell2|`); + }); + }); + describe("text", () => { + it("converts plain text", () => { + expect(convert("text\ntext2")).toEqual("text\ntext2"); + }); + }); +}); diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json new file mode 100644 index 0000000..831ce22 --- /dev/null +++ b/spec/support/jasmine.json @@ -0,0 +1,11 @@ +{ + "spec_dir": "spec", + "spec_files": [ + "**/*[sS]pec.js" + ], + "helpers": [ + "helper/**/*.js" + ], + "stopSpecOnExpectationFailure": false, + "random": false +} diff --git a/test.js b/test.js deleted file mode 100644 index 876f921..0000000 --- a/test.js +++ /dev/null @@ -1,14 +0,0 @@ -var md2conflu = require('./') -var assert = require('assert') - -var pairs = [ - ['# h1', 'h1. h1\n\n'] - , ['head1\n===', 'h1. head1\n\n'] - , ['### h3', 'h3. h3\n\n'] -] - -pairs.forEach(function(arr, i) { - assert.equal(md2conflu(arr[0]), arr[1], i + ': ' + arr[0] + ' = ' + arr[1]) -}) - -console.log('all pass!') diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index b1c1c12..0000000 --- a/yarn.lock +++ /dev/null @@ -1,1538 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -abbrev@1: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - -acorn-globals@^1.0.3: - version "1.0.9" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-1.0.9.tgz#55bb5e98691507b74579d0513413217c380c54cf" - dependencies: - acorn "^2.1.0" - -acorn@^1.0.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-1.2.2.tgz#c8ce27de0acc76d896d2b1fad3df588d9e82f014" - -acorn@^2.1.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" - -acorn@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - -anymatch@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" - dependencies: - arrify "^1.0.0" - micromatch "^2.1.5" - -aproba@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" - -are-we-there-yet@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.0 || ^1.1.13" - -arr-diff@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" - dependencies: - arr-flatten "^1.0.1" - -arr-flatten@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" - -array-unique@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" - -arrify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" - -asap@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/asap/-/asap-1.0.0.tgz#b2a45da5fdfa20b0496fc3768cc27c12fa916a7d" - -asn1@~0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" - -assert-plus@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" - -assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - -assert@^1.1.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" - dependencies: - util "0.10.3" - -async-each@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" - -async@^0.9.0: - version "0.9.2" - resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" - -async@^1.3.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - -aws-sign2@~0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" - -aws4@^1.2.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" - -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" - -base64-js@^1.0.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" - dependencies: - tweetnacl "^0.14.3" - -big.js@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" - -binary-extensions@^1.0.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" - -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - -boom@2.x.x: - version "2.10.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" - dependencies: - hoek "2.x.x" - -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - -braces@^1.8.2: - version "1.8.5" - resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" - dependencies: - expand-range "^1.8.1" - preserve "^0.2.0" - repeat-element "^1.1.2" - -browserify-aes@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-0.4.0.tgz#067149b668df31c4b58533e02d01e806d8608e2c" - dependencies: - inherits "^2.0.1" - -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" - dependencies: - pako "~0.2.0" - -buffer-shims@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" - -buffer@^4.9.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - -caseless@~0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - -chalk@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -character-parser@1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-1.2.1.tgz#c0dde4ab182713b919b970959a123ecc1a30fcd6" - -chokidar@^1.0.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" - dependencies: - anymatch "^1.3.0" - async-each "^1.0.0" - glob-parent "^2.0.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^2.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - optionalDependencies: - fsevents "^1.0.0" - -clean-css@^3.1.9: - version "3.4.24" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-3.4.24.tgz#89f5a5e9da37ae02394fe049a41388abbe72c3b5" - dependencies: - commander "2.8.x" - source-map "0.4.x" - -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - -clone@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - -combined-stream@^1.0.5, combined-stream@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" - dependencies: - delayed-stream "~1.0.0" - -commander@2.8.x: - version "2.8.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" - dependencies: - graceful-readlink ">= 1.0.0" - -commander@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - dependencies: - graceful-readlink ">= 1.0.0" - -commander@~2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - -console-browserify@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" - dependencies: - date-now "^0.1.4" - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - -constantinople@~3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/constantinople/-/constantinople-3.0.2.tgz#4b945d9937907bcd98ee575122c3817516544141" - dependencies: - acorn "^2.1.0" - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - -core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - -cou@latest: - version "1.3.0" - resolved "https://registry.yarnpkg.com/cou/-/cou-1.3.0.tgz#4f357957da3f44f759e93614e450ba05e9e00918" - dependencies: - min-is latest - -cryptiles@2.x.x: - version "2.0.5" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" - dependencies: - boom "2.x.x" - -crypto-browserify@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.3.0.tgz#b9fc75bb4a0ed61dcf1cd5dae96eb30c9c3e506c" - dependencies: - browserify-aes "0.4.0" - pbkdf2-compat "2.0.1" - ripemd160 "0.2.0" - sha.js "2.2.6" - -css-parse@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.0.4.tgz#38b0503fbf9da9f54e9c1dbda60e145c77117bdd" - -css-stringify@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/css-stringify/-/css-stringify-1.0.5.tgz#b0d042946db2953bb9d292900a6cb5f6d0122031" - -css@~1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/css/-/css-1.0.8.tgz#9386811ca82bccc9ee7fb5a732b1e2a317c8a3e7" - dependencies: - css-parse "1.0.4" - css-stringify "1.0.5" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - dependencies: - assert-plus "^1.0.0" - -date-now@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" - -debug@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - -decamelize@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -deep-extend@~0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - -domain-browser@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" - -ecc-jsbn@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" - dependencies: - jsbn "~0.1.0" - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - -enhanced-resolve@~0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.2.0" - tapable "^0.1.8" - -errno@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" - dependencies: - prr "~0.0.0" - -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - -events@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" - -expand-brackets@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" - dependencies: - is-posix-bracket "^0.1.0" - -expand-range@^1.8.1: - version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" - dependencies: - fill-range "^2.1.0" - -extend@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" - -extglob@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" - dependencies: - is-extglob "^1.0.0" - -extsprintf@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" - -filename-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" - -fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" - dependencies: - is-number "^2.1.0" - isobject "^2.0.0" - randomatic "^1.1.3" - repeat-element "^1.1.2" - repeat-string "^1.5.2" - -for-in@^0.1.5: - version "0.1.6" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" - -for-own@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" - dependencies: - for-in "^0.1.5" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - -form-data@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.5" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - -fsevents@^1.0.0: - version "1.0.17" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.17.tgz#8537f3f12272678765b4fd6528c0f1f66f8f4558" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.29" - -fstream-ignore@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - -gauge@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - supports-color "^0.2.0" - wide-align "^1.1.0" - -generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" - -getpass@^0.1.1: - version "0.1.6" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" - dependencies: - assert-plus "^1.0.0" - -glob-base@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" - dependencies: - glob-parent "^2.0.0" - is-glob "^2.0.0" - -glob-parent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" - dependencies: - is-glob "^2.0.0" - -glob@^7.0.5: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -graceful-fs@^4.1.2: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - -har-validator@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" - dependencies: - chalk "^1.1.1" - commander "^2.9.0" - is-my-json-valid "^2.12.4" - pinkie-promise "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - -hawk@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" - dependencies: - boom "2.x.x" - cryptiles "2.x.x" - hoek "2.x.x" - sntp "1.x.x" - -hoek@2.x.x: - version "2.16.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" - -http-signature@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" - dependencies: - assert-plus "^0.2.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" - -ieee754@^1.1.4: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" - -indexof@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - -ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" - -interpret@^0.6.4: - version "0.6.6" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-0.6.6.tgz#fecd7a18e7ce5ca6abfb953e1f86213a49f1625b" - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - dependencies: - binary-extensions "^1.0.0" - -is-buffer@^1.0.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" - -is-dotfile@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" - -is-equal-shallow@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" - dependencies: - is-primitive "^2.0.0" - -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - -is-extglob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - dependencies: - number-is-nan "^1.0.0" - -is-glob@^2.0.0, is-glob@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" - dependencies: - is-extglob "^1.0.0" - -is-my-json-valid@^2.12.4: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - -is-number@^2.0.2, is-number@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - dependencies: - kind-of "^3.0.2" - -is-posix-bracket@^0.1.0: - version "0.1.1" - resolved "http://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" - -is-primitive@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" - -is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - -is-promise@~1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-1.0.1.tgz#31573761c057e33c2e91aab9e96da08cefbe76e5" - -is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" - -is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - dependencies: - isarray "1.0.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - -jade-gist@^1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/jade-gist/-/jade-gist-1.0.5.tgz#fa3c6fcb5e10ed7ae2a32fc3bc729e0f9ba9a61a" - -jade@^1.11.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/jade/-/jade-1.11.0.tgz#9c80e538c12d3fb95c8d9bb9559fa0cc040405fd" - dependencies: - character-parser "1.2.1" - clean-css "^3.1.9" - commander "~2.6.0" - constantinople "~3.0.1" - jstransformer "0.0.2" - mkdirp "~0.5.0" - transformers "2.1.0" - void-elements "~2.0.1" - with "~4.0.0" - -jodid25519@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" - dependencies: - jsbn "~0.1.0" - -jsbn@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - -json5@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" - -jsprim@^1.2.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" - dependencies: - extsprintf "1.0.2" - json-schema "0.2.3" - verror "1.3.6" - -jstransformer@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-0.0.2.tgz#7aae29a903d196cfa0973d885d3e47947ecd76ab" - dependencies: - is-promise "^2.0.0" - promise "^6.0.1" - -kind-of@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" - dependencies: - is-buffer "^1.0.2" - -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - -loader-utils@^0.2.11: - version "0.2.16" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" - dependencies: - big.js "^3.1.3" - emojis-list "^2.0.0" - json5 "^0.5.0" - object-assign "^4.0.1" - -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - -marked@^0.3.2: - version "0.3.6" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" - -memory-fs@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" - -memory-fs@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.3.0.tgz#7bcc6b629e3a43e871d7e29aca6ae8a7f15cbb20" - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -micromatch@^2.1.5: - version "2.3.11" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" - dependencies: - arr-diff "^2.0.0" - array-unique "^0.2.1" - braces "^1.8.2" - expand-brackets "^0.1.4" - extglob "^0.3.1" - filename-regex "^2.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.1" - kind-of "^3.0.2" - normalize-path "^2.0.1" - object.omit "^2.0.0" - parse-glob "^3.0.4" - regex-cache "^0.4.2" - -mime-db@~1.26.0: - version "1.26.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" - -mime-types@^2.1.12, mime-types@~2.1.7: - version "2.1.14" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" - dependencies: - mime-db "~1.26.0" - -min-is@latest: - version "2.2.0" - resolved "https://registry.yarnpkg.com/min-is/-/min-is-2.2.0.tgz#2d84ba26b7be7554afd470108f7265d4ce4b39b0" - -min-qs@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/min-qs/-/min-qs-1.3.0.tgz#3e1e50a94238656436748ff8b1da3ac9bde7b05d" - dependencies: - min-util latest - -min-util@^2.3.0, min-util@latest: - version "2.3.0" - resolved "https://registry.yarnpkg.com/min-util/-/min-util-2.3.0.tgz#95b7244de1ad8788cf3f1224dedd689176f64538" - dependencies: - cou latest - -minimatch@^3.0.0, minimatch@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - dependencies: - brace-expansion "^1.0.0" - -minimist@0.0.8, minimist@~0.0.1: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - -"mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - dependencies: - minimist "0.0.8" - -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - -nan@^2.3.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2" - -node-libs-browser@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-0.7.0.tgz#3e272c0819e308935e26674408d7af0e1491b83b" - dependencies: - assert "^1.1.1" - browserify-zlib "^0.1.4" - buffer "^4.9.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "3.3.0" - domain-browser "^1.1.1" - events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" - path-browserify "0.0.0" - process "^0.11.0" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.0.5" - stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.10.3" - vm-browserify "0.0.4" - -node-pre-gyp@^0.6.29: - version "0.6.32" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" - dependencies: - mkdirp "~0.5.1" - nopt "~3.0.6" - npmlog "^4.0.1" - rc "~1.1.6" - request "^2.79.0" - rimraf "~2.5.4" - semver "~5.3.0" - tar "~2.2.1" - tar-pack "~3.3.0" - -nopt@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - dependencies: - abbrev "1" - -normalize-path@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" - -npmlog@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.1" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - -oauth-sign@~0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - -object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - -object.omit@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" - dependencies: - for-own "^0.1.4" - is-extendable "^0.1.1" - -once@^1.3.0, once@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" - dependencies: - wrappy "1" - -optimist@~0.3.5: - version "0.3.7" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.3.7.tgz#c90941ad59e4273328923074d2cf2e7cbc6ec0d9" - dependencies: - wordwrap "~0.0.2" - -optimist@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" - -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" - -parse-glob@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" - dependencies: - glob-base "^0.3.0" - is-dotfile "^1.0.0" - is-extglob "^1.0.0" - is-glob "^2.0.0" - -path-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - -pbkdf2-compat@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288" - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - -preserve@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" - -process-nextick-args@~1.0.6: - version "1.0.7" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" - -process@^0.11.0: - version "0.11.9" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" - -promise@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-6.1.0.tgz#2ce729f6b94b45c26891ad0602c5c90e04c6eef6" - dependencies: - asap "~1.0.0" - -promise@~2.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-2.0.0.tgz#46648aa9d605af5d2e70c3024bf59436da02b80e" - dependencies: - is-promise "~1" - -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - -qs@~6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - -randomatic@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" - dependencies: - is-number "^2.0.2" - kind-of "^3.0.2" - -raw-loader@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" - -rc@~1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" - dependencies: - deep-extend "~0.4.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~1.0.4" - -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readable-stream@~2.1.4: - version "2.1.5" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" - dependencies: - buffer-shims "^1.0.0" - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "~1.0.0" - process-nextick-args "~1.0.6" - string_decoder "~0.10.x" - util-deprecate "~1.0.1" - -readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" - dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" - readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" - -regex-cache@^0.4.2: - version "0.4.3" - resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" - dependencies: - is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" - -repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" - -repeat-string@^1.5.2: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - -request@^2.79.0: - version "2.79.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" - dependencies: - aws-sign2 "~0.6.0" - aws4 "^1.2.1" - caseless "~0.11.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~2.0.6" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - qs "~6.3.0" - stringstream "~0.0.4" - tough-cookie "~2.3.0" - tunnel-agent "~0.4.1" - uuid "^3.0.0" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" - -rimraf@2, rimraf@~2.5.1, rimraf@~2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" - dependencies: - glob "^7.0.5" - -ripemd160@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-0.2.0.tgz#2bf198bde167cacfa51c0a928e84b68bbe171fce" - -semver@~5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" - -set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - -sha.js@2.2.6: - version "2.2.6" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.2.6.tgz#17ddeddc5f722fb66501658895461977867315ba" - -signal-exit@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - -sntp@1.x.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" - dependencies: - hoek "2.x.x" - -source-list-map@~0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106" - -source-map@0.4.x, source-map@~0.4.1: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@~0.1.7: - version "0.1.43" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" - dependencies: - amdefine ">=0.0.4" - -source-map@~0.5.1: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" - -sshpk@^1.7.0: - version "1.10.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - optionalDependencies: - bcrypt-pbkdf "^1.0.0" - ecc-jsbn "~0.1.1" - jodid25519 "^1.0.0" - jsbn "~0.1.0" - tweetnacl "~0.14.0" - -stream-browserify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-http@^2.3.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.6.3.tgz#4c3ddbf9635968ea2cfd4e48d43de5def2625ac3" - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.1.0" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -stringstream@~0.0.4: - version "0.0.5" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - dependencies: - ansi-regex "^2.0.0" - -strip-json-comments@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" - -supports-color@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - -supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - dependencies: - has-flag "^1.0.0" - -tapable@^0.1.8, tapable@~0.1.8: - version "0.1.10" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4" - -tar-pack@~3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" - dependencies: - debug "~2.2.0" - fstream "~1.0.10" - fstream-ignore "~1.0.5" - once "~1.3.3" - readable-stream "~2.1.4" - rimraf "~2.5.1" - tar "~2.2.1" - uid-number "~0.0.6" - -tar@~2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - -timers-browserify@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" - dependencies: - setimmediate "^1.0.4" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - -tough-cookie@~2.3.0: - version "2.3.2" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" - dependencies: - punycode "^1.4.1" - -transformers@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/transformers/-/transformers-2.1.0.tgz#5d23cb35561dd85dc67fb8482309b47d53cce9a7" - dependencies: - css "~1.0.8" - promise "~2.0" - uglify-js "~2.2.5" - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - -tunnel-agent@~0.4.1: - version "0.4.3" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - -uglify-js@~2.2.5: - version "2.2.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.2.5.tgz#a6e02a70d839792b9780488b7b8b184c095c99c7" - dependencies: - optimist "~0.3.5" - source-map "~0.1.7" - -uglify-js@~2.7.3: - version "2.7.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" - dependencies: - async "~0.2.6" - source-map "~0.5.1" - uglify-to-browserify "~1.0.0" - yargs "~3.10.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - -uid-number@~0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - -util@0.10.3, util@^0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - dependencies: - inherits "2.0.1" - -uuid@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" - -verror@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" - dependencies: - extsprintf "1.0.2" - -vm-browserify@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" - dependencies: - indexof "0.0.1" - -void-elements@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" - -watchpack@^0.2.1: - version "0.2.9" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-0.2.9.tgz#62eaa4ab5e5ba35fdfc018275626e3c0f5e3fb0b" - dependencies: - async "^0.9.0" - chokidar "^1.0.0" - graceful-fs "^4.1.2" - -webpack-core@~0.6.9: - version "0.6.9" - resolved "https://registry.yarnpkg.com/webpack-core/-/webpack-core-0.6.9.tgz#fc571588c8558da77be9efb6debdc5a3b172bdc2" - dependencies: - source-list-map "~0.1.7" - source-map "~0.4.1" - -webpack@^1.14.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-1.14.0.tgz#54f1ffb92051a328a5b2057d6ae33c289462c823" - dependencies: - acorn "^3.0.0" - async "^1.3.0" - clone "^1.0.2" - enhanced-resolve "~0.9.0" - interpret "^0.6.4" - loader-utils "^0.2.11" - memory-fs "~0.3.0" - mkdirp "~0.5.0" - node-libs-browser "^0.7.0" - optimist "~0.6.0" - supports-color "^3.1.0" - tapable "~0.1.8" - uglify-js "~2.7.3" - watchpack "^0.2.1" - webpack-core "~0.6.9" - -wide-align@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" - dependencies: - string-width "^1.0.1" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - -with@~4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/with/-/with-4.0.3.tgz#eefd154e9e79d2c8d3417b647a8f14d9fecce14e" - dependencies: - acorn "^1.0.1" - acorn-globals "^1.0.3" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - -xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0"