├── .eslintrc ├── .gitignore ├── .prettierrc ├── .vscode ├── launch.json └── settings.json ├── Readme.md ├── ReadmeSrc ├── Readme.js └── Readme.md ├── index.js ├── package.json ├── src ├── extract.js ├── fileUtilities.js └── mmarkdown.js └── yarn.lock /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": ["eslint:recommended", "plugin:react/recommended"], 4 | "globals": { 5 | "describe": true, 6 | "beforeAll": true, 7 | "beforeEach": true, 8 | "afterAll": true, 9 | "afterEach": true, 10 | "test": true, 11 | "it": true, 12 | "expect": true, 13 | "jest": true, 14 | "window": true, 15 | "process": true, 16 | "module": true, 17 | "Promise": true, 18 | "require": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | ReadmeSrc/backup/* -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "bracketSpacing": false, 4 | "semi": false, 5 | "printWidth": 80 6 | } 7 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Implement Extract", 11 | "program": "${workspaceFolder}/index.js" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "javascript.format.enable": false, 4 | "prettier.eslintIntegration": true, 5 | "npm-scripts.showStartNotification": false 6 | } 7 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | # mmarkdown 4 | 5 | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/05044458973941749858f50e71effe25)](https://app.codacy.com/app/albinotonnina/mmarkdown?utm_source=github.com&utm_medium=referral&utm_content=albinotonnina/mmarkdown&utm_campaign=badger) 6 | 7 | > Markdown on caffeine ☕️ 8 | 9 | Interpret `mmd` fenced code blocks in a markdown file and generate a cooler version of it. 10 | 11 | ### `mmd` fenced code block 12 | 13 | 14 | 15 | ### output: 16 | 17 | #### Hello Jessie 18 | 19 | ## Table of Contents 20 | 21 | * [Demo](#demo--boilerplate--real-world-case) 22 | * [Install](#install) 23 | * [Usage](#usage) 24 | * [Maintainers](#maintainers) 25 | * [Contribute](#contribute) 26 | * [License](#license) 27 | 28 | ## Demo / Boilerplate / Real world case 29 | 30 | The file you are reading right now is generated from [this file](./ReadmeSrc/Readme.md). 31 | 32 | For a kind of boilerplate repo instead, have a look at [this repo](https://github.com/albinotonnina/mmarkdown-demo). 33 | 34 | 🌎[MicheleBertoli/css-in-js](https://github.com/MicheleBertoli/css-in-js) 35 | 36 | 🌎[streamich/cross-ci](https://github.com/streamich/cross-ci) 37 | 38 | ## Install 39 | 40 | ``` 41 | yarn add mmarkdown --dev 42 | ``` 43 | 44 | ### Config package.json (defaults) 45 | 46 | ``` 47 | { 48 | "mmarkdown": { 49 | "src": "./Readme/Readme.md", 50 | "out": "./Readme.md", 51 | "scripts": "./Readme/Readme.js", 52 | "backup": "true", 53 | "backupPath": "./Readme/backup/" 54 | } 55 | } 56 | ``` 57 | 58 | ``` 59 | { 60 | "scripts":{ 61 | "make-readme": "mmarkdown" 62 | } 63 | } 64 | ``` 65 | 66 | ### Command line arguments 67 | 68 | | argument | description | default | 69 | | ---------- | ------------------------------ | --------------------- | 70 | | src | Source md file | ./ReadmeSrc/Readme.md | 71 | | out | Output md file | ./Readme.md | 72 | | scripts | Helper JS file | ./ReadmeSrc/Readme.js | 73 | | backup | Do a backup of the output file | false | 74 | | backupPath | backup path | ./ReadmeSrc/backup/ | 75 | | help | Show help | | 76 | | version | Show version number | | 77 | 78 | ``` 79 | { 80 | "scripts":{ 81 | "make-readme": "mmarkdown --backup --backupPath ./backupReadme/" 82 | } 83 | } 84 | ``` 85 | 86 | ## Usage 87 | 88 | Mmarkdown takes a plain markdown file and generates a copy of it. 89 | 90 | It starts to be less boring when you add [fenced code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) with the language identifier set to `mmd`. 91 | 92 | Everything that is returned (as a string) from the code in a block will be interpreted and replaced to the block in the output file. 93 | 94 | It's full async, which is cool, _lots of `awaits` are waiting for you_ there but soon enough you will face a problem: too much code to write in a markdown file! Terrible experience! 95 | 96 | The solution in mmarkdown is in the `scripts` option. The module that the scripts file returns will be passed to the context of the fenced block, see [example 3](#example3). 97 | 98 | The `backup` option, false by default, will make a copy of the current output file, postfix it with a timestamp and move it into `backupPath`. 99 | 100 | ### Example 1 101 | 102 | #### `mmd` fenced code block: 103 | 104 | ```javascript 105 | const hello = message => { 106 | return message 107 | } 108 | 109 | return hello('### hippieeeeee hippie yeeeee!!!!!!!!') 110 | ``` 111 | 112 | #### output: 113 | 114 | ### hippieeeeee hippie yeeeee!!!!!!!! 115 | 116 | ### Example 2 117 | 118 | #### `mmd` fenced code block: 119 | 120 | ```javascript 121 | const array = [1, 3, 5] 122 | 123 | return array.map(item => '#### ' + item).join('\n\n') 124 | ``` 125 | 126 | #### output: 127 | 128 | #### 1 129 | 130 | #### 3 131 | 132 | #### 5 133 | 134 | ### Example 3, with Scripts 135 | 136 | [this script file ](./ReadmeSrc/Readme.js) is passed to mmarkdown with the `scripts` option: 137 | 138 | ```javascript 139 | module.exports = { 140 | processMyArray: async array => 141 | new Promise(resolve => { 142 | setTimeout(() => { 143 | resolve( 144 | array.map(item => ({ 145 | name: item + ' async' 146 | })) 147 | ) 148 | }, 1000) 149 | }) 150 | } 151 | ``` 152 | 153 | #### mmd fenced code block: 154 | 155 | ```javascript 156 | //scripts is passed 157 | 158 | const array = [1, 3, 5] 159 | 160 | const something = await scripts.processMyArray(array) 161 | 162 | const myFinalString = something.map(item => '#### ' + item.name) 163 | .join('\n\n') 164 | 165 | return myFinalString 166 | ``` 167 | 168 | #### output: 169 | 170 | #### 1 async 171 | 172 | #### 3 async 173 | 174 | #### 5 async 175 | 176 | (The setTimeout is there just for demo purposes) 177 | 178 | 179 | 180 | ## Maintainers 181 | 182 | [@albinotonnina](https://github.com/albinotonnina) 183 | 184 | ## Contribute 185 | 186 | PRs accepted. 187 | 188 | ## License 189 | 190 | MIT © 2018 Albino Tonnina 191 | -------------------------------------------------------------------------------- /ReadmeSrc/Readme.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | foo: 'bar', 3 | processMyArray: async array => 4 | new Promise(resolve => { 5 | setTimeout(() => { 6 | resolve( 7 | array.map(item => ({ 8 | name: item + ' async' 9 | })) 10 | ) 11 | }, 1000) 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /ReadmeSrc/Readme.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | # mmarkdown 4 | 5 | > Markdown on caffeine ☕️ 6 | 7 | Interpret `mmd` fenced code blocks in a markdown file and generate a cooler version of it. 8 | 9 | ### `mmd` fenced code block 10 | 11 | 12 | 13 | ### output: 14 | 15 | ```mmd 16 | const name = 'Jessie'; 17 | const hello = '#### Hello '; 18 | 19 | return hello + name; 20 | ``` 21 | 22 | ## Table of Contents 23 | 24 | * [Demo](#demo--boilerplate--real-world-case) 25 | * [Install](#install) 26 | * [Usage](#usage) 27 | * [Maintainers](#maintainers) 28 | * [Contribute](#contribute) 29 | * [License](#license) 30 | 31 | ## Demo / Boilerplate / Real world case 32 | 33 | The file you are reading right now is generated from [this file](./ReadmeSrc/Readme.md). 34 | 35 | For a kind of boilerplate repo instead, have a look at [this repo](https://github.com/albinotonnina/mmarkdown-demo). 36 | 37 | 🌎[MicheleBertoli/css-in-js](https://github.com/MicheleBertoli/css-in-js) 38 | 39 | 🌎[streamich/cross-ci](https://github.com/streamich/cross-ci) 40 | 41 | ## Install 42 | 43 | ``` 44 | yarn add mmarkdown --dev 45 | ``` 46 | 47 | ### Config package.json (defaults) 48 | 49 | ``` 50 | { 51 | "mmarkdown": { 52 | "src": "./Readme/Readme.md", 53 | "out": "./Readme.md", 54 | "scripts": "./Readme/Readme.js", 55 | "backup": "true", 56 | "backupPath": "./Readme/backup/" 57 | } 58 | } 59 | ``` 60 | 61 | ``` 62 | { 63 | "scripts":{ 64 | "make-readme": "markdown" 65 | } 66 | } 67 | ``` 68 | 69 | ### Command line arguments 70 | 71 | | argument | description | default | 72 | | ---------- | ------------------------------ | --------------------- | 73 | | src | Source md file | ./ReadmeSrc/Readme.md | 74 | | out | Output md file | ./Readme.md | 75 | | scripts | Helper JS file | ./ReadmeSrc/Readme.js | 76 | | backup | Do a backup of the output file | false | 77 | | backupPath | backup path | ./ReadmeSrc/backup/ | 78 | | help | Show help | | 79 | | version | Show version number | | 80 | 81 | ``` 82 | { 83 | "scripts":{ 84 | "make-readme": "markdown --backup --backupPath ./backupReadme/" 85 | } 86 | } 87 | ``` 88 | 89 | ## Usage 90 | 91 | Mmarkdown takes a plain markdown file and generates a copy of it. 92 | 93 | It starts to be less boring when you add [fenced code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) with the language identifier set to `mmd`. 94 | 95 | Everything that is returned (as a string) from the code in a block will be interpreted and replaced to the block in the output file. 96 | 97 | It's full async, which is cool, _lots of `awaits` are waiting for you_ there but soon enough you will face a problem: too much code to write in a markdown file! Terrible experience! 98 | 99 | The solution in mmarkdown is in the `scripts` option. The module that the scripts file returns will be passed to the context of the fenced block, see [example 3](#example3). 100 | 101 | The `backup` option, false by default, will make a copy of the current output file, postfix it with a timestamp and move it into `backupPath`. 102 | 103 | ### Example 1 104 | 105 | #### `mmd` fenced code block: 106 | 107 | ```javascript 108 | const hello = message => { 109 | return message 110 | } 111 | 112 | return hello('### hippieeeeee hippie yeeeee!!!!!!!!') 113 | ``` 114 | 115 | #### output: 116 | 117 | ```mmd 118 | const hello = message => { 119 | return message 120 | } 121 | 122 | return hello('### hippieeeeee hippie yeeeee!!!!!!!!') 123 | ``` 124 | 125 | ### Example 2 126 | 127 | #### `mmd` fenced code block: 128 | 129 | ```javascript 130 | const array = [1, 3, 5] 131 | 132 | return array.map(item => '#### ' + item).join('\n\n') 133 | ``` 134 | 135 | #### output: 136 | 137 | ```mmd 138 | const array = [1, 3, 5] 139 | 140 | return array.map(item => '#### ' + item).join('\n\n') 141 | ``` 142 | 143 | ### Example 3, with Scripts 144 | 145 | [this script file ](./ReadmeSrc/Readme.js) is passed to mmarkdown with the `scripts` option: 146 | 147 | ```javascript 148 | module.exports = { 149 | processMyArray: async array => 150 | new Promise(resolve => { 151 | setTimeout(() => { 152 | resolve( 153 | array.map(item => ({ 154 | name: item + ' async' 155 | })) 156 | ) 157 | }, 1000) 158 | }) 159 | } 160 | ``` 161 | 162 | #### mmd fenced code block: 163 | 164 | ```javascript 165 | //scripts is passed 166 | 167 | const array = [1, 3, 5] 168 | 169 | const something = await scripts.processMyArray(array) 170 | 171 | const myFinalString = something.map(item => '#### ' + item.name) 172 | .join('\n\n') 173 | 174 | return myFinalString 175 | ``` 176 | 177 | #### output: 178 | 179 | ```mmd 180 | const array = [1, 3, 5] 181 | 182 | const something = await scripts.processMyArray(array) 183 | 184 | const myFinalString = something.map(item => '#### ' + item.name) 185 | .join('\n\n') 186 | 187 | return myFinalString 188 | ``` 189 | 190 | (The setTimeout is there just for demo purposes) 191 | 192 | 193 | 194 | ## Maintainers 195 | 196 | [@albinotonnina](https://github.com/albinotonnina) 197 | 198 | ## Contribute 199 | 200 | PRs accepted. 201 | 202 | ## License 203 | 204 | MIT © 2018 Albino Tonnina 205 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const mmarkdown = require('./src/mmarkdown') 4 | 5 | const argv = require('yargs') 6 | .pkgConf('mmarkdown') 7 | .default('src', './ReadmeSrc/Readme.md') 8 | .default('out', './Readme.md') 9 | .default('backup', false) 10 | .default('backupPath', './ReadmeSrc/backup/') 11 | .default('scripts', null).argv 12 | 13 | const app = async options => { 14 | try { 15 | await mmarkdown(options) 16 | console.log('Success!') 17 | } catch (err) { 18 | throw 'could not really make it, caaause: ' + err 19 | } 20 | } 21 | 22 | app(argv) 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mmarkdown", 3 | "version": "1.0.0", 4 | "description": "Caffeinated markdown", 5 | "main": "index.js", 6 | "bin": { 7 | "mmarkdown": "index.js" 8 | }, 9 | "files": [ 10 | "src" 11 | ], 12 | "scripts": { 13 | "start": "node index.js", 14 | "help": "node index.js --help", 15 | "test": "echo \"Error: no test specified\" && exit 1" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/albinotonnina/mmarkdown.git" 20 | }, 21 | "author": "Albino Tonnina (http://www.albinotonnina.com)", 22 | "license": "ISC", 23 | "bugs": { 24 | "url": "https://github.com/albinotonnina/mmarkdown/issues" 25 | }, 26 | "homepage": "https://github.com/albinotonnina/mmarkdown#readme", 27 | "dependencies": { 28 | "fs-extra": "^5.0.0", 29 | "path-extra": "^4.2.1", 30 | "yargs": "^11.0.0" 31 | }, 32 | "mmarkdown": { 33 | "src": "./ReadmeSrc/Readme.md", 34 | "out": "./Readme.md", 35 | "scripts": "./ReadmeSrc/Readme.js", 36 | "backup": "true", 37 | "backupPath": "./ReadmeSrc/backup/" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/extract.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const path = require('path') 3 | 4 | const CWD = process.cwd() 5 | 6 | const fencedBlockRegex = /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/gm 7 | 8 | const idRegex = /(__FENCED\d+__)/g 9 | 10 | const createBlock = function(o) { 11 | return '```' + o.lang + '\n' + o.code + '\n```\n' 12 | } 13 | 14 | const id = i => '__FENCED' + i + '__' 15 | 16 | const codeBlocks = function(str) { 17 | if (typeof str !== 'string') { 18 | throw new TypeError('expected a string') 19 | } 20 | 21 | let blocks = [] 22 | let match = null 23 | 24 | while ((match = fencedBlockRegex.exec(str))) { 25 | blocks.push({ 26 | start: match.index, 27 | end: match.index + match[1].length, 28 | lang: match[2] || '', 29 | code: match[3], 30 | block: match.input 31 | }) 32 | } 33 | return blocks 34 | } 35 | 36 | const stripBlocks = function(str) { 37 | const arr = str.match(fencedBlockRegex) || [] 38 | return arr.reduce((acc, match, i) => acc.replace(match, id(i)), str) 39 | } 40 | 41 | const parseBlocks = str => { 42 | const text = stripBlocks(str) 43 | const blocks = codeBlocks(str) 44 | const markers = text.match(idRegex) || [] 45 | 46 | return {text, blocks, markers} 47 | } 48 | 49 | const injectBlocks = async (str, o, jsFile) => { 50 | const fenceBlocks = str.match(idRegex) || [] 51 | const scriptsFile = jsFile ? require(path.join(CWD, jsFile)) : {} 52 | const AsyncFunction = Object.getPrototypeOf(async function() {}).constructor 53 | 54 | const reducer = async (acc, match, i) => { 55 | const block = o[i] 56 | const _acc = await acc 57 | 58 | const output = 59 | block.lang === 'mmd' 60 | ? (await new AsyncFunction('scripts', block.code)(scriptsFile)) + '\n' 61 | : createBlock(block) 62 | 63 | return Promise.resolve(_acc.replace(match, output + '\n')) 64 | } 65 | 66 | return await fenceBlocks.reduce(reducer, str) 67 | } 68 | 69 | module.exports = { 70 | parseBlocks, 71 | injectBlocks 72 | } 73 | -------------------------------------------------------------------------------- /src/fileUtilities.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | 3 | const readFile = (path, opts = 'utf8') => 4 | new Promise((res, rej) => { 5 | fs.readFile(path, opts, (err, data) => { 6 | if (err) rej(err) 7 | else res(data) 8 | }) 9 | }) 10 | 11 | const writeFile = (path, data, opts = 'utf8') => 12 | new Promise((res, rej) => { 13 | fs.writeFile(path, data, opts, err => { 14 | if (err) rej(err) 15 | else res() 16 | }) 17 | }) 18 | 19 | module.exports = { 20 | readFile, 21 | writeFile 22 | } 23 | -------------------------------------------------------------------------------- /src/mmarkdown.js: -------------------------------------------------------------------------------- 1 | const path = require('path-extra') 2 | const fs = require('fs-extra') 3 | const files = require('./fileUtilities') 4 | const extract = require('./extract') 5 | 6 | const backup = async argv => { 7 | try { 8 | const backupFileName = path.fileNameWithPostfix( 9 | argv.out, 10 | '-' + Math.round(new Date().getTime() / 1000) 11 | ) 12 | await fs.copy(argv.out, argv.backupPath + backupFileName) 13 | } catch (err) { 14 | // throw 'backup: ' + err 15 | // if ENOENT we should return ok. 16 | return 17 | } 18 | } 19 | 20 | const save = async argv => { 21 | try { 22 | const data = await files.readFile(argv.src) 23 | const code = extract.parseBlocks(data) 24 | 25 | const str = await extract.injectBlocks(code.text, code.blocks, argv.scripts) 26 | await files.writeFile(argv.out, str) 27 | } catch (err) { 28 | throw 'save: ' + err 29 | } 30 | } 31 | 32 | const mmarkdown = async argv => { 33 | try { 34 | if (argv.backup) { 35 | await backup(argv) 36 | } 37 | await save(argv) 38 | } catch (err) { 39 | throw 'mmarkdown: ' + err 40 | } 41 | } 42 | 43 | module.exports = mmarkdown 44 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | ansi-regex@^2.0.0: 6 | version "2.1.1" 7 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 8 | 9 | ansi-regex@^3.0.0: 10 | version "3.0.0" 11 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 12 | 13 | camelcase@^4.1.0: 14 | version "4.1.0" 15 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" 16 | 17 | cliui@^4.0.0: 18 | version "4.0.0" 19 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" 20 | dependencies: 21 | string-width "^2.1.1" 22 | strip-ansi "^4.0.0" 23 | wrap-ansi "^2.0.0" 24 | 25 | code-point-at@^1.0.0: 26 | version "1.1.0" 27 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 28 | 29 | cross-spawn@^5.0.1: 30 | version "5.1.0" 31 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" 32 | dependencies: 33 | lru-cache "^4.0.1" 34 | shebang-command "^1.2.0" 35 | which "^1.2.9" 36 | 37 | decamelize@^1.1.1: 38 | version "1.2.0" 39 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" 40 | 41 | escape-string-regexp@^1.0.5: 42 | version "1.0.5" 43 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 44 | 45 | execa@^0.7.0: 46 | version "0.7.0" 47 | resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" 48 | dependencies: 49 | cross-spawn "^5.0.1" 50 | get-stream "^3.0.0" 51 | is-stream "^1.1.0" 52 | npm-run-path "^2.0.0" 53 | p-finally "^1.0.0" 54 | signal-exit "^3.0.0" 55 | strip-eof "^1.0.0" 56 | 57 | find-up@^2.1.0: 58 | version "2.1.0" 59 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 60 | dependencies: 61 | locate-path "^2.0.0" 62 | 63 | fs-extra@^5.0.0: 64 | version "5.0.0" 65 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" 66 | dependencies: 67 | graceful-fs "^4.1.2" 68 | jsonfile "^4.0.0" 69 | universalify "^0.1.0" 70 | 71 | get-caller-file@^1.0.1: 72 | version "1.0.2" 73 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" 74 | 75 | get-stream@^3.0.0: 76 | version "3.0.0" 77 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" 78 | 79 | graceful-fs@^4.1.2, graceful-fs@^4.1.6: 80 | version "4.1.11" 81 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 82 | 83 | invert-kv@^1.0.0: 84 | version "1.0.0" 85 | resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" 86 | 87 | is-fullwidth-code-point@^1.0.0: 88 | version "1.0.0" 89 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 90 | dependencies: 91 | number-is-nan "^1.0.0" 92 | 93 | is-fullwidth-code-point@^2.0.0: 94 | version "2.0.0" 95 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 96 | 97 | is-stream@^1.1.0: 98 | version "1.1.0" 99 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 100 | 101 | isexe@^2.0.0: 102 | version "2.0.0" 103 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 104 | 105 | jsonfile@^4.0.0: 106 | version "4.0.0" 107 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" 108 | optionalDependencies: 109 | graceful-fs "^4.1.6" 110 | 111 | lcid@^1.0.0: 112 | version "1.0.0" 113 | resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" 114 | dependencies: 115 | invert-kv "^1.0.0" 116 | 117 | locate-path@^2.0.0: 118 | version "2.0.0" 119 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 120 | dependencies: 121 | p-locate "^2.0.0" 122 | path-exists "^3.0.0" 123 | 124 | lru-cache@^4.0.1: 125 | version "4.1.2" 126 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" 127 | dependencies: 128 | pseudomap "^1.0.2" 129 | yallist "^2.1.2" 130 | 131 | mem@^1.1.0: 132 | version "1.1.0" 133 | resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" 134 | dependencies: 135 | mimic-fn "^1.0.0" 136 | 137 | mimic-fn@^1.0.0: 138 | version "1.2.0" 139 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" 140 | 141 | npm-run-path@^2.0.0: 142 | version "2.0.2" 143 | resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" 144 | dependencies: 145 | path-key "^2.0.0" 146 | 147 | number-is-nan@^1.0.0: 148 | version "1.0.1" 149 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 150 | 151 | os-locale@^2.0.0: 152 | version "2.1.0" 153 | resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" 154 | dependencies: 155 | execa "^0.7.0" 156 | lcid "^1.0.0" 157 | mem "^1.1.0" 158 | 159 | p-finally@^1.0.0: 160 | version "1.0.0" 161 | resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" 162 | 163 | p-limit@^1.1.0: 164 | version "1.2.0" 165 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" 166 | dependencies: 167 | p-try "^1.0.0" 168 | 169 | p-locate@^2.0.0: 170 | version "2.0.0" 171 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 172 | dependencies: 173 | p-limit "^1.1.0" 174 | 175 | p-try@^1.0.0: 176 | version "1.0.0" 177 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" 178 | 179 | path-exists@^3.0.0: 180 | version "3.0.0" 181 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 182 | 183 | path-extra@^4.2.1: 184 | version "4.2.1" 185 | resolved "https://registry.yarnpkg.com/path-extra/-/path-extra-4.2.1.tgz#c792f63109c51b79314a93fa34ab09dfc0dc1a33" 186 | dependencies: 187 | escape-string-regexp "^1.0.5" 188 | replace-ext "^1.0.0" 189 | 190 | path-key@^2.0.0: 191 | version "2.0.1" 192 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" 193 | 194 | prettier@^1.12.1: 195 | version "1.12.1" 196 | resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" 197 | 198 | pseudomap@^1.0.2: 199 | version "1.0.2" 200 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 201 | 202 | replace-ext@^1.0.0: 203 | version "1.0.0" 204 | resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" 205 | 206 | require-directory@^2.1.1: 207 | version "2.1.1" 208 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" 209 | 210 | require-main-filename@^1.0.1: 211 | version "1.0.1" 212 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" 213 | 214 | set-blocking@^2.0.0: 215 | version "2.0.0" 216 | resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" 217 | 218 | shebang-command@^1.2.0: 219 | version "1.2.0" 220 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 221 | dependencies: 222 | shebang-regex "^1.0.0" 223 | 224 | shebang-regex@^1.0.0: 225 | version "1.0.0" 226 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 227 | 228 | signal-exit@^3.0.0: 229 | version "3.0.2" 230 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 231 | 232 | string-width@^1.0.1: 233 | version "1.0.2" 234 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 235 | dependencies: 236 | code-point-at "^1.0.0" 237 | is-fullwidth-code-point "^1.0.0" 238 | strip-ansi "^3.0.0" 239 | 240 | string-width@^2.0.0, string-width@^2.1.1: 241 | version "2.1.1" 242 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 243 | dependencies: 244 | is-fullwidth-code-point "^2.0.0" 245 | strip-ansi "^4.0.0" 246 | 247 | strip-ansi@^3.0.0, strip-ansi@^3.0.1: 248 | version "3.0.1" 249 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 250 | dependencies: 251 | ansi-regex "^2.0.0" 252 | 253 | strip-ansi@^4.0.0: 254 | version "4.0.0" 255 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 256 | dependencies: 257 | ansi-regex "^3.0.0" 258 | 259 | strip-eof@^1.0.0: 260 | version "1.0.0" 261 | resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" 262 | 263 | universalify@^0.1.0: 264 | version "0.1.1" 265 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" 266 | 267 | which-module@^2.0.0: 268 | version "2.0.0" 269 | resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" 270 | 271 | which@^1.2.9: 272 | version "1.3.0" 273 | resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" 274 | dependencies: 275 | isexe "^2.0.0" 276 | 277 | wrap-ansi@^2.0.0: 278 | version "2.1.0" 279 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" 280 | dependencies: 281 | string-width "^1.0.1" 282 | strip-ansi "^3.0.1" 283 | 284 | y18n@^3.2.1: 285 | version "3.2.1" 286 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" 287 | 288 | yallist@^2.1.2: 289 | version "2.1.2" 290 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" 291 | 292 | yargs-parser@^9.0.2: 293 | version "9.0.2" 294 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" 295 | dependencies: 296 | camelcase "^4.1.0" 297 | 298 | yargs@^11.0.0: 299 | version "11.0.0" 300 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" 301 | dependencies: 302 | cliui "^4.0.0" 303 | decamelize "^1.1.1" 304 | find-up "^2.1.0" 305 | get-caller-file "^1.0.1" 306 | os-locale "^2.0.0" 307 | require-directory "^2.1.1" 308 | require-main-filename "^1.0.1" 309 | set-blocking "^2.0.0" 310 | string-width "^2.0.0" 311 | which-module "^2.0.0" 312 | y18n "^3.2.1" 313 | yargs-parser "^9.0.2" 314 | --------------------------------------------------------------------------------