From 5150caa4ac9ab20694c4d1938c71f85934cbf89d Mon Sep 17 00:00:00 2001 From: Serge Shkurko Date: Mon, 30 Jul 2018 11:38:40 +0500 Subject: [PATCH] Add support webpack via using npm or yarn --- .travis.yml | 3 +- Changelog.md | 5 + README.md | 20 +- bemto_webpack.pug | 554 ++++++++++++++++++++++++++++++++++++++++++++++ concat.js | 28 +++ package.json | 15 +- yarn.lock | 534 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1152 insertions(+), 7 deletions(-) create mode 100644 bemto_webpack.pug create mode 100644 concat.js create mode 100644 yarn.lock diff --git a/.travis.yml b/.travis.yml index 20fd86b..393e49c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ language: node_js node_js: - - 0.10 + - 8.11 + - 10.7 diff --git a/Changelog.md b/Changelog.md index e005c51..1e46c3e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # Bemto changelog +## v2.2.0 (2018-07-30) + +- Added support webpack, #96. +- Update dependencies. + ## v2.1.0 (2016-12-26) - Added support for prefix objects. diff --git a/README.md b/README.md index 29ccc03..98929ad 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,25 @@ include bemto/bemto.pug ``` -3. Use it: +### Or install via npm / yarn + +1. Install `bemto` to your project: + + ```sh + # via npm + npm i bemto -D + + # via yarn + yarn add bemto -D + ``` + +2. Include it in your `.pug` project: + + ```Pug + include (path to node_modules, for example: ../../)node_modules/bemto.pug/bemto_webpack + ``` + +### Use it: ```Pug +b.block1 diff --git a/bemto_webpack.pug b/bemto_webpack.pug new file mode 100644 index 0000000..e255f9a --- /dev/null +++ b/bemto_webpack.pug @@ -0,0 +1,554 @@ +//- bemto +//- Copyright(c) 2012 Roman Komarov +//- MIT Licensed + +//- Some global variables +- var bemto_chain = [] +- var bemto_chain_contexts = ['block'] + +//- Block +mixin b(options) + - var settings = get_bemto_settings() + //- TODO: should we make it generic way for other settings too? + if options && options.prefix !== undefined + - settings.prefix = options.prefix + + //- Rewriting the class for elements and modifiers + - var tag = options && options.tag || ( typeof options == 'string' ? options : '') + - var isElement = options && options.isElement + - var tagMetadata = options && options.metadata + - var block_sets_context = false + if attributes.class + //- Creating and normalizing bemto classes + - var bemto_classes = attributes.class + if bemto_classes instanceof Array + - bemto_classes = bemto_classes.join(' ') + - bemto_classes = bemto_classes.split(' ') + + + - var bemto_objects = [] + - var is_first_object = true + - var new_context = [] + + each klass, i in bemto_classes + - var bemto_object = {} + - var prev_object = bemto_objects[bemto_objects.length - 1] + - var sets_context = false + + //- Catching the optional tag class + if klass.match(/^[A-Z-]+[A-Z0-9-]?$/) + - tag = klass.toLowerCase() + - continue + + + //- Use block as a context for the first class if we're at element + if is_first_object && isElement + - bemto_object['context'] = bemto_chain[bemto_chain.length - 1] + + + //- If the class is a modifier, add it to the previous object + - var modifier_class = klass.match(new RegExp('^(?!' + settings['element'] + '[A-Za-z0-9])' + settings['modifier'] + "(.+)$")) + //- FIXME: `+b._mod._mod` — raw classes should be treated as raw ones + if modifier_class && prev_object && prev_object.name + if !prev_object['modifiers'] + - prev_object['modifiers'] = [] + - prev_object.modifiers.push(modifier_class[1]) + - continue + + + //- Use block as a context for the following classes if we have element delimiter at the start + - var element_class = klass.match(new RegExp('^(?!' + settings['modifier'] + '[A-Za-z0-9])' + settings['element'] + "(.+)$")) + if element_class + - bemto_object['context'] = bemto_chain[bemto_chain.length - 1] + - klass = element_class[1] + + + //- Set custom context for nested items + - var name_with_context = klass.match(new RegExp('^(.*[A-Za-z0-9])(?!' + settings['modifier'] + "$)" + settings['element'] + "$")) + if name_with_context + - klass = name_with_context[1] + - bemto_object['is_context'] = true + - sets_context = true + - block_sets_context = true + - isElement = false + + + //- Apply the modifier from the classname if exist + - var name_with_modifier = klass.match(new RegExp('^(.*?[A-Za-z0-9])(?!' + settings['element'] + '[A-Za-z0-9])' + settings['modifier'] + "(.+)$")) + if name_with_modifier + - klass = name_with_modifier[1] + + if !bemto_object['modifiers'] + - bemto_object['modifiers'] = [] + - bemto_object.modifiers.push(name_with_modifier[2]) + + - var found_prefix = '' + - var prefix_regex_string = '()?' + if settings.prefix + - var prefix = settings.prefix + if typeof prefix === 'string' + - prefix = { '': prefix } + + - var prefix_regex_test = [] + if prefix instanceof Object + each value, key in prefix + if typeof key === 'string' && key != '' && prefix_regex_test.indexOf(key) == -1 + - prefix_regex_test.push(key) + if typeof value === 'string' && value != '' && prefix_regex_test.indexOf(value) == -1 + - prefix_regex_test.push(value) + + - prefix_regex_string = '(' + prefix_regex_test.join('|') + ')?' + + - var name_with_prefix = klass.match(new RegExp('^' + prefix_regex_string + "([A-Za-z0-9]+.*)$")) + if name_with_prefix + - klass = name_with_prefix[2] + - found_prefix = name_with_prefix[1] || '' + - found_prefix = prefix[found_prefix] + if found_prefix === undefined || found_prefix === true + - found_prefix = name_with_prefix[1] + - bemto_object['prefix'] = (found_prefix || '').replace(/\-/g, '%DASH%').replace(/\_/g, '%UNDERSCORE%') + + + if sets_context && klass.match(/^[a-zA-Z0-9]+.*/) + - new_context.push(bemto_object.context ? (bemto_object.context + settings['element'] + klass) : (bemto_object.prefix + klass)) + + - bemto_object['name'] = klass + - is_first_object = false + + if bemto_object.context && bemto_object.context.length > 1 + each subcontext, i in bemto_object.context + - var sub_object = clone(bemto_object) + - sub_object['context'] = [subcontext] + - bemto_objects.push(sub_object) + else + - bemto_objects.push(bemto_object) + + //- If no custom context is set, use the first proper object + if !isElement && !new_context.length && bemto_objects[0] && bemto_objects[0].name && bemto_objects[0].name.match(/^[a-zA-Z0-9]+.*/) + - bemto_objects[0]['is_context'] = true + - new_context.push(bemto_objects[0].context ? (bemto_objects[0].context + settings['element'] + bemto_objects[0].name) : (bemto_objects[0].prefix + bemto_objects[0].name)) + - block_sets_context = true + + if new_context.length + //- Use only the block's name for context if we're at strict setting + if settings.flat_elements + each subcontext, i in new_context + - var context_with_element = subcontext.match(new RegExp('^(.*?[A-Za-z0-9])(?!' + settings['modifier'] + '[A-Za-z0-9])' + settings['element'] + ".+$")) + if context_with_element + - new_context[i] = context_with_element[1] + - bemto_chain[bemto_chain.length] = new_context + + //- Rendering the classes + if bemto_objects.length + - var new_classes = [] + each bemto_object in bemto_objects + if bemto_object.name + - var start = bemto_object.prefix + if bemto_object.context + - start = bemto_object.context + settings.output_element + - new_classes.push(start + bemto_object.name) + if bemto_object.modifiers + each modifier in bemto_object.modifiers + - new_classes.push(start + bemto_object.name + settings.output_modifier + modifier) + + - var delimiter = settings.class_delimiter + - delimiter = delimiter ? (' ' + delimiter + ' ') : ' ' + - attributes.class = new_classes.join(delimiter).replace(/%DASH%/g, '-').replace(/%UNDERSCORE%/g, '_') + else + - attributes.class = undefined + + if block + +bemto_tag(tag, tagMetadata)&attributes(attributes) + block + else + +bemto_tag(tag, tagMetadata)&attributes(attributes) + + //- Closing actions (remove the current block from the chain) + if !isElement && block_sets_context + - bemto_chain = bemto_chain.splice(0,bemto_chain.length-1) + - bemto_chain_contexts = bemto_chain_contexts.splice(0,bemto_chain_contexts.length-1) + +//- Element +mixin e(options) + if options && typeof options == 'string' + - options = { 'tag': options } + else + - options = options || {} + - options['isElement'] = true + +b(options)&attributes(attributes): block +//- bemto +//- Copyright(c) 2012 Roman Komarov +//- MIT Licensed + +//- This is a replacement for an interpolated tag, +//- which is not possible due to Jade's wontfixed #659 and #660 bugs. + +mixin bemto_custom_inline_tag(customTag, self_closing) + - self_closing = self_closing || false + != '<' + = customTag + if attributes + - for (var attribute in attributes) + if attributes.hasOwnProperty(attribute) && attributes[attribute] !== false && attributes[attribute] !== undefined + = ' ' + = attribute + != '="' + != attributes[attribute] === true ? attribute : attributes[attribute] + != '"' + if self_closing + != '/>' + else + != '>' + block + != '' + + +mixin bemto_custom_tag(customTag, tagMetadata) + - customTag = customTag || 'div' + - tagMetadata = tagMetadata || {} + - var selfClosing = false + if customTag.substr(-1) === '/' + - selfClosing = true + - customTag = customTag.slice(0, -1) + + - var tag_type = tagMetadata.type || get_bemto_tag_type(customTag) + + case tag_type + when 'inline' + +bemto_custom_inline_tag(customTag)&attributes(attributes): block + when 'self_closing' + +bemto_custom_inline_tag(customTag, true)&attributes(attributes) + + //- Block-level tags + default + if selfClosing + #{customTag}&attributes(attributes)()/ + else + #{customTag}&attributes(attributes): block +//- bemto +//- Copyright(c) 2012 Roman Komarov +//- MIT Licensed + + +//- Tag mixin, used for tweaking what tag we are throwing and do we need to wrap anything here + +mixin bemto_tag(tag, tagMetadata) + - var settings = get_bemto_settings() + - tagMetadata = tagMetadata || {} + + //- rewriting tag name on different contexts + - var newTag = tag || settings['default_tag'] + - var contextIndex = bemto_chain_contexts.length + + //- Checks for contexts if no tag given + if !tag + if bemto_chain_contexts[contextIndex-1] === 'inline' + - newTag = 'span' + else if bemto_chain_contexts[contextIndex-1] === 'list' + - newTag = 'li' + else if bemto_chain_contexts[contextIndex-1] === 'optionlist' + - newTag = 'option' + + //- Attributes context checks + //- Only when no actual tag is given + if !tag || tag == 'span' || tag == 'div' + if attributes.href + - newTag = 'a' + if attributes.for + - newTag = 'label' + if attributes.type + //- TODO: Add more checks for different type value patterns + - newTag = block ? 'button' : 'input' + else if attributes.src + - newTag = 'img' + + //- Contextual wrappers + if bemto_chain_contexts[contextIndex-1] === 'list' && newTag !== 'li' + |
  • + else if bemto_chain_contexts[contextIndex-1] !== 'list' && bemto_chain_contexts[contextIndex-1] !== 'pseudo-list' && newTag === 'li' + |
      + - bemto_chain_contexts[bemto_chain_contexts.length] = 'pseudo-list' + else if bemto_chain_contexts[contextIndex-1] === 'pseudo-list' && newTag !== 'li' + |
    + - bemto_chain_contexts = bemto_chain_contexts.splice(0,bemto_chain_contexts.length-1) + + //- Setting context + - var content_type = tagMetadata.content_type || get_bemto_tag_content_type(newTag) + - bemto_chain_contexts[bemto_chain_contexts.length] = content_type + + if newTag == 'img' + //- If there is no title we don't need it to show even if there is some alt + if attributes.alt && !attributes.title + - attributes.title = '' + //- If we have title, we must have it in alt if it's not set + if attributes.title && !attributes.alt + - attributes.alt = attributes.title + if !attributes.alt + - attributes.alt = '' + if attributes.alt === '' + - attributes.role = 'presentation' + if !attributes.src + if settings.nosrc_substitute === true + - attributes.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==' + else if settings.nosrc_substitute + - attributes.src = settings.nosrc_substitute + + if newTag == 'input' + if !attributes.type + - attributes.type = "text" + + if newTag == 'main' + if !attributes.role + - attributes.role = 'main' + if newTag == 'html' + + + +bemto_custom_tag(newTag, tagMetadata)&attributes(attributes) + if block + block + + //- Closing all the wrapper tails + if bemto_chain_contexts[contextIndex-1] === 'list' && newTag != 'li' + |
  • +//- bemto +//- Copyright(c) 2012 Roman Komarov +//- MIT Licensed + +- + // Cloning via http://stackoverflow.com/a/728694/885556 + function clone(obj) { + var copy; + + // Handle the 3 simple types, and null or undefined + if (null == obj || "object" != typeof obj) return obj; + + // Handle Date + if (obj instanceof Date) { + copy = new Date(); + copy.setTime(obj.getTime()); + return copy; + } + + // Handle Array + if (obj instanceof Array) { + copy = []; + for (var i = 0, len = obj.length; i < len; i++) { + copy[i] = clone(obj[i]); + } + return copy; + } + + // Handle Object + if (obj instanceof Object) { + copy = {}; + for (var attr in obj) { + if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]); + } + return copy; + } + + throw new Error("Unable to copy obj! Its type isn't supported."); + } +//- bemto +//- Copyright(c) 2012 Roman Komarov +//- MIT Licensed + +//- bemto +//- Copyright(c) 2012 Roman Komarov +//- MIT Licensed + + +- + var default_bemto_settings = { + 'prefix': '', + 'element': '__', + 'modifier': '_', + 'default_tag': 'div', + 'nosrc_substitute': true, + 'flat_elements': true, + 'class_delimiter': '' + } + + var bemto_output_settings = ['element', 'modifier']; + + var bemto_settings = default_bemto_settings; + + var get_bemto_settings = function() { + var settings = clone(bemto_settings); + if (bemto_settings_prefix !== undefined) { settings['prefix'] = bemto_settings_prefix; } + if (bemto_settings_element !== undefined) { settings['element'] = bemto_settings_element; } + if (bemto_settings_modifier !== undefined) { settings['modifier'] = bemto_settings_modifier; } + if (bemto_settings_default_tag !== undefined) { settings['default_tag'] = bemto_settings_default_tag; } + + for (var i = 0; i < bemto_output_settings.length; i++) { + var setting = bemto_output_settings[i]; + if (settings['output_' + setting] === undefined) { + settings['output_' + setting] = settings[setting]; + } + }; + + return settings; + } + + var set_bemto_setting = function(name, value) { + bemto_settings[name] = value; + + //- Resetting the old variable-type setting + if (name == 'prefix' && bemto_settings_prefix !== undefined) { bemto_settings_prefix = undefined; } + if (name == 'element' && bemto_settings_element !== undefined) { bemto_settings_element = undefined; } + if (name == 'modifier' && bemto_settings_modifier !== undefined) { bemto_settings_modifier = undefined; } + if (name == 'default_tag' && bemto_settings_default_tag !== undefined) { bemto_settings_default_tag = undefined; } + } + + var set_bemto_settings = function(settings) { + for (var name in settings) { + if (settings.hasOwnProperty(name)) { + set_bemto_setting(name, settings[name]); + } + } + } + +mixin bemto_scope(settings) + - var old_bemto_settings = clone(bemto_settings) + - set_bemto_settings(settings) + block + - set_bemto_settings(old_bemto_settings) +//- bemto +//- Copyright(c) 2012 Roman Komarov +//- MIT Licensed + +- + var get_bemto_tag_type = function(tagName) { + var result = 'block' + if (bemto_tag_metadata[tagName]) { + result = bemto_tag_metadata[tagName].type || result; + } + return result; + } + + var get_bemto_tag_content_type = function(tagName) { + var result = 'block' + if (bemto_tag_metadata[tagName]) { + result = bemto_tag_metadata[tagName].content_type || bemto_tag_metadata[tagName].type || result; + } + return result; + } + + var bemto_tag_metadata = { + 'hr': { + 'type': 'self_closing' + }, + 'br': { + 'type': 'self_closing' + }, + 'wbr': { + 'type': 'self_closing' + }, + 'source': { + 'type': 'self_closing' + }, + 'img': { + 'type': 'self_closing' + }, + 'input': { + 'type': 'self_closing' + }, + 'a': { + 'type': 'inline' + }, + 'abbr': { + 'type': 'inline' + }, + 'acronym': { + 'type': 'inline' + }, + 'b': { + 'type': 'inline' + }, + 'code': { + 'type': 'inline' + }, + 'em': { + 'type': 'inline' + }, + 'font': { + 'type': 'inline' + }, + 'i': { + 'type': 'inline' + }, + 'ins': { + 'type': 'inline' + }, + 'kbd': { + 'type': 'inline' + }, + 'map': { + 'type': 'inline' + }, + 'pre': { + 'type': 'inline' + }, + 'samp': { + 'type': 'inline' + }, + 'small': { + 'type': 'inline' + }, + 'span': { + 'type': 'inline' + }, + 'strong': { + 'type': 'inline' + }, + 'sub': { + 'type': 'inline' + }, + 'sup': { + 'type': 'inline' + }, + 'textarea': { + 'type': 'inline' + }, + 'time': { + 'type': 'inline' + }, + 'label': { + 'content_type': 'inline' + }, + 'p': { + 'content_type': 'inline' + }, + 'h1': { + 'content_type': 'inline' + }, + 'h2': { + 'content_type': 'inline' + }, + 'h3': { + 'content_type': 'inline' + }, + 'h4': { + 'content_type': 'inline' + }, + 'h5': { + 'content_type': 'inline' + }, + 'h6': { + 'content_type': 'inline' + }, + 'ul': { + 'content_type': 'list' + }, + 'ol': { + 'content_type': 'list' + }, + 'select': { + 'content_type': 'optionlist' + }, + 'datalist': { + 'content_type': 'optionlist' + } + } diff --git a/concat.js b/concat.js new file mode 100644 index 0000000..b7f18fa --- /dev/null +++ b/concat.js @@ -0,0 +1,28 @@ +const concat = require('concat-files'), + { readdirSync, readFileSync, writeFileSync } = require('fs'); + +const files = readdirSync(`./lib/`).map((fileName) => `./lib/${fileName}`), + targetName = 'bemto_webpack.pug', + targetPath = `./${targetName}`; + +concat(files, + targetPath, + (error) => { + if (error) { + console.error('\x1b[31m', error, '\x1b[0m') + process.exit(1) + } + console.log('\x1b[32m', 'Concat done (1/2)', '\x1b[0m'); + removeImports() + } +); + +function removeImports() { + const file = readFileSync(targetPath).toString(), + lines = file.split('\n'), + filteredLines = lines.filter((line) => + !line.includes('include') + ); + writeFileSync(targetPath, filteredLines.join('\n')); + console.log('\x1b[32m', 'Remove imports done (2/2)', '\x1b[0m'); +} \ No newline at end of file diff --git a/package.json b/package.json index 245f5be..cdb3ec5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bemto.pug", - "version": "2.1.0", + "version": "2.2.0", "main": "./lib/index.pug", "author": "Roman Komarov ", "licence": "MIT", @@ -20,12 +20,17 @@ "url": "git://github.com/kizu/bemto.git" }, "devDependencies": { - "pug": "2.0.0-beta6", + "concat-files": "^0.1.1", "mocha": "*", - "should": "2.0.x" + "pug": "2.0.x", + "should": "13.2.x" }, "scripts": { - "test": "./node_modules/.bin/mocha --require should --reporter list" + "test": "./node_modules/.bin/mocha --require should --reporter list", + "prepare": "node concat" }, - "engines": { "node": "*" } + "engines": { + "node": "*" + }, + "dependencies": {} } diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..0030dac --- /dev/null +++ b/yarn.lock @@ -0,0 +1,534 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/babel-types@*", "@types/babel-types@^7.0.0": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.4.tgz#bfd5b0d0d1ba13e351dff65b6e52783b816826c8" + +"@types/babylon@^6.16.2": + version "6.16.3" + resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.3.tgz#c2937813a89fcb5e79a00062fc4a8b143e7237bb" + dependencies: + "@types/babel-types" "*" + +acorn-globals@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn@^3.1.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.4, acorn@~4.0.2: + version "4.0.13" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" + +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" + +asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + +babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +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" + +character-parser@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-2.2.0.tgz#c7ce28f36d4bcd9744e5ffc2c5fcde1c73261fc0" + dependencies: + is-regex "^1.0.3" + +clean-css@^4.1.11: + version "4.1.11" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a" + dependencies: + source-map "0.5.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" + +commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +concat-files@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/concat-files/-/concat-files-0.1.1.tgz#7016ae60278ba3f6b0b561368fa211160e556db5" + dependencies: + async "~0.2.6" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +constantinople@^3.0.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/constantinople/-/constantinople-3.1.2.tgz#d45ed724f57d3d10500017a7d3a889c1381ae647" + dependencies: + "@types/babel-types" "^7.0.0" + "@types/babylon" "^6.16.2" + babel-types "^6.26.0" + babylon "^6.18.0" + +core-js@^2.4.0: + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + +debug@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + +doctypes@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9" + +escape-string-regexp@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + +glob@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + dependencies: + function-bind "^1.1.1" + +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + +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: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-expression@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-expression/-/is-expression-3.0.0.tgz#39acaa6be7fd1f3471dc42c7416e61c24317ac9f" + dependencies: + acorn "~4.0.2" + object-assign "^4.0.1" + +is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + +is-regex@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" + +js-stringify@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/js-stringify/-/js-stringify-1.0.2.tgz#1736fddfd9724f28a3682adc6230ae7e4e9679db" + +jstransformer@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-1.0.0.tgz#ed8bf0921e2f3f1ed4d5c1a44f68709ed24722c3" + dependencies: + is-promise "^2.0.0" + promise "^7.0.1" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lodash@^4.17.4: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +minimatch@3.0.4, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +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" + +mocha@*: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" + dependencies: + browser-stdout "1.3.1" + commander "2.15.1" + debug "3.1.0" + diff "3.5.0" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.5" + he "1.1.1" + minimatch "3.0.4" + mkdirp "0.5.1" + supports-color "5.4.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +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" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +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" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +promise@^7.0.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + dependencies: + asap "~2.0.3" + +pug-attrs@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/pug-attrs/-/pug-attrs-2.0.3.tgz#a3095f970e64151f7bdad957eef55fb5d7905d15" + dependencies: + constantinople "^3.0.1" + js-stringify "^1.0.1" + pug-runtime "^2.0.4" + +pug-code-gen@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pug-code-gen/-/pug-code-gen-2.0.1.tgz#0951ec83225d74d8cfc476a7f99a259b5f7d050c" + dependencies: + constantinople "^3.0.1" + doctypes "^1.1.0" + js-stringify "^1.0.1" + pug-attrs "^2.0.3" + pug-error "^1.3.2" + pug-runtime "^2.0.4" + void-elements "^2.0.1" + with "^5.0.0" + +pug-error@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/pug-error/-/pug-error-1.3.2.tgz#53ae7d9d29bb03cf564493a026109f54c47f5f26" + +pug-filters@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pug-filters/-/pug-filters-3.1.0.tgz#27165555bc04c236e4aa2b0366246dfa021b626e" + dependencies: + clean-css "^4.1.11" + constantinople "^3.0.1" + jstransformer "1.0.0" + pug-error "^1.3.2" + pug-walk "^1.1.7" + resolve "^1.1.6" + uglify-js "^2.6.1" + +pug-lexer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pug-lexer/-/pug-lexer-4.0.0.tgz#210c18457ef2e1760242740c5e647bd794cec278" + dependencies: + character-parser "^2.1.1" + is-expression "^3.0.0" + pug-error "^1.3.2" + +pug-linker@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/pug-linker/-/pug-linker-3.0.5.tgz#9e9a7ae4005682d027deeb96b000f88eeb83a02f" + dependencies: + pug-error "^1.3.2" + pug-walk "^1.1.7" + +pug-load@^2.0.11: + version "2.0.11" + resolved "https://registry.yarnpkg.com/pug-load/-/pug-load-2.0.11.tgz#e648e57ed113fe2c1f45d57858ea2bad6bc01527" + dependencies: + object-assign "^4.1.0" + pug-walk "^1.1.7" + +pug-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pug-parser/-/pug-parser-5.0.0.tgz#e394ad9b3fca93123940aff885c06e44ab7e68e4" + dependencies: + pug-error "^1.3.2" + token-stream "0.0.1" + +pug-runtime@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pug-runtime/-/pug-runtime-2.0.4.tgz#e178e1bda68ab2e8c0acfc9bced2c54fd88ceb58" + +pug-strip-comments@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pug-strip-comments/-/pug-strip-comments-1.0.3.tgz#f1559592206edc6f85310dacf4afb48a025af59f" + dependencies: + pug-error "^1.3.2" + +pug-walk@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/pug-walk/-/pug-walk-1.1.7.tgz#c00d5c5128bac5806bec15d2b7e7cdabe42531f3" + +pug@2.0.x: + version "2.0.3" + resolved "https://registry.yarnpkg.com/pug/-/pug-2.0.3.tgz#71cba82537c95a5eab7ed04696e4221f53aa878e" + dependencies: + pug-code-gen "^2.0.1" + pug-filters "^3.1.0" + pug-lexer "^4.0.0" + pug-linker "^3.0.5" + pug-load "^2.0.11" + pug-parser "^5.0.0" + pug-runtime "^2.0.4" + pug-strip-comments "^1.0.3" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +resolve@^1.1.6: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + +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" + +should-equal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" + dependencies: + should-type "^1.4.0" + +should-format@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + dependencies: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + +should-type-adaptors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" + dependencies: + should-type "^1.3.0" + should-util "^1.0.0" + +should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + +should-util@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063" + +should@13.2.x: + version "13.2.2" + resolved "https://registry.yarnpkg.com/should/-/should-13.2.2.tgz#7a802c0f30ed53af978d3b93dd0a0b0c6cf1f966" + dependencies: + should-equal "^2.0.0" + should-format "^3.0.3" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" + +source-map@0.5.x, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +supports-color@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +token-stream@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-0.0.1.tgz#ceeefc717a76c4316f126d0b9dbaa55d7e7df01a" + +uglify-js@^2.6.1: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.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" + +void-elements@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +with@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/with/-/with-5.1.1.tgz#fa4daa92daf32c4ea94ed453c81f04686b575dfe" + dependencies: + acorn "^3.1.0" + acorn-globals "^3.0.0" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +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"