diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..a5ec49122 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,9 @@ +**/node_modules/** +node_modules +**/vendor/** +vendor +**/test/** +**/dist/** + +// being refactored / removed +packages/uikit-workshop/src/scripts/components/styleguide.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..826a1702e --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,86 @@ +module.exports = { + root: true, + env: { + node: true, + builtin: true, + es6: true, + browser: true, + }, + parser: 'babel-eslint', + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + allowImportExportEverywhere: true, + ecmaFeatures: { + jsx: true, + experimentalDecorators: true, + }, + }, + globals: {}, + plugins: ['prettier'], + extends: ['eslint-config-prettier'].map(require.resolve), + rules: { + 'prettier/prettier': 'error', + 'block-scoped-var': 0, + camelcase: 0, + 'consistent-return': 2, + curly: [2, 'all'], + 'dot-notation': [1, { allowKeywords: true }], + eqeqeq: [2, 'allow-null'], + 'global-strict': [0, 'never'], + 'guard-for-in': 2, + 'key-spacing': 0, + 'new-cap': 0, + 'no-alert': 2, + 'no-bitwise': 2, + 'no-caller': 2, + 'no-cond-assign': [2, 'except-parens'], + 'no-debugger': 2, + 'no-dupe-args': 2, + 'no-dupe-keys': 2, + 'no-empty': 2, + 'no-eval': 2, + 'no-extend-native': 2, + 'no-extra-bind': 2, + 'no-extra-parens': 0, + 'no-func-assign': 2, + 'no-implied-eval': 2, + 'no-invalid-regexp': 2, + 'no-irregular-whitespace': 1, + 'no-iterator': 2, + 'no-loop-func': 2, + 'no-mixed-requires': 0, + 'no-multi-str': 2, + 'no-native-reassign': 2, + 'no-new': 2, + 'no-param-reassign': 1, + 'no-proto': 2, + 'no-redeclare': 0, + 'no-script-url': 2, + 'no-self-assign': 2, + 'no-self-compare': 2, + 'no-sequences': 2, + 'no-shadow': 2, + 'no-undef': 2, + 'no-underscore-dangle': 0, + 'no-unreachable': 1, + 'no-unused-vars': 1, + 'no-use-before-define': 1, + 'no-useless-call': 2, + 'no-useless-concat': 2, + 'no-var': 2, + 'no-with': 2, + quotes: [0, 'single'], + radix: 2, + strict: 0, + 'valid-typeof': 2, + 'vars-on-top': 0, + 'prefer-const': [ + 'error', + { + destructuring: 'any', + ignoreReadBeforeAssign: false, + }, + ], + }, +}; diff --git a/.eslintrc b/.eslintrc.json similarity index 97% rename from .eslintrc rename to .eslintrc.json index d5dd0f115..335572829 100644 --- a/.eslintrc +++ b/.eslintrc.json @@ -1,11 +1,12 @@ { + "root": true, "env": { "node": true, "builtin": true, "es6": true }, "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 2017, "sourceType": "module" }, "globals": {}, diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ab24808be..477f273af 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,7 +6,7 @@ No pull request is too small. Check out any [help wanted 🆘](https://github.co ## Prerequisites -To get started, you'll need Node 8 or higher. Managing Node with [nvm](https://github.com/creationix/nvm) is recommended. Once installed, you can target the version of Node we specify within the [`.nvmrc`](https://github.com/pattern-lab/patternlab-node/blob/master/.nvmrc) file. +To get started, you'll need Node installed. Managing Node with [nvm](https://github.com/creationix/nvm) is recommended. Once installed, you can target the version of Node we specify within the [`.nvmrc`](https://github.com/pattern-lab/patternlab-node/blob/master/.nvmrc) file. ```sh nvm install <> @@ -47,7 +47,7 @@ This ensures that any changes you've made will still result in a clean and funct ## Coding style -Formatting is automated via [Prettier](https://prettier.io/), setup to run on precommit. We suggest [editor integration](https://prettier.io/docs/en/editors.html) for this and for eslint. Prettier is further configured within `.prettierrc`. Eslint validates syntax and usage that Prettier doesn't handle. Configuration for both is found within the `.eslintrc` file. +Formatting is automated via [Prettier](https://prettier.io/), setup to run on precommit. We suggest [editor integration](https://prettier.io/docs/en/editors.html) for this and for eslint. Prettier is further configured within `.prettierrc`. Eslint validates syntax and usage that Prettier doesn't handle. Configuration for both is found within the `.eslintrc.json` file. The `.editorconfig` controls spaces / tabs within supported editors. Check out their [site](http://editorconfig.org/). diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..5805c3f03 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +patreon: patternlab diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 193e6014f..9e5ad2464 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,6 @@ - + I am using Pattern Lab Node `vX.X.X` on `Windows | Mac | Linux`, with Node `vX.X.X`, using a `Gulp | Grunt | Vanilla | Custom` Edition. diff --git a/.github/stale.yml b/.github/stale.yml index 61a1fe74b..5969a91e8 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,7 +1,7 @@ # Number of days of inactivity before an issue becomes stale daysUntilStale: 60 # Number of days of inactivity before a stale issue is closed -daysUntilClose: 14 +daysUntilClose: 30 # Issues with these labels will never be considered stale exemptLabels: - "staged for next release 🏁" diff --git a/.gitignore b/.gitignore index b4874dffb..96232f92a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,13 @@ Thumbs.db .nyc_output/ .vscode/ .idea/ +.env packages/core/test/public +packages/*/public !packages/core/test/patterns/public/.gitkeep !packages/core/test/patterns/testDependencyGraph.json lerna-debug.log +packages/edition-node-gulp/dependencyGraph.json +packages/uikit-workshop/dist + +yarn-error.log diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..43c97e719 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/.nvmrc b/.nvmrc index e3f76f340..7f976a5ae 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8.9.4 +12.12.0 diff --git a/.prettierignore b/.prettierignore index 3a4d3d062..f25d454d3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,3 +8,8 @@ packages/core/scripts/api.handlebars packages/core/scripts/events.handlebars packages/core/test/files/annotations.js +packages/**/annotations.js +**/uikit-workshop/src/js/**/* +*.json +*.md +*.scss diff --git a/.travis.yml b/.travis.yml index c606e3434..3fb4c3593 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,24 @@ language: node_js +addons: + chrome: stable + before_install: - - phantomjs --version + # version lifted from `.nvmrc` + - nvm install + - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.19.0 + - export PATH="$HOME/.yarn/bin:$PATH" before_script: - - npm install -g lerna@2.9.0 - - npm run bootstrap - - lerna add @pattern-lab/engine-mustache - - lerna add @pattern-lab/engine-handlebars - - lerna add @pattern-lab/engine-underscore - - lerna add @pattern-lab/engine-liquid - - lerna add @pattern-lab/engine-twig - - lerna add @pattern-lab/engine-react + - yarn run setup + - npx lerna add @pattern-lab/engine-mustache --scope=@pattern-lab/core + - npx lerna add @pattern-lab/engine-handlebars --scope=@pattern-lab/core + - npx lerna add @pattern-lab/engine-underscore --scope=@pattern-lab/core + - npx lerna add @pattern-lab/engine-liquid --scope=@pattern-lab/core + - npx lerna add @pattern-lab/engine-twig --scope=@pattern-lab/core + - npx lerna add @pattern-lab/engine-react --scope=@pattern-lab/core + +script: travis_wait yarn run test branches: only: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..ddc797b61 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,396 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [5.9.3](https://github.com/pattern-lab/patternlab-node/compare/v5.9.2...v5.9.3) (2020-05-01) + + +### Bug Fixes + +* **plugintabs:** enabling multiple file formats [#1163](https://github.com/pattern-lab/patternlab-node/issues/1163) ([bb5e817](https://github.com/pattern-lab/patternlab-node/commit/bb5e8179e6b8553a6e1af0bede26db412b6c0b68)) +* adjust UIKit Nav updates to account for the noViewAll config variation ([73eac97](https://github.com/pattern-lab/patternlab-node/commit/73eac976461f4e587b0c30668942c4895aea319f)) +* make sure the top-level Dropdown menus always open/close ([7a8b418](https://github.com/pattern-lab/patternlab-node/commit/7a8b418bfcbd200ef8b2802b1a07964a9995bf9f)) +* only allow one top level nav item to be open at a time while rendering as a dropdown menu ([409bef3](https://github.com/pattern-lab/patternlab-node/commit/409bef37165260d9b728013ac33e7aa67541c832)) +* re-try Netlify preview to debug local vs prod rendering differences ([6da41a1](https://github.com/pattern-lab/patternlab-node/commit/6da41a14feea034f891c745dfeb062fa3b196235)) +* Update dependency on twing JS engine ([cfe88c6](https://github.com/pattern-lab/patternlab-node/commit/cfe88c6cdbf2219b9955eaa0ffcfc0e4a7683511)) +* **cli:** fix test script glob ([ff18eb5](https://github.com/pattern-lab/patternlab-node/commit/ff18eb51ce24fc5423b009168e85ede366069139)) + + + + + +## [5.9.2](https://github.com/pattern-lab/patternlab-node/compare/v5.9.1...v5.9.2) (2020-04-24) + +**Note:** Version bump only for package pl-node + + + + + +## [5.9.1](https://github.com/pattern-lab/patternlab-node/compare/v5.9.0...v5.9.1) (2020-04-24) + + +### Bug Fixes + +* **cli:** ensure specified directory exists prior to scaffold ([cc3b696](https://github.com/pattern-lab/patternlab-node/commit/cc3b69624d486c94ee3b1f4b1bbb0334a514fa59)) + + + + + +# [5.9.0](https://github.com/pattern-lab/patternlab-node/compare/v5.8.0...v5.9.0) (2020-04-24) + + +### Bug Fixes + +* **cli:** set current working directory before scaffolded npm init ([6d2186d](https://github.com/pattern-lab/patternlab-node/commit/6d2186d8e8a74634198a4474ca8ae83221dd70a9)) +* **core:** do not warn about uikit-polyfills ([6bb68e7](https://github.com/pattern-lab/patternlab-node/commit/6bb68e763769969546542bf7aaf6d1f4235c6622)) +* actually exit build when Twig render fails ([5d28a24](https://github.com/pattern-lab/patternlab-node/commit/5d28a24a53011396289c1e29e0a715cd82470185)) +* Update packages/engine-twig-php/lib/engine_twig_php.js ([c67d50e](https://github.com/pattern-lab/patternlab-node/commit/c67d50ebb5d69816b7514e85f129f8ecde984ad3)) + + +### Features + +* **docs:** yarnify ([5a47dc7](https://github.com/pattern-lab/patternlab-node/commit/5a47dc7b90dc5c43c12a51143b41943dcbd8564c)) +* **README:** add netlify badges ([941df8a](https://github.com/pattern-lab/patternlab-node/commit/941df8a59b6b75bc1255646005f329e40be68106)) + + + + + +# [5.8.0](https://github.com/pattern-lab/patternlab-node/compare/v5.7.2...v5.8.0) (2020-04-03) + + +### Bug Fixes + +* the namespace notation should not be mixed with PatternLab shorthand pattern naming & name is not defined in the textarea macro ([8250fe8](https://github.com/pattern-lab/patternlab-node/commit/8250fe88231d03735424d597eae40496da2cb48c)) +* Updated the README to reflect which issues are resolved. ([d90c3c4](https://github.com/pattern-lab/patternlab-node/commit/d90c3c4605f9a5bcd1153996e3f4d1a17d58bd92)) + + +### Features + +* switch engine-twig to use twing rather than node-twig ([daca95c](https://github.com/pattern-lab/patternlab-node/commit/daca95c4ffa48916fb6c67c5184bde9b624acd76)) + + + + + +## [5.7.2](https://github.com/pattern-lab/patternlab-node/compare/v5.7.1...v5.7.2) (2020-03-24) + + +### Bug Fixes + +* update iframe resizer UI to be hidden when iframe is full width ([9797c1a](https://github.com/pattern-lab/patternlab-node/commit/9797c1a047d746d21b88a1f57b57f618a03a54df)) + + + + + +## [5.7.1](https://github.com/pattern-lab/patternlab-node/compare/v5.7.0...v5.7.1) (2020-02-24) + + +### Bug Fixes + +* update twig-renderer ([46f53b7](https://github.com/pattern-lab/patternlab-node/commit/46f53b79f8bb0bb64a9c55fd32f29459cea6e28c)) + + + + + +# [5.7.0](https://github.com/pattern-lab/patternlab-node/compare/v5.6.0...v5.7.0) (2020-02-17) + + +### Features + +* **cli:** make options more user friendly ([ad845b3](https://github.com/pattern-lab/patternlab-node/commit/ad845b394ef81f90895ebb5bc6f12cc608e5e3d4)) + + + + + +# [5.6.0](https://github.com/pattern-lab/patternlab-node/compare/v5.5.0...v5.6.0) (2020-01-18) + + +### Bug Fixes + +* a11y fix on text contrast ([6d75b22](https://github.com/pattern-lab/patternlab-node/commit/6d75b226ce27228025b2915e5d402f7080faee31)) +* a11y issue on a missing description of that complementary icon ([4f13807](https://github.com/pattern-lab/patternlab-node/commit/4f13807cb93df33435088de3a51170b9c4515889)) + + +### Features + +* pass additional configuration into twig-php engine ([dff5a78](https://github.com/pattern-lab/patternlab-node/commit/dff5a7830918fa46e2692d9f9daed4121f803461)) + + + + + + +# [5.5.0](https://github.com/pattern-lab/patternlab-node/compare/v5.4.2...v5.5.0) (2019-12-19) + + +### Features + +* upgrade Twig to use new filter, map, reduce ([4218a5a](https://github.com/pattern-lab/patternlab-node/commit/4218a5a04b06027548afd9f417486297dd25fef8)) + + + + + +## [5.4.2](https://github.com/pattern-lab/patternlab-node/compare/v5.4.1...v5.4.2) (2019-11-27) + +**Note:** Version bump only for package pl-node-pr + + + + + +## [5.4.1](https://github.com/pattern-lab/patternlab-node/compare/v5.4.0...v5.4.1) (2019-11-26) + + +### Bug Fixes + +* temp workaround to address instance where the latest version of Edge supports ES modules but NOT Custom Elements ([ada3d82](https://github.com/pattern-lab/patternlab-node/commit/ada3d829019345fd33ed949f306972efdcb4fa57)) + + + + + +# [5.4.0](https://github.com/pattern-lab/patternlab-node/compare/v5.3.3...v5.4.0) (2019-11-26) + + +### Bug Fixes + +* re-add popstate listener ([6dbbd6a](https://github.com/pattern-lab/patternlab-node/commit/6dbbd6aae3709cc17544c12dd10588120eb9e71a)) +* **script:** remove quotes around starterkit ([e4897fb](https://github.com/pattern-lab/patternlab-node/commit/e4897fb6e4d4cd0985ab72397abd03ff04be514b)) +* add a new method to check if PL is currently compiling + add new method to get the config PL is using ([26e886c](https://github.com/pattern-lab/patternlab-node/commit/26e886c93db5d135c91de648724f7278c4d5b3e9)) +* check if dependency graph file exists before trying to remove ([f9af6a9](https://github.com/pattern-lab/patternlab-node/commit/f9af6a95025a22041e7ff8a4bfb19e4727385e98)) +* comment out example config to disable viewAll links ([ddb3fad](https://github.com/pattern-lab/patternlab-node/commit/ddb3fad5770d1d66432c4b583ae9af09a3a47d48)) + + +### Features + +* add the ability to disable Pattern Lab viewall links in the navigation ([156e609](https://github.com/pattern-lab/patternlab-node/commit/156e609a92e7f7e7ebd8f4f5cd77b5d695db8bad)) +* major improvements to local UIKit workflow ([4dc9173](https://github.com/pattern-lab/patternlab-node/commit/4dc9173a5a44b422e9677824de3728048b7c4f05)) +* test adding cross-env to Twig Edition test ([3f8bb01](https://github.com/pattern-lab/patternlab-node/commit/3f8bb01bc4e96a0aba61c213ea1619c02593defc)) + + + + + +## [5.3.3](https://github.com/pattern-lab/patternlab-node/compare/v5.3.2...v5.3.3) (2019-11-22) + + +### Bug Fixes + +* simplify overflow fix ([378cf42](https://github.com/pattern-lab/patternlab-node/commit/378cf4282a3e5b4f597287eb538270e3358c8c69)) +* testing potential FF fix for https://github.com/pattern-lab/patternlab-node/issues/1100 ([613bba1](https://github.com/pattern-lab/patternlab-node/commit/613bba104f2082be507938db78f1db7a07f6b8be)) + + + + + + +## [5.3.2](https://github.com/pattern-lab/patternlab-node/compare/v5.3.1...v5.3.2) (2019-11-14) + +**Note:** Version bump only for package pl-node + + + + + +## [5.3.1](https://github.com/pattern-lab/patternlab-node/compare/v5.3.0...v5.3.1) (2019-11-13) + + +### Bug Fixes + +* CSS fix to properly highlight the correct active page / link in the Nav; improve dropdown open / close animation ([ec4ab84](https://github.com/pattern-lab/patternlab-node/commit/ec4ab84ddc8007796c9012a3f493822d76f039a7)) +* small UI fixes for the sticky Tabs header on smaller screens + drawer content collapsing on smaller screens + better handling of Nav link cleanup when changing pages ([347e2fe](https://github.com/pattern-lab/patternlab-node/commit/347e2fe29a78a1d168005a07c656b4f9f1124c7f)) +* tweak header and drawer padding when viewing on a device with curved edges ([98e9baf](https://github.com/pattern-lab/patternlab-node/commit/98e9baf649eceb9124218a924b6b08097b910e86)) +* uikit fixes and minor CSS updates intended for the v5.3.0 release ([26c4ced](https://github.com/pattern-lab/patternlab-node/commit/26c4ceddaae09fa4fa4873f092c924274498c5da)) + + + + + +# [5.3.0](https://github.com/pattern-lab/patternlab-node/compare/v5.2.0...v5.3.0) (2019-11-13) + + +### Bug Fixes + +* add PluginTab workaround for Safari ([2fa9367](https://github.com/pattern-lab/patternlab-node/commit/2fa936769be65484af52f242dca2536a3382462c)) +* **core:** re-add cleanPublic fix ([c100bbc](https://github.com/pattern-lab/patternlab-node/commit/c100bbca3f339e9132acb9c482e98c1c8a66b8b5)) +* **plugin-tab:** defensively call addPanels ([b82bd12](https://github.com/pattern-lab/patternlab-node/commit/b82bd129fdbe48de95b62d75fb7fe95cea896b7e)) +* port over missing UIKit Sass that wasn't added in the original PR ([f7659e6](https://github.com/pattern-lab/patternlab-node/commit/f7659e64d0eee13be20921dd5afc48ac20ae93e6)) + + +### Features + +* port latest UIKit updates + fixes upstream ([d07952c](https://github.com/pattern-lab/patternlab-node/commit/d07952cb07e3792b995dda2e589262ecf4153fdc)) + + + + + +# [5.2.0](https://github.com/pattern-lab/patternlab-node/compare/v5.1.0...v5.2.0) (2019-11-12) + + +### Bug Fixes + +* **deploy:** add setup command ([7c1d8d1](https://github.com/pattern-lab/patternlab-node/commit/7c1d8d14842a467bb301e2ede2ec83074ff35ae2)) +* add missing $ ([c95a06e](https://github.com/pattern-lab/patternlab-node/commit/c95a06ece78631b068f8721666caf33452e57a7a)) +* address bug causing viewport width to progressively decrease in size when resizing your screen / refreshing on certain devices ([41b11af](https://github.com/pattern-lab/patternlab-node/commit/41b11af8aaaf066fcf99abd2513eae8706122d32)) +* configure the Logo's `altText` config option when used as an HTML attribute ([ade34a2](https://github.com/pattern-lab/patternlab-node/commit/ade34a29435f5112f0449ad020bee7e9dc2c81e1)) +* fix classname typo ([da3c5f1](https://github.com/pattern-lab/patternlab-node/commit/da3c5f144d22b1ac3ad99680a264433d4438ebb2)) +* temp workaround to fix content exceeding the height of drawer container ([435243c](https://github.com/pattern-lab/patternlab-node/commit/435243cbfbd000a7d96a0e9fa7beff1a988ede64)) +* update drawer UI to not collapse content on smaller screen sizes ([7147085](https://github.com/pattern-lab/patternlab-node/commit/71470856b8b389421348366afd247a599d1e9c86)) +* update package.json description in `@pattern-lab/uikit-polyfills` ([22fc44a](https://github.com/pattern-lab/patternlab-node/commit/22fc44a4b3683753a469a98abfcdad8f1234f28a)) +* **engine_twig_php:** Allow additional flexibility with twig namespaces. ([07bfaa3](https://github.com/pattern-lab/patternlab-node/commit/07bfaa35a00ff62fd2016cc9f34e09cf5af36559)) + + +### Features + +* add lit-element, basic Typescript support to Webpack ([611f705](https://github.com/pattern-lab/patternlab-node/commit/611f705be85eea8a31091169750d64e988798cee)) +* add local copy of new Slotify library till published to NPM ([63b9d83](https://github.com/pattern-lab/patternlab-node/commit/63b9d833908151ce5cb5aa5184c72254125c7ed1)) +* add new component to make Button-like styles more reusable ([5e7b014](https://github.com/pattern-lab/patternlab-node/commit/5e7b0140622eb89154c38925769a6def6d669fb3)) +* add new component ([e8ce2a9](https://github.com/pattern-lab/patternlab-node/commit/e8ce2a927365b8d5316a7d8229c979ff31b04907)) +* add support for auto-closing Nav when clicking inside of the rendered iframe ([9d602fe](https://github.com/pattern-lab/patternlab-node/commit/9d602fe335a5d3b5bca5cac258c2465934d9a46a)) +* add support for optional chaining syntax via Babel plugin ([c8886b6](https://github.com/pattern-lab/patternlab-node/commit/c8886b6d9d91fea246fa3ab7947f289509dc26d5)) +* major refactoring + UI updates to address cross browser support; UI cleanup and conversion of the majority of the remaining components over to lit-element ([2ff8e1c](https://github.com/pattern-lab/patternlab-node/commit/2ff8e1c98cdd02e8077064c48eca5f7754a3db02)) +* refactor + convert pl-toggle-info to lit-element ([85cd9c5](https://github.com/pattern-lab/patternlab-node/commit/85cd9c50ca814066bf999badf2071d84964f00cc)) +* refactor + convert pl-toggle-layout to lit-element ([46009d9](https://github.com/pattern-lab/patternlab-node/commit/46009d91b1cb9ed613baa5a7626cba4f42883465)) +* refactor + convert pl-toggle-theme to lit-element ([95a3b21](https://github.com/pattern-lab/patternlab-node/commit/95a3b21a89dacd2d5b4df8c134ce438d4efdbd04)) +* refactor Drawer to render via lit-element + massively improve rendering performance ([28d47eb](https://github.com/pattern-lab/patternlab-node/commit/28d47eb3cbbce038204203e786e5188b4cefe64f)) +* remove mixin that was causing outlines to be removed from default UI styles ([622ed76](https://github.com/pattern-lab/patternlab-node/commit/622ed76d435b3b2e31e412266c3090506f98051b)) +* temp add unsafe-svg directive till upstream PR merged ([34de61c](https://github.com/pattern-lab/patternlab-node/commit/34de61ccd9c7bb3b48ca5ef386a87efc8e84babc)) +* update the Nav design to not bold the active item in order to not shift the layout ([0eda431](https://github.com/pattern-lab/patternlab-node/commit/0eda4312ba9f4c61afa6322c3ff45f9cda0efc9e)) +* update Webpack config to use the latest Style Loader + new SVG icon system ([2ed70e7](https://github.com/pattern-lab/patternlab-node/commit/2ed70e79d8656c7314d8b3109aa1c34160ad24f9)) + + + + + + +# [5.1.0](https://github.com/pattern-lab/patternlab-node/compare/v5.0.2...v5.1.0) (2019-10-29) + + +### Features + +* **config:** add new default pattern export options ([a7487a0](https://github.com/pattern-lab/patternlab-node/commit/a7487a0681cb11e6f3c5c8eaefd62e5648ad5ea3)) + + + + + +## [5.0.2](https://github.com/pattern-lab/patternlab-node/compare/v5.0.1...v5.0.2) (2019-10-28) + + +### Bug Fixes + +* **uikit-workshop:** add template files to published bundle ([9005fce](https://github.com/pattern-lab/patternlab-node/commit/9005fcee9e129fb41d509f706195e1437bddc710)) +* **uikit-workshop:** add webpack config to published bundle ([060a573](https://github.com/pattern-lab/patternlab-node/commit/060a573cbddce9ee3d270d39337d0c8cac8372fa)) + + + + + +## [5.0.1](https://github.com/pattern-lab/patternlab-node/compare/v5.0.0...v5.0.1) (2019-10-28) + + +### Bug Fixes + +* add missing “dist” folder to array of files / folders published to NPM ([8829429](https://github.com/pattern-lab/patternlab-node/commit/88294296c438352570befd2eb6b9e1ca2ae3b750)) + + + + + +# [5.0.0](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-beta.3...v5.0.0) (2019-10-25) + + +### Bug Fixes + +* **1049:** Treat folders like patterns only if they're subfolders of pattern groupings ([4eb79ab](https://github.com/pattern-lab/patternlab-node/commit/4eb79ab48b335a35b2e5ed3b7053974b8e8bb6b6)) +* **cli:** add custom install logic to edition-node ([f04fd26](https://github.com/pattern-lab/patternlab-node/commit/f04fd266429cd806987dab747e6d69bff9b926a4)) +* **cli:** allow any package to be installed as a starterkit ([d2aa1be](https://github.com/pattern-lab/patternlab-node/commit/d2aa1be810a0a7473dcc52391a2263dacfdda0b8)), closes [#1067](https://github.com/pattern-lab/patternlab-node/issues/1067) +* **cli:** merge config arrays via overwrite instead of concatenate ([42e5f7b](https://github.com/pattern-lab/patternlab-node/commit/42e5f7b42a26b4fc1f262c68ee4b474b546f2eac)) +* **cli:** proper path resolution to helpers ([a18fe5e](https://github.com/pattern-lab/patternlab-node/commit/a18fe5ef4d1c074a5eba8bfa255ebbee2261bf74)) +* **cli:** re-order and clarify engines ([e39e301](https://github.com/pattern-lab/patternlab-node/commit/e39e301a33306c6615fabf64262f1893ca682b97)) +* **core:** allow plugin resolution to follow normal algorithm ([3f6b83b](https://github.com/pattern-lab/patternlab-node/commit/3f6b83be080c88aec1d8b73bececb76f0f57a79d)) +* **core:** find plugins from config only and with simpler args ([fe7351c](https://github.com/pattern-lab/patternlab-node/commit/fe7351cba346425512cbb2ef3a1b7728ab06ae60)) +* **deploy:** add setup command ([74dd314](https://github.com/pattern-lab/patternlab-node/commit/74dd3142bf48873a9f1ec4e8dccb8aa2fef9001d)) +* **engine_twig_php:** Pseudo patterns Twig PHP ([226aa8b](https://github.com/pattern-lab/patternlab-node/commit/226aa8bbaaf5e418530ccf54a28f6c5657ee6dea)), closes [#1045](https://github.com/pattern-lab/patternlab-node/issues/1045) +* **engine_twig_php:** Twig incremental rebuilds ([1ade945](https://github.com/pattern-lab/patternlab-node/commit/1ade9451840b2645706a0b01129e2b697dc22d4b)), closes [#1015](https://github.com/pattern-lab/patternlab-node/issues/1015) +* **engine_twig_php:** Twig incremental rebuilds ([5d33f24](https://github.com/pattern-lab/patternlab-node/commit/5d33f24f156ebe50900701513a855de7de608dcf)), closes [#1015](https://github.com/pattern-lab/patternlab-node/issues/1015) +* **lerna:** typo in config ([525a47b](https://github.com/pattern-lab/patternlab-node/commit/525a47b51fba91c1bf5b7439735f48eb7dfa073e)) +* **lint:** Use const instead of var ([ad1e782](https://github.com/pattern-lab/patternlab-node/commit/ad1e782ef71295eb610f56d019eaa35499fb3f85)) +* **plugin:** correct spelling error and function locations ([d4abd88](https://github.com/pattern-lab/patternlab-node/commit/d4abd88cb017550002407241b5045a2ad1adb1dc)) +* **plugin-tab:** bump lodash from 4.17.5 to 4.17.15 in /packages/plugin-tab ([#1081](https://github.com/pattern-lab/patternlab-node/issues/1081)) ([3f89dda](https://github.com/pattern-lab/patternlab-node/commit/3f89dda1685874e251f9777f969c0943e0080881)) +* **plugin-tab:** handle params correctly ([d248993](https://github.com/pattern-lab/patternlab-node/commit/d2489939bb0db1a1d67b0e7f47dfb1838b88b0a0)) +* **starterkit:** add css output and build command ([ccb2d35](https://github.com/pattern-lab/patternlab-node/commit/ccb2d3569b741220324a3fa738ab3d4d2eb97ffe)) +* add better pre-rendering support ([8ecd615](https://github.com/pattern-lab/patternlab-node/commit/8ecd6159a89232f42e0a9dc3c688b6e21de8fc30)) +* add eslint fixes ([00d7bbe](https://github.com/pattern-lab/patternlab-node/commit/00d7bbe319ea77a6ee8cc9cd0348856feaaf13ad)) +* add missing @babel/runtime package to address silent error getting thrown on Travis ([1918d04](https://github.com/pattern-lab/patternlab-node/commit/1918d042d7e90cc8aaa2fdfcd8649961c0a5dd50)) +* add missing preact-render-to-string library ([881296a](https://github.com/pattern-lab/patternlab-node/commit/881296a2c256424beac28bd560c5b1a5e1fed005)) +* add repo info to root package.json so Auto knows what repo to configure for ([85142e8](https://github.com/pattern-lab/patternlab-node/commit/85142e8e94549edd7980459e5975d0639c34864d)) +* address unrelated eslint errors from PL core ([6ada00d](https://github.com/pattern-lab/patternlab-node/commit/6ada00d396eb436837f7453664bfa50522a2ec10)) +* correct typo in build logging ([96d989f](https://github.com/pattern-lab/patternlab-node/commit/96d989f8869630ba9f59705bfca66755f20e35ab)) +* fall back to seeing the current pattern's query string to `all` or the defaultPattern value if undefined when the iframe page initially loads ([a368459](https://github.com/pattern-lab/patternlab-node/commit/a3684590fca02cf96b99421b87a0ad0a711893ad)) +* fix incorrect Webpack version in package.json ([9788e89](https://github.com/pattern-lab/patternlab-node/commit/9788e8977921e31fe43f2a1ec19d4684dd4709c5)) +* fix issue with viewport height exceeding the space available ([95cd1cf](https://github.com/pattern-lab/patternlab-node/commit/95cd1cfa57f086ecb84ac2e996ecda81f0c6a1a6)) +* fix Prism.js typo so languages not found / supported don't throw a JS error ([a8c19f9](https://github.com/pattern-lab/patternlab-node/commit/a8c19f9f9b11d4abbdcd9e573fb0cb418d665660)) +* fix Twig Edition examples by adding missing Twig namespaces to config ([b4c20ef](https://github.com/pattern-lab/patternlab-node/commit/b4c20ef88ee0d3010760584c6f05ff7f92b711a6)) +* minor CSS fixes + fresh prod build ([8ac2c1f](https://github.com/pattern-lab/patternlab-node/commit/8ac2c1fa1c7558ed2ac50755f599a438d682ee2a)) +* re-enable displaying the top level `All` link if PL isn't configured to hide this specific link in the ishControlsHide config option. Addresses [#1048](https://github.com/pattern-lab/patternlab-node/issues/1048) ([6bb4e1a](https://github.com/pattern-lab/patternlab-node/commit/6bb4e1ac6f38b47f93030c8c5bca62d5db2132e4)) +* re-enable using the defaultPattern config for the initial iframe page load if defined ([d645ea1](https://github.com/pattern-lab/patternlab-node/commit/d645ea15150061d7ad13741d2dc37b12b9786411)) +* regenerate fresh UIKit build after fixing main JS issues ([9ea34d2](https://github.com/pattern-lab/patternlab-node/commit/9ea34d2efe43cafacb3729ac113121ba51126344)) +* Rename Handlebars and Nunjucks extension setting to "extend" ([74e5af2](https://github.com/pattern-lab/patternlab-node/commit/74e5af28c4e714fdfc1db535b94c52f3dc14a3a4)) +* squashing minor UI bugs ([a8a606c](https://github.com/pattern-lab/patternlab-node/commit/a8a606cfb224f7041f53ff5026a84e13fa17914c)) +* temporarily disable Random and Disco viewport controls until the full JS logic for these is re-enabled ([14b9a19](https://github.com/pattern-lab/patternlab-node/commit/14b9a19e4dee9462f3784eae28066893cc893624)) +* temporarily downgrade Preact version so tooltip used for displaying viewport sizes renders correctly ([52dcf85](https://github.com/pattern-lab/patternlab-node/commit/52dcf85e756ee171ca993288d98f5b5ef9a0a24b)) +* update autoprefixer browserslist config to address warning messages ([5e52f2b](https://github.com/pattern-lab/patternlab-node/commit/5e52f2b0ed02e2002ca867368636c3c0dc79ff0a)) +* update initial PL iframe path default ([a26fbb9](https://github.com/pattern-lab/patternlab-node/commit/a26fbb956e13901d1751c435b76de65637191ca4)) +* update Javascript to address merge conflict issue with previous PR merge / recent release ([cf2ecc1](https://github.com/pattern-lab/patternlab-node/commit/cf2ecc154383c3e8abd56dc88484370bc58ac30b)) +* update styles for pattern state dots ([7728acc](https://github.com/pattern-lab/patternlab-node/commit/7728accc9a6e5cd83be451f7d74e522dfe721cad)) +* update the default pattern that displays in the Handlebars demo ([ff1d85f](https://github.com/pattern-lab/patternlab-node/commit/ff1d85f2852fc4f210841e8e0aaf14b55165ce58)) +* **starterkit:** remove config file ([f90e38a](https://github.com/pattern-lab/patternlab-node/commit/f90e38aa873dcff0dd08fe4dabc3b71bf95080b6)) +* **starterkit:** use handlebars meta files ([d8f5e12](https://github.com/pattern-lab/patternlab-node/commit/d8f5e12471bd783bd3755626701ecc17669fc761)) +* updates to address eslint / prettier issues ([d945acc](https://github.com/pattern-lab/patternlab-node/commit/d945acc13b8e4e36f3815b017fbc12266c323d1f)) +* updates to fix eslint / prettier issues; update packages/core to reuse root .eslintrc.js file ([5b7a057](https://github.com/pattern-lab/patternlab-node/commit/5b7a057d46ccd16b5832af1441030c7b76f237a8)) +* use 100% of the screen available when JS is disabled / the first time the iframe loads up ([c0c5bff](https://github.com/pattern-lab/patternlab-node/commit/c0c5bff7a63b157d5b81dc2bcecee9e732ecfd4e)) +* **uikit:** clear out "404" responses when loading tabs ([73874b1](https://github.com/pattern-lab/patternlab-node/commit/73874b1b0b66ca6425c2b74331d417efdb529e2e)) +* **uikit-workshop:** fix merge problem ([d245b3b](https://github.com/pattern-lab/patternlab-node/commit/d245b3bca044c29f281052bf2feb95eeffafcf6b)) + + +### Features + +* **core:** invoke registered plugin hooks ([a54d775](https://github.com/pattern-lab/patternlab-node/commit/a54d7753b6939fe6a58da543f4fb34f64dd8901a)) +* **edition-node:** switch to engine-handlebars ([b481e22](https://github.com/pattern-lab/patternlab-node/commit/b481e22dc1f41ddd4da709621640a15190fba257)) +* **engine-handlebars:** Default location for helpers, like engine-nunjucks ([11c4180](https://github.com/pattern-lab/patternlab-node/commit/11c41805e0c3dbebb7109719c4f3c780d32feab5)) +* **engine-handlebars:** Demonstration of custom Handlebars helper ([f330b5b](https://github.com/pattern-lab/patternlab-node/commit/f330b5bca72f2f34bfafe5c2c64e6b0b8823eb1c)) +* **engine-handlebars:** Document the Helpers feature ([a01e040](https://github.com/pattern-lab/patternlab-node/commit/a01e040429a7f77dfeb28d67c690e835b97881de)) +* **engine-handlebars:** Load Handlebars helpers specified in the config ([a12df36](https://github.com/pattern-lab/patternlab-node/commit/a12df36d2a644dfac8ded1dfd94b987e99c29d79)) +* **engine-nunjucks:** Configurable extension locations; Use usePatternlabConfig() ([e54e3b3](https://github.com/pattern-lab/patternlab-node/commit/e54e3b3d48f934d3a4d44b9f4ff262f742a4aaf9)) +* **engine-react:** set package to private ([3aea881](https://github.com/pattern-lab/patternlab-node/commit/3aea8815f19df5b527cdda0b75cf99a9a8c3bc1e)) +* **plugin-tab:** pivot to using hook functions ([d4b2598](https://github.com/pattern-lab/patternlab-node/commit/d4b25984fc2a2646cc1876a5c635f57593c35f09)) +* **plugin-tab, core:** initial plugin hook exploration ([2f3d39a](https://github.com/pattern-lab/patternlab-node/commit/2f3d39ac6b125ad4c6b872e27ee224ce2ea33a12)) +* **starterkits:** add starterkit-handlebars-demo ([384d2cf](https://github.com/pattern-lab/patternlab-node/commit/384d2cfa3440c1e6f456d39f56ca6381f82f7689)) +* **uikit-workshop:** add plugin-loader ([fc966d6](https://github.com/pattern-lab/patternlab-node/commit/fc966d6b151e24055bc2f4146d6a90b5fb392765)) +* introduce netlify preview ([6c5d332](https://github.com/pattern-lab/patternlab-node/commit/6c5d332479fb6836bd8bd5530a074d13440f8ae4)) +* remove pre-built uikit dist folder and switch to auto-building when bootstrapping OR when publishing to NPM ([b5dd553](https://github.com/pattern-lab/patternlab-node/commit/b5dd5538ee00ddf1da321851865fa1c223cedb43)) +* switch to Yarn + Yarn workspaces ([f4c4ec3](https://github.com/pattern-lab/patternlab-node/commit/f4c4ec33cd30d372c87ffa904fbe7d5b819ee14e)) +* update Node to v12 ([fcbb970](https://github.com/pattern-lab/patternlab-node/commit/fcbb970648cdd775c9a88078f14c1f24c5b62d73)) + + +### Reverts + +* don't flatten folders containing only one item inside ([77f1f46](https://github.com/pattern-lab/patternlab-node/commit/77f1f46595328bd96fba46347b532295c65802d1)) + + +### BREAKING CHANGES + +* **core:** plugins now use async functions instead of events +* **plugin-tab:** event based listeners replaced with functions +* **cli:** previously, we concatenated arrays, which is unlikely to be intended +* **edition-node:** use handlebars over mustache diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..75ecbe287 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,17 @@ +# This is a comment. +# Each line is a file pattern followed by one or more owners. + +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, +# @global-owner1 and @global-owner2 will be requested for +# review when someone opens a pull request. +@pattern-lab/trusted-committers + +# CLI owner +/packages/cli @raphaelokon + +# uikit-workshop owner +/packages/uikit-workshop @sghoweri + +# engine-nunjucks owner +/packages/engine-nunjucks @danwhite85 diff --git a/README.md b/README.md index c284ea698..cd621433a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- Pattern Lab Logo + Pattern Lab Logo

# Pattern Lab @@ -16,21 +16,33 @@ If you'd like to see what a front-end project built with Pattern Lab looks like, [![node (scoped)](https://img.shields.io/node/v/@pattern-lab/patternlab-node.svg)]() [![Join the chat at Gitter](https://badges.gitter.im/pattern-lab/node.svg)](https://gitter.im/pattern-lab/node) +Docs @ [![Netlify Status](https://api.netlify.com/api/v1/badges/d454dbde-02c5-4bd4-8393-4ab75e862b03/deploy-status)](https://app.netlify.com/sites/patternlab-docs-preview/deploys) + +Pattern Lab Preview @ [![Netlify Status](https://api.netlify.com/api/v1/badges/a6db1666-cb4f-4d26-82d4-9d88d875f286/deploy-status)](https://app.netlify.com/sites/patternlab-handlebars-preview/deploys) + ## Using Pattern Lab Refer to the [core usage guidelines](https://github.com/pattern-lab/patternlab-node/blob/master/packages/core/README.md#usage) ### Installation -Installation is still in flux due to the monorepo transition. Bear with us as we figure this out. Our intent is to ship the Pattern Lab Node CLI soon which will help new and existing users. +As of Pattern Lab Node 3.0.0, installation of [Editions](http://patternlab.io/docs/advanced-ecosystem-overview.html) is accomplished via the command line interface. -_In the meantime..._ +The below assumes a new directory and project is required. This is likely what you want to do if starting from scratch. You could also run this within an existing project. The CLI will ask you for the installation location. -if you already have an Edition tracking 3.X alphas, you can update using the [standard instructions](https://github.com/pattern-lab/patternlab-node/wiki/Upgrading#3x-instructions). +1. Open a terminal window and following along below: + ```bash + mkdir new-project + cd new-project + npm create pattern-lab + ``` + > If you get an error stating that `npx` is not installed, ensure you are on `npm 5.2.0` or later by running `npm -v` or install it globally with `npm install -g npx`. [Learn more about npx.](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) +1. Follow the on-screen prompts to choose your Edition and a Starterkit should you want one. + - If you chose `edition-node`, new commands in the "scripts" will be added in your `package.json`. + - If you chose `edition-node-gulp`, a `gulpfile.js` will be added to your project. -if you don't mind pulling down everything and playing with it locally, clone this repo and follow the instructions for [developing locally](https://github.com/pattern-lab/patternlab-node/blob/master/.github/CONTRIBUTING.md#developing-locally). + > Notice that `@pattern-lab/cli` was installed as a depdendency. Learn how to further [use the cli in your own project](https://github.com/pattern-lab/patternlab-node/blob/dev/packages/cli/readme.md#configuring-your-project-to-use-the-cli). -if you don't yet have a 3.X compatible Edition and want to try something a bit messier (and unsupported for now), you could attempt this [workaround](https://github.com/pattern-lab/patternlab-node/issues/813). ## Ecosystem @@ -38,6 +50,13 @@ if you don't yet have a 3.X compatible Edition and want to try something a bit m Core, and Editions, are part of the [Pattern Lab Ecosystem](http://patternlab.io/docs/advanced-ecosystem-overview.html). With this architecture, we encourage people to write and maintain their own Editions, Starterkits, and even PatternEngines. +## Changelog + +[Each package within this monorepo](https://github.com/pattern-lab/patternlab-node/tree/master/packages) has its own changelog. Below are the main ones to watch: + +* [@pattern-lab/core changelog ](https://github.com/pattern-lab/patternlab-node/blob/master/packages/core/CHANGELOG.md) +* [@pattern-lab/cli changelog ](https://github.com/pattern-lab/patternlab-node/blob/master/packages/cli/CHANGELOG.md) + ## Support for Pattern Lab Pattern Lab / Node wouldn't be what it is today without the support of the community. It will always be free and open source. Continued development is made possible in part from the support of [these wonderful project supporters](https://github.com/pattern-lab/patternlab-node/wiki/Thanks). If you want to learn more about supporting the project, visit the [Pattern Lab / Node Patreon page](https://www.patreon.com/patternlab). @@ -45,9 +64,10 @@ Pattern Lab / Node wouldn't be what it is today without the support of the commu **:100: Thanks for support from the following:** * **[Brad Frost](http://bradfrost.com/)** +* Jan Ditze * [Marcos Peebles](https://twitter.com/marcospeebles) +* [Maximilian Franzke](https://twitter.com/maedmaex) * [Susan Simkins](https://twitter.com/susanmsimkins) -* [Wilfred Nas](https://twitter.com/wnas) ## Contributing diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 000000000..6960ccf61 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,27 @@ +module.exports = { + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: 'current', + }, + }, + ], + ], + plugins: [ + /** + * 1. Helps with our Web Component Preact renderer + */ + '@babel/plugin-syntax-jsx' /* [1] */, + [ + '@babel/plugin-transform-react-jsx' /* [1] */, + { + pragma: 'h', + pragmaFrag: '"span"', + throwIfNamespace: false, + useBuiltIns: false, + }, + ], + ], +}; diff --git a/lerna.json b/lerna.json index 79a18e651..84951f7f0 100644 --- a/lerna.json +++ b/lerna.json @@ -1,15 +1,38 @@ { - "lerna": "2.9.0", + "lerna": "3.11.0", + "version": "5.9.3", "packages": [ "packages/*" ], - "version": "independent", "command": { "init": { "exact": true + }, + "publish": { + "allowBranch": [ + "master", + "dev" + ], + "conventionalCommits": true, + "gitReset": true, + "includeMergedTags": true, + "noCommitHooks": true, + "verifyAccess": true + }, + "changed": { + "includeMergedTags": true } }, + "ignoreChanges": [ + "**/__fixtures__/**", + "**/__tests__/**", + "**/*.md", + "**/__snapshots__/**" + ], + "npmClient": "yarn", "npmClientArgs": [ + "--ignore-optional", "--registry=https://registry.npmjs.org/" - ] + ], + "useWorkspaces": true } diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 000000000..94337a4da --- /dev/null +++ b/netlify.toml @@ -0,0 +1,2 @@ +[context.deploy-preview] + command = "yarn setup && yarn preview:hbs && yarn preview:docs" diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 9513bfa86..000000000 --- a/package-lock.json +++ /dev/null @@ -1,3347 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==" - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" - } - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" - }, - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "1.0.3" - } - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "1.0.3" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" - }, - "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "bind-obj-methods": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-1.0.0.tgz", - "integrity": "sha1-T1l5ysFXk633DkiBYeRj4gnKUJw=" - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "requires": { - "callsites": "0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, - "ci-info": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz", - "integrity": "sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA==" - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" - }, - "clean-yaml-object": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g=" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.4", - "typedarray": "0.0.6" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "coveralls": { - "version": "2.13.3", - "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz", - "integrity": "sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==", - "requires": { - "js-yaml": "3.6.1", - "lcov-parse": "0.0.10", - "log-driver": "1.2.5", - "minimist": "1.2.0", - "request": "2.79.0" - }, - "dependencies": { - "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" - }, - "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", - "requires": { - "hoek": "2.16.3" - } - }, - "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" - }, - "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", - "requires": { - "boom": "2.10.1" - } - }, - "form-data": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=", - "requires": { - "chalk": "1.1.3", - "commander": "2.14.1", - "is-my-json-valid": "2.17.2", - "pinkie-promise": "2.0.1" - } - }, - "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" - }, - "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=", - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "js-yaml": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz", - "integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=", - "requires": { - "argparse": "1.0.10", - "esprima": "2.7.3" - } - }, - "qs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz", - "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw=" - }, - "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=", - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.11.0", - "combined-stream": "1.0.6", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "2.0.6", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.18", - "oauth-sign": "0.8.2", - "qs": "6.3.2", - "stringstream": "0.0.5", - "tough-cookie": "2.3.4", - "tunnel-agent": "0.4.3", - "uuid": "3.2.1" - } - }, - "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", - "requires": { - "hoek": "2.16.3" - } - }, - "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" - } - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "requires": { - "esutils": "2.0.2" - } - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz", - "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", - "requires": { - "ajv": "5.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.3.2", - "concat-stream": "1.6.1", - "cross-spawn": "5.1.0", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", - "esquery": "1.0.0", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.3.0", - "ignore": "3.3.7", - "imurmurhash": "0.1.4", - "inquirer": "3.3.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.10.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.5", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "require-uncached": "1.0.3", - "semver": "5.5.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", - "table": "4.0.2", - "text-table": "0.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "requires": { - "has-flag": "3.0.0" - } - } - } - }, - "eslint-config-prettier": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz", - "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", - "requires": { - "get-stdin": "5.0.1" - } - }, - "eslint-plugin-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", - "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", - "requires": { - "fast-diff": "1.1.2", - "jest-docblock": "21.2.0" - } - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" - } - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "requires": { - "acorn": "5.5.3", - "acorn-jsx": "3.0.1" - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" - }, - "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", - "requires": { - "estraverse": "4.2.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "requires": { - "estraverse": "4.2.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "events-to-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", - "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=" - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", - "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.19", - "tmp": "0.0.33" - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" - }, - "fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" - } - }, - "foreground-child": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", - "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", - "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", - "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", - "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" - } - } - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "fs-exists-cached": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", - "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "function-loop": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz", - "integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "requires": { - "is-property": "1.0.2" - } - }, - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "globals": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==" - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "husky": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", - "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", - "requires": { - "is-ci": "1.1.0", - "normalize-path": "1.0.0", - "strip-indent": "2.0.0" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.3.2", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.1.0", - "figures": "2.0.0", - "lodash": "4.17.5", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "requires": { - "has-flag": "3.0.0" - } - } - } - }, - "is-ci": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", - "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", - "requires": { - "ci-info": "1.1.2" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==" - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "is-my-ip-valid": "1.0.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "requires": { - "is-path-inside": "1.0.1" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "requires": { - "path-is-inside": "1.0.2" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jest-docblock": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", - "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", - "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "lcov-parse": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", - "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "log-driver": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz", - "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=" - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "minipass": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz", - "integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==", - "requires": { - "yallist": "3.0.2" - }, - "dependencies": { - "yallist": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", - "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=" - } - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "mri": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.0.tgz", - "integrity": "sha1-XAo/KcjM/7ux7JQdzsCdcfoy82o=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" - }, - "normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=" - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "2.0.1" - } - }, - "nyc": { - "version": "11.4.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.4.1.tgz", - "integrity": "sha512-5eCZpvaksFVjP2rt1r60cfXmt3MUtsQDw8bAzNqNEr4WLvUMLgiVENMf/B9bE9YAX0mGVvaGA3v9IS9ekNqB1Q==", - "requires": { - "archy": "1.0.0", - "arrify": "1.0.1", - "caching-transform": "1.0.1", - "convert-source-map": "1.5.1", - "debug-log": "1.0.1", - "default-require-extensions": "1.0.0", - "find-cache-dir": "0.1.1", - "find-up": "2.1.0", - "foreground-child": "1.5.6", - "glob": "7.1.2", - "istanbul-lib-coverage": "1.1.1", - "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "md5-hex": "1.3.0", - "merge-source-map": "1.0.4", - "micromatch": "2.3.11", - "mkdirp": "0.5.1", - "resolve-from": "2.0.0", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "spawn-wrap": "1.4.2", - "test-exclude": "4.1.1", - "yargs": "10.0.3", - "yargs-parser": "8.0.0" - }, - "dependencies": { - "align-text": { - "version": "0.1.4", - "bundled": true, - "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" - } - }, - "amdefine": { - "version": "1.0.1", - "bundled": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "ansi-styles": { - "version": "2.2.1", - "bundled": true - }, - "append-transform": { - "version": "0.4.0", - "bundled": true, - "requires": { - "default-require-extensions": "1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true - }, - "arr-diff": { - "version": "2.0.0", - "bundled": true, - "requires": { - "arr-flatten": "1.1.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "bundled": true - }, - "array-unique": { - "version": "0.2.1", - "bundled": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true - }, - "async": { - "version": "1.5.2", - "bundled": true - }, - "babel-code-frame": { - "version": "6.26.0", - "bundled": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - } - }, - "babel-generator": { - "version": "6.26.0", - "bundled": true, - "requires": { - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "detect-indent": "4.0.0", - "jsesc": "1.3.0", - "lodash": "4.17.4", - "source-map": "0.5.7", - "trim-right": "1.0.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "bundled": true, - "requires": { - "babel-runtime": "6.26.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "bundled": true, - "requires": { - "core-js": "2.5.3", - "regenerator-runtime": "0.11.1" - } - }, - "babel-template": { - "version": "6.26.0", - "bundled": true, - "requires": { - "babel-runtime": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "lodash": "4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "bundled": true, - "requires": { - "babel-code-frame": "6.26.0", - "babel-messages": "6.23.0", - "babel-runtime": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "debug": "2.6.9", - "globals": "9.18.0", - "invariant": "2.2.2", - "lodash": "4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "bundled": true, - "requires": { - "babel-runtime": "6.26.0", - "esutils": "2.0.2", - "lodash": "4.17.4", - "to-fast-properties": "1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "bundled": true - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true - }, - "brace-expansion": { - "version": "1.1.8", - "bundled": true, - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "bundled": true, - "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" - } - }, - "builtin-modules": { - "version": "1.1.1", - "bundled": true - }, - "caching-transform": { - "version": "1.0.1", - "bundled": true, - "requires": { - "md5-hex": "1.3.0", - "mkdirp": "0.5.1", - "write-file-atomic": "1.3.4" - } - }, - "camelcase": { - "version": "1.2.1", - "bundled": true, - "optional": true - }, - "center-align": { - "version": "0.1.3", - "bundled": true, - "optional": true, - "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "cliui": { - "version": "2.1.0", - "bundled": true, - "optional": true, - "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "bundled": true, - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "commondir": { - "version": "1.0.1", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - }, - "convert-source-map": { - "version": "1.5.1", - "bundled": true - }, - "core-js": { - "version": "2.5.3", - "bundled": true - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "requires": { - "lru-cache": "4.1.1", - "which": "1.3.0" - } - }, - "debug": { - "version": "2.6.9", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - }, - "debug-log": { - "version": "1.0.1", - "bundled": true - }, - "decamelize": { - "version": "1.2.0", - "bundled": true - }, - "default-require-extensions": { - "version": "1.0.0", - "bundled": true, - "requires": { - "strip-bom": "2.0.0" - } - }, - "detect-indent": { - "version": "4.0.0", - "bundled": true, - "requires": { - "repeating": "2.0.1" - } - }, - "error-ex": { - "version": "1.3.1", - "bundled": true, - "requires": { - "is-arrayish": "0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true - }, - "esutils": { - "version": "2.0.2", - "bundled": true - }, - "execa": { - "version": "0.7.0", - "bundled": true, - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "bundled": true, - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - } - } - }, - "expand-brackets": { - "version": "0.1.5", - "bundled": true, - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "bundled": true, - "requires": { - "fill-range": "2.2.3" - } - }, - "extglob": { - "version": "0.3.2", - "bundled": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "bundled": true - }, - "fill-range": { - "version": "2.2.3", - "bundled": true, - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - } - }, - "find-cache-dir": { - "version": "0.1.1", - "bundled": true, - "requires": { - "commondir": "1.0.1", - "mkdirp": "0.5.1", - "pkg-dir": "1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "bundled": true, - "requires": { - "locate-path": "2.0.0" - } - }, - "for-in": { - "version": "1.0.2", - "bundled": true - }, - "for-own": { - "version": "0.1.5", - "bundled": true, - "requires": { - "for-in": "1.0.2" - } - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "requires": { - "cross-spawn": "4.0.2", - "signal-exit": "3.0.2" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "get-caller-file": { - "version": "1.0.2", - "bundled": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "glob-base": { - "version": "0.3.0", - "bundled": true, - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "bundled": true, - "requires": { - "is-glob": "2.0.1" - } - }, - "globals": { - "version": "9.18.0", - "bundled": true - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "handlebars": { - "version": "4.0.11", - "bundled": true, - "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" - }, - "dependencies": { - "source-map": { - "version": "0.4.4", - "bundled": true, - "requires": { - "amdefine": "1.0.1" - } - } - } - }, - "has-ansi": { - "version": "2.0.0", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "has-flag": { - "version": "1.0.0", - "bundled": true - }, - "hosted-git-info": { - "version": "2.5.0", - "bundled": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "invariant": { - "version": "2.2.2", - "bundled": true, - "requires": { - "loose-envify": "1.3.1" - } - }, - "invert-kv": { - "version": "1.0.0", - "bundled": true - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true - }, - "is-buffer": { - "version": "1.1.6", - "bundled": true - }, - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-dotfile": { - "version": "1.0.3", - "bundled": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "bundled": true, - "requires": { - "is-primitive": "2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "bundled": true - }, - "is-extglob": { - "version": "1.0.0", - "bundled": true - }, - "is-finite": { - "version": "1.0.2", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-glob": { - "version": "2.0.1", - "bundled": true, - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "bundled": true, - "requires": { - "kind-of": "3.2.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "bundled": true - }, - "is-primitive": { - "version": "2.0.0", - "bundled": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "is-utf8": { - "version": "0.2.1", - "bundled": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true - }, - "isobject": { - "version": "2.1.0", - "bundled": true, - "requires": { - "isarray": "1.0.0" - } - }, - "istanbul-lib-coverage": { - "version": "1.1.1", - "bundled": true - }, - "istanbul-lib-hook": { - "version": "1.1.0", - "bundled": true, - "requires": { - "append-transform": "0.4.0" - } - }, - "istanbul-lib-instrument": { - "version": "1.9.1", - "bundled": true, - "requires": { - "babel-generator": "6.26.0", - "babel-template": "6.26.0", - "babel-traverse": "6.26.0", - "babel-types": "6.26.0", - "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", - "semver": "5.4.1" - } - }, - "istanbul-lib-report": { - "version": "1.1.2", - "bundled": true, - "requires": { - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "path-parse": "1.0.5", - "supports-color": "3.2.3" - }, - "dependencies": { - "supports-color": { - "version": "3.2.3", - "bundled": true, - "requires": { - "has-flag": "1.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "1.2.2", - "bundled": true, - "requires": { - "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", - "mkdirp": "0.5.1", - "rimraf": "2.6.2", - "source-map": "0.5.7" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "bundled": true, - "requires": { - "ms": "2.0.0" - } - } - } - }, - "istanbul-reports": { - "version": "1.1.3", - "bundled": true, - "requires": { - "handlebars": "4.0.11" - } - }, - "js-tokens": { - "version": "3.0.2", - "bundled": true - }, - "jsesc": { - "version": "1.3.0", - "bundled": true - }, - "kind-of": { - "version": "3.2.2", - "bundled": true, - "requires": { - "is-buffer": "1.1.6" - } - }, - "lazy-cache": { - "version": "1.0.4", - "bundled": true, - "optional": true - }, - "lcid": { - "version": "1.0.0", - "bundled": true, - "requires": { - "invert-kv": "1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "bundled": true, - "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - }, - "dependencies": { - "path-exists": { - "version": "3.0.0", - "bundled": true - } - } - }, - "lodash": { - "version": "4.17.4", - "bundled": true - }, - "longest": { - "version": "1.0.1", - "bundled": true - }, - "loose-envify": { - "version": "1.3.1", - "bundled": true, - "requires": { - "js-tokens": "3.0.2" - } - }, - "lru-cache": { - "version": "4.1.1", - "bundled": true, - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "md5-hex": { - "version": "1.3.0", - "bundled": true, - "requires": { - "md5-o-matic": "0.1.1" - } - }, - "md5-o-matic": { - "version": "0.1.1", - "bundled": true - }, - "mem": { - "version": "1.1.0", - "bundled": true, - "requires": { - "mimic-fn": "1.1.0" - } - }, - "merge-source-map": { - "version": "1.0.4", - "bundled": true, - "requires": { - "source-map": "0.5.7" - } - }, - "micromatch": { - "version": "2.3.11", - "bundled": true, - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - }, - "mimic-fn": { - "version": "1.1.0", - "bundled": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "requires": { - "brace-expansion": "1.1.8" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true - }, - "normalize-package-data": { - "version": "2.4.0", - "bundled": true, - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.4.1", - "validate-npm-package-license": "3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "bundled": true, - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "requires": { - "path-key": "2.0.1" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "object.omit": { - "version": "2.0.1", - "bundled": true, - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, - "once": { - "version": "1.4.0", - "bundled": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "requires": { - "minimist": "0.0.8", - "wordwrap": "0.0.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-locale": { - "version": "2.1.0", - "bundled": true, - "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "bundled": true - }, - "p-limit": { - "version": "1.1.0", - "bundled": true - }, - "p-locate": { - "version": "2.0.0", - "bundled": true, - "requires": { - "p-limit": "1.1.0" - } - }, - "parse-glob": { - "version": "3.0.4", - "bundled": true, - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, - "parse-json": { - "version": "2.2.0", - "bundled": true, - "requires": { - "error-ex": "1.3.1" - } - }, - "path-exists": { - "version": "2.1.0", - "bundled": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true - }, - "path-parse": { - "version": "1.0.5", - "bundled": true - }, - "path-type": { - "version": "1.1.0", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "pify": { - "version": "2.3.0", - "bundled": true - }, - "pinkie": { - "version": "2.0.4", - "bundled": true - }, - "pinkie-promise": { - "version": "2.0.1", - "bundled": true, - "requires": { - "pinkie": "2.0.4" - } - }, - "pkg-dir": { - "version": "1.0.0", - "bundled": true, - "requires": { - "find-up": "1.1.2" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - } - } - }, - "preserve": { - "version": "0.2.0", - "bundled": true - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true - }, - "randomatic": { - "version": "1.1.7", - "bundled": true, - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "bundled": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "bundled": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "bundled": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "read-pkg": { - "version": "1.1.0", - "bundled": true, - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "bundled": true, - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "bundled": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - } - } - }, - "regenerator-runtime": { - "version": "0.11.1", - "bundled": true - }, - "regex-cache": { - "version": "0.4.4", - "bundled": true, - "requires": { - "is-equal-shallow": "0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "bundled": true - }, - "repeat-element": { - "version": "1.1.2", - "bundled": true - }, - "repeat-string": { - "version": "1.6.1", - "bundled": true - }, - "repeating": { - "version": "2.0.1", - "bundled": true, - "requires": { - "is-finite": "1.0.2" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true - }, - "resolve-from": { - "version": "2.0.0", - "bundled": true - }, - "right-align": { - "version": "0.1.3", - "bundled": true, - "optional": true, - "requires": { - "align-text": "0.1.4" - } - }, - "rimraf": { - "version": "2.6.2", - "bundled": true, - "requires": { - "glob": "7.1.2" - } - }, - "semver": { - "version": "5.4.1", - "bundled": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "slide": { - "version": "1.1.6", - "bundled": true - }, - "source-map": { - "version": "0.5.7", - "bundled": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "requires": { - "foreground-child": "1.5.6", - "mkdirp": "0.5.1", - "os-homedir": "1.0.2", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "which": "1.3.0" - } - }, - "spdx-correct": { - "version": "1.0.2", - "bundled": true, - "requires": { - "spdx-license-ids": "1.2.2" - } - }, - "spdx-expression-parse": { - "version": "1.0.4", - "bundled": true - }, - "spdx-license-ids": { - "version": "1.2.2", - "bundled": true - }, - "string-width": { - "version": "2.1.1", - "bundled": true, - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true - }, - "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "2.0.0", - "bundled": true, - "requires": { - "is-utf8": "0.2.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true - }, - "supports-color": { - "version": "2.0.0", - "bundled": true - }, - "test-exclude": { - "version": "4.1.1", - "bundled": true, - "requires": { - "arrify": "1.0.1", - "micromatch": "2.3.11", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "require-main-filename": "1.0.1" - } - }, - "to-fast-properties": { - "version": "1.0.3", - "bundled": true - }, - "trim-right": { - "version": "1.0.1", - "bundled": true - }, - "uglify-js": { - "version": "2.8.29", - "bundled": true, - "optional": true, - "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - }, - "dependencies": { - "yargs": { - "version": "3.10.0", - "bundled": true, - "optional": true, - "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "validate-npm-package-license": { - "version": "3.0.1", - "bundled": true, - "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" - } - }, - "which": { - "version": "1.3.0", - "bundled": true, - "requires": { - "isexe": "2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "bundled": true - }, - "window-size": { - "version": "0.1.0", - "bundled": true, - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true - }, - "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "write-file-atomic": { - "version": "1.3.4", - "bundled": true, - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "slide": "1.1.6" - } - }, - "y18n": { - "version": "3.2.1", - "bundled": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true - }, - "yargs": { - "version": "10.0.3", - "bundled": true, - "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "find-up": "2.1.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "8.0.0" - }, - "dependencies": { - "cliui": { - "version": "3.2.0", - "bundled": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - } - } - }, - "yargs-parser": { - "version": "8.0.0", - "bundled": true, - "requires": { - "camelcase": "4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "bundled": true - } - } - } - } - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "1.2.0" - } - }, - "opener": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", - "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "own-or": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", - "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw=" - }, - "own-or-env": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz", - "integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==", - "requires": { - "own-or": "1.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", - "requires": { - "p-try": "1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "1.2.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "prettier": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.11.1.tgz", - "integrity": "sha512-T/KD65Ot0PB97xTrG8afQ46x3oiVhnfGjGESSI9NWYcG92+OUPZKkwHqGWXH2t9jK1crnQjubECW0FuOth+hxw==" - }, - "pretty-quick": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-1.4.1.tgz", - "integrity": "sha512-Q4V2GAflSaM739kKH63utbfI2n4s2fCDCyjFC4ykxA9ueb7FknLcLAZSKa3DejHMt5q9Fq395eKTZ9wYwoILBw==", - "requires": { - "chalk": "2.3.2", - "execa": "0.8.0", - "find-up": "2.1.0", - "ignore": "3.3.7", - "mri": "1.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "requires": { - "has-flag": "3.0.0" - } - } - } - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, - "readable-stream": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", - "integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "2.1.0" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "requires": { - "rx-lite": "4.0.8" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "requires": { - "is-fullwidth-code-point": "2.0.0" - } - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "requires": { - "source-map": "0.5.7" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - } - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "stack-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", - "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", - "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.3.2", - "lodash": "4.17.5", - "slice-ansi": "1.0.0", - "string-width": "2.1.1" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "requires": { - "has-flag": "3.0.0" - } - } - } - }, - "tap": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/tap/-/tap-11.1.1.tgz", - "integrity": "sha512-XpXmLJlDpPrGsaEJlpSV7u16kR/jaPUf5XyzdL59l8KsLNFSmQKH4qCEBKy9y+OCku9ee77NvobCsZLpK8ruZg==", - "requires": { - "bind-obj-methods": "1.0.0", - "bluebird": "3.5.1", - "clean-yaml-object": "0.1.0", - "color-support": "1.1.3", - "coveralls": "2.13.3", - "foreground-child": "1.5.6", - "fs-exists-cached": "1.0.0", - "function-loop": "1.0.1", - "glob": "7.1.2", - "isexe": "2.0.0", - "js-yaml": "3.10.0", - "minipass": "2.2.1", - "mkdirp": "0.5.1", - "nyc": "11.4.1", - "opener": "1.4.3", - "os-homedir": "1.0.2", - "own-or": "1.0.0", - "own-or-env": "1.0.1", - "rimraf": "2.6.2", - "signal-exit": "3.0.2", - "source-map-support": "0.4.18", - "stack-utils": "1.0.1", - "tap-mocha-reporter": "3.0.6", - "tap-parser": "7.0.0", - "tmatch": "3.1.0", - "trivial-deferred": "1.0.1", - "tsame": "1.1.2", - "write-file-atomic": "2.3.0", - "yapool": "1.0.0" - } - }, - "tap-mocha-reporter": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.6.tgz", - "integrity": "sha512-UImgw3etckDQCoqZIAIKcQDt0w1JLVs3v0yxLlmwvGLZl6MGFxF7JME5PElXjAoDklVDU42P3vVu5jgr37P4Yg==", - "requires": { - "color-support": "1.1.3", - "debug": "2.6.9", - "diff": "1.4.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "js-yaml": "3.10.0", - "readable-stream": "2.3.4", - "tap-parser": "5.4.0", - "unicode-length": "1.0.3" - }, - "dependencies": { - "diff": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz", - "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8=" - }, - "tap-parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-5.4.0.tgz", - "integrity": "sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==", - "requires": { - "events-to-array": "1.1.2", - "js-yaml": "3.10.0", - "readable-stream": "2.3.4" - } - } - } - }, - "tap-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-7.0.0.tgz", - "integrity": "sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA==", - "requires": { - "events-to-array": "1.1.2", - "js-yaml": "3.10.0", - "minipass": "2.2.1" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "tmatch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-3.1.0.tgz", - "integrity": "sha512-W3MSATOCN4pVu2qFxmJLIArSifeSOFqnfx9hiUaVgOmeRoI2NbU7RNga+6G+L8ojlFeQge+ZPCclWyUpQ8UeNQ==" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "1.0.2" - } - }, - "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "requires": { - "punycode": "1.4.1" - } - }, - "trivial-deferred": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", - "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM=" - }, - "tsame": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/tsame/-/tsame-1.1.2.tgz", - "integrity": "sha512-ovCs24PGjmByVPr9tSIOs/yjUX9sJl0grEmOsj9dZA/UknQkgPOKcUqM84aSCvt9awHuhc/boMzTg3BHFalxWw==" - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "unicode-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz", - "integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=", - "requires": { - "punycode": "1.4.1", - "strip-ansi": "3.0.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "1.3.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "requires": { - "isexe": "2.0.0" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "requires": { - "mkdirp": "0.5.1" - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yapool": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz", - "integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o=" - } - } -} diff --git a/package.json b/package.json index aff6447c8..d2c271c91 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,53 @@ { - "devDependencies": { - "lerna": "2.9.0" + "workspaces": { + "packages": [ + "packages/*" + ], + "nohoist": [ + "@pattern-lab/engine-*", + "**/@pattern-lab/engine-*", + "**/@pattern-lab/uikit-workshop" + ] + }, + "dependencies": { + "@babel/plugin-proposal-decorators": "^7.4.4", + "@babel/plugin-syntax-jsx": "^7.2.0", + "babel-eslint": "^10.0.2", + "eslint": "^6.1.0", + "eslint-config-airbnb-base": "^14.0.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-prettier": "^3.1.0", + "prettier": "^1.14.3", + "lerna": "3.17.0", + "pretty-quick": "^1.11.1", + "auto": "^7.8.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/pattern-lab/patternlab-node.git" }, + "private": true, "scripts": { - "bootstrap": "lerna bootstrap --hoist tap --hoist eslin* --hoist husky --hoist prettier --hoist pretty-quick", + "postinstall": "lerna run postbootstrap", + "setup": "yarn", + "build:uikit": "cd packages/uikit-workshop && npm run build", "precommit": "pretty-quick --staged", - "prettier": "prettier --config .prettierrc --write ./**/*.js", - "test": "tap packages/core/test/*_tests.js --reporter spec --coverage" + "lint:fix": "npm run lint -- --fix", + "lint": "eslint --max-warnings 0 './packages/{core,cli,uikit-workshop}/**/*.js ' --ignore-path .eslintignore", + "test": "lerna run test", + "clean": "git clean -dfx", + "publish": "npx lerna publish -m \"[skip travis] chore(release): publish %s\"", + "postpublish": "auto release", + "preview:docs": "cd packages/docs && yarn production", + "preview:hbs": "cd packages/development-edition-engine-handlebars && npx patternlab add --starterkits @pattern-lab/starterkit-handlebars-vanilla && npm run pl:build" }, "nyc": { "exclude": [ - "**/*_tests.js" + "**/*_tests.js", + "packages/cli", + "packages/core/test", + "packages/live-server" ] } } diff --git a/packages/cli/.eslintrc b/packages/cli/.eslintrc deleted file mode 100644 index 026fd1b2a..000000000 --- a/packages/cli/.eslintrc +++ /dev/null @@ -1,78 +0,0 @@ -{ - "env": { - "node": true, - "builtin": true, - "es6": true - }, - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "globals": {}, - "extends": ["prettier"], - "plugins": ["prettier"], - "rules": { - "prettier/prettier": "error", - "block-scoped-var": 0, - "camelcase": 0, - "consistent-return": 2, - "curly": [2, "all"], - "dot-notation": [1, { "allowKeywords": true }], - "eqeqeq": [2, "allow-null"], - "global-strict": [0, "never"], - "guard-for-in": 2, - "key-spacing": 0, - "new-cap": 0, - "no-alert": 2, - "no-bitwise": 2, - "no-caller": 2, - "no-cond-assign": [2, "except-parens"], - "no-debugger": 2, - "no-dupe-args": 2, - "no-dupe-keys": 2, - "no-empty": 2, - "no-eval": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-extra-parens": 0, - "no-func-assign": 2, - "no-implied-eval": 2, - "no-invalid-regexp": 2, - "no-irregular-whitespace": 1, - "no-iterator": 2, - "no-loop-func": 2, - "no-mixed-requires": 0, - "no-multi-str": 2, - "no-native-reassign": 2, - "no-new": 2, - "no-param-reassign": 1, - "no-proto": 2, - "no-redeclare": 0, - "no-script-url": 2, - "no-self-assign": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-shadow": 2, - "no-undef": 2, - "no-underscore-dangle": 0, - "no-unreachable": 1, - "no-unused-vars": 1, - "no-use-before-define": 1, - "no-useless-call": 2, - "no-useless-concat": 2, - "no-var": 2, - "no-with": 2, - "quotes": [0, "single"], - "radix": 2, - "strict": 0, - "valid-typeof": 2, - "vars-on-top": 0, - "prefer-const": [ - "error", - { - "destructuring": "any", - "ignoreReadBeforeAssign": false - } - ] - } -} diff --git a/packages/cli/.gitattributes b/packages/cli/.gitattributes index 9e2529733..141034634 100644 --- a/packages/cli/.gitattributes +++ b/packages/cli/.gitattributes @@ -1,2 +1,3 @@ * text=auto +bin/patternlab.js lf readme.md merge=union diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore index be6f1bb0e..55a89459b 100644 --- a/packages/cli/.gitignore +++ b/packages/cli/.gitignore @@ -67,7 +67,7 @@ Network Trash Folder Temporary Items .apdisk -# PatternLab CLI specific +# Pattern Lab CLI specific .DS_Store latest-change.txt diff --git a/packages/cli/.npmrc b/packages/cli/.npmrc new file mode 100644 index 000000000..ce73f58bf --- /dev/null +++ b/packages/cli/.npmrc @@ -0,0 +1,2 @@ +package-lock=false +save-exact=true diff --git a/packages/cli/.nvmrc b/packages/cli/.nvmrc new file mode 100644 index 000000000..a13e7b9c8 --- /dev/null +++ b/packages/cli/.nvmrc @@ -0,0 +1 @@ +10.0.0 diff --git a/packages/cli/.travis.yml b/packages/cli/.travis.yml index 877a0f9dd..1f0e15052 100644 --- a/packages/cli/.travis.yml +++ b/packages/cli/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: - node - - 6 + - 8 before_script: - npm install edition-node - npm install starterkit-mustache-base diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 9a6cd35f6..3f84d02ec 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -3,31 +3,290 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -## [0.0.1-alpha.15](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.14...@pattern-lab/cli@0.0.1-alpha.15) (2018-03-21) +## [5.9.3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v5.9.2...v5.9.3) (2020-05-01) + + +### Bug Fixes + +* **cli:** fix test script glob ([ff18eb5](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/ff18eb51ce24fc5423b009168e85ede366069139)) + + + + + + +## [5.9.1](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v5.9.0...v5.9.1) (2020-04-24) + + +### Bug Fixes + +* **cli:** ensure specified directory exists prior to scaffold ([cc3b696](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/cc3b69624d486c94ee3b1f4b1bbb0334a514fa59)) + + + + + +# [5.9.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v5.8.0...v5.9.0) (2020-04-24) + + +### Bug Fixes + +* **cli:** set current working directory before scaffolded npm init ([6d2186d](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/6d2186d8e8a74634198a4474ca8ae83221dd70a9)) + + + + + +# [5.7.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v5.6.0...v5.7.0) (2020-02-17) ### Features -* **package:** standardize and hoist common devDependencies ([7f4ce6f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/7f4ce6f)) +* **cli:** make options more user friendly ([ad845b3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/ad845b394ef81f90895ebb5bc6f12cc608e5e3d4)) - -## [0.0.1-alpha.14](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.13...@pattern-lab/cli@0.0.1-alpha.14) (2018-03-05) + + +# [5.4.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v5.3.3...v5.4.0) (2019-11-26) + +**Note:** Version bump only for package @pattern-lab/cli + + + + + +# [5.3.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v5.2.0...v5.3.0) (2019-11-13) + +**Note:** Version bump only for package @pattern-lab/cli + + + + + +# [5.1.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v5.0.2...v5.1.0) (2019-10-29) + +**Note:** Version bump only for package @pattern-lab/cli + + + + + +# [5.0.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/v3.0.0-beta.3...v5.0.0) (2019-10-25) ### Bug Fixes -* **config:** Add npm registry to lerna config ([1473cd5](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/1473cd5)) +* updates to fix eslint / prettier issues; update packages/core to reuse root .eslintrc.js file ([5b7a057](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/5b7a057d46ccd16b5832af1441030c7b76f237a8)) +* **cli:** add custom install logic to edition-node ([f04fd26](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/f04fd266429cd806987dab747e6d69bff9b926a4)) +* **cli:** allow any package to be installed as a starterkit ([d2aa1be](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/d2aa1be810a0a7473dcc52391a2263dacfdda0b8)), closes [#1067](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/issues/1067) +* **cli:** merge config arrays via overwrite instead of concatenate ([42e5f7b](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/42e5f7b42a26b4fc1f262c68ee4b474b546f2eac)) +* **cli:** proper path resolution to helpers ([a18fe5e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/a18fe5ef4d1c074a5eba8bfa255ebbee2261bf74)) +* **cli:** re-order and clarify engines ([e39e301](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/e39e301a33306c6615fabf64262f1893ca682b97)) +* **plugin:** correct spelling error and function locations ([d4abd88](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/d4abd88cb017550002407241b5045a2ad1adb1dc)) + + +### Features + +* **starterkits:** add starterkit-handlebars-demo ([384d2cf](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/384d2cfa3440c1e6f456d39f56ca6381f82f7689)) + + +### BREAKING CHANGES + +* **cli:** previously, we concatenated arrays, which is unlikely to be intended + + + + + + +## [1.0.3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@1.0.2...@pattern-lab/cli@1.0.3) (2019-10-14) + +**Note:** Version bump only for package @pattern-lab/cli + + + + + + +# [1.0.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.1.0...@pattern-lab/cli@1.0.0) (2019-08-23) + + +### Bug Fixes + +* **cli:** merge config arrays via overwrite instead of concatenate ([42e5f7b](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/42e5f7b)) +* **cli:** proper path resolution to helpers ([a18fe5e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/a18fe5e)) + + +### BREAKING CHANGES + +* **cli:** previously, we concatenated arrays, which is unlikely to be intended + + + + + +# [0.1.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.3...@pattern-lab/cli@0.1.0) (2019-08-23) + + +### Bug Fixes + +* updates to fix eslint / prettier issues; update packages/core to reuse root .eslintrc.js file ([5b7a057](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/5b7a057)) +* **cli:** add custom install logic to edition-node ([f04fd26](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/f04fd26)) +* **cli:** re-order and clarify engines ([e39e301](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/e39e301)) + + +### Features + +* **starterkits:** add starterkit-handlebars-demo ([384d2cf](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/384d2cf)) + + +## [0.0.3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.3-alpha.0...@pattern-lab/cli@0.0.3) (2019-05-16) + +**Note:** Version bump only for package @pattern-lab/cli + + + + + +## [0.0.1-beta.2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-beta.0...@pattern-lab/cli@0.0.1-beta.2) (2019-02-09) + + +### Bug Fixes + +* **cli:** do not call build before serve ([663d8e1](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/663d8e1)), closes [#917](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/issues/917) +* **cli:** pass watch options cleanly to core ([8bf186b](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/8bf186b)) +* **cli:** remove copy-source-files ([64311a1](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/64311a1)), closes [#833](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/issues/833) +* **nvmrc:** bump Node version ([36a917f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/36a917f)) +* manually bump package.json versions of packages published in September but with mismatched package.json versions ([98dfadf](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/98dfadf)) + + +### Features + +* **README:** simplify README and add CLI configuration instructions ([ceec673](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/ceec673)) + + + + + + +## [0.0.1-beta.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.23...@pattern-lab/cli@0.0.1-beta.0) (2018-09-07) + + +### Bug Fixes + +* **cli:** set initialized to false during plugin installation ([88cce3f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/88cce3f)) +* **cli:** support scoped plugins ([4ae13ce](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/4ae13ce)) +* **package:** update tap dependency ([2b70ff4](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/2b70ff4)) + + + + + + + +## [0.0.1-alpha.23](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.22...@pattern-lab/cli@0.0.1-alpha.23) (2018-07-09) + +### Bug Fixes + +* **install:** copy dependencies ([1acef87](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/1acef87)) + + + +## [0.0.1-alpha.22](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.21...@pattern-lab/cli@0.0.1-alpha.22) (2018-07-06) + +**Note:** Version bump only for package @pattern-lab/cli + + + +## [0.0.1-alpha.21](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.20...@pattern-lab/cli@0.0.1-alpha.21) (2018-07-06) + +### Bug Fixes + +* **install:** add break statements to install edition command ([3b1813c](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/3b1813c)) +* **install:** use process to find package.json ([200c7cb](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/200c7cb)) + +### Features + +* **package:** add npmrc file ([55f5bc2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/55f5bc2)) +* **package:** pin all dependencies ([415698e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/415698e)) +* **package:** remove package-lock.json files ([5ab3995](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/5ab3995)) + + + +## [0.0.1-alpha.20](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.19...@pattern-lab/cli@0.0.1-alpha.20) (2018-07-05) + +### Bug Fixes + +* **cli:** change whitespace to spaces per standard ([4556fc7](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/4556fc7)) +* **tests:** change test command name similar to live-server until this passes CI ([5c39be1](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/5c39be1)) + +### Features + +* **serve:** change calling method ([3b86a0d](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/3b86a0d)) +* **tests:** use lerna run test at the monorepo level ([38a01b1](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/38a01b1)) + + + +## [0.0.1-alpha.19](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.18...@pattern-lab/cli@0.0.1-alpha.19) (2018-05-19) + +### Bug Fixes + +* **cli:** change line-endings of cli entrypoint ([3fc86c2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/3fc86c2)) +* **wording:** reconcile Pattern Lab vs PatternLab ([f3d1e0d](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/f3d1e0d)) + + + +## [0.0.1-alpha.18](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.17...@pattern-lab/cli@0.0.1-alpha.18) (2018-05-04) + +### Bug Fixes + +* **version:** use static core method getVersion ([f9dcd4d](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/f9dcd4d)) + + + +## [0.0.1-alpha.17](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.16...@pattern-lab/cli@0.0.1-alpha.17) (2018-05-04) + +### Bug Fixes + +* **package:** update publish config and installation target ([27d2c8f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/27d2c8f)) + + + +## [0.0.1-alpha.16](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.15...@pattern-lab/cli@0.0.1-alpha.16) (2018-05-04) + +### Features + +* **API:** standardize v() and version() into a single call ([6309e69](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/6309e69)) + +### BREAKING CHANGES + +* **API:** change `version()` to return a string representation of the version, removing `v()` + + + +## [0.0.1-alpha.15](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.14...@pattern-lab/cli@0.0.1-alpha.15) (2018-03-21) + +### Features + +* **package:** standardize and hoist common devDependencies ([7f4ce6f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/7f4ce6f)) + + + +## [0.0.1-alpha.14](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/compare/@pattern-lab/cli@0.0.1-alpha.13...@pattern-lab/cli@0.0.1-alpha.14) (2018-03-05) + +### Bug Fixes + +* **config:** Add npm registry to lerna config ([1473cd5](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli/commit/1473cd5)) + -## 0.0.1-alpha.13 (2018-03-02) +## 0.0.1-alpha.13 (2018-03-02) ### Features diff --git a/packages/cli/bin/archive.js b/packages/cli/bin/archive.js index 10e71d4cc..9d7a6989c 100644 --- a/packages/cli/bin/archive.js +++ b/packages/cli/bin/archive.js @@ -1,5 +1,5 @@ 'use strict'; -const fs = require('fs-promise'); +const fs = require('fs'); const path = require('path'); const Archiver = require('archiver'); const isValidConfig = require('./validate-config'); @@ -8,46 +8,46 @@ const debug = require('./utils').debug; /** * @func exportPatterns * @desc Exports the patterns into the patternExportDirectory. - * @param {object} config - The passed PatternLab config. + * @param {object} config - The passed Pattern Lab config. */ function exportPatterns(config) { - if (!isValidConfig) { - throw new TypeError( - 'export: Expects config not to be empty OR of type object if not empty.' - ); - } + if (!isValidConfig) { + throw new TypeError( + 'export: Expects config not to be empty OR of type object if not empty.' + ); + } - const archive = new Archiver('zip', {}); - const exportsPath = path.resolve( - './', - config.patternExportDirectory, - 'patterns.zip' - ); - const output = fs.createWriteStream(exportsPath); + const archive = new Archiver('zip', {}); + const exportsPath = path.resolve( + './', + config.patternExportDirectory, + 'patterns.zip' + ); + const output = fs.createWriteStream(exportsPath); - output.on('close', () => { - debug( - `export: Exported patterns in ${exportsPath} - ${archive.pointer()} total bytes.` - ); - }); + output.on('close', () => { + debug( + `export: Exported patterns in ${exportsPath} - ${archive.pointer()} total bytes.` + ); + }); - archive.on('error', function(err) { - throw new TypeError( - `export: An error occured during zipping the patterns: ${err}` - ); - }); + archive.on('error', function(err) { + throw new TypeError( + `export: An error occured during zipping the patterns: ${err}` + ); + }); - archive.pipe(output); + archive.pipe(output); - archive - .glob( - '?(_patterns|_data|_meta|_annotations)/**', - { - cwd: config.paths.source.root, - }, - {} - ) - .finalize(); + archive + .glob( + '?(_patterns|_data|_meta|_annotations)/**', + { + cwd: config.paths.source.root, + }, + {} + ) + .finalize(); } module.exports = exportPatterns; diff --git a/packages/cli/bin/ask.js b/packages/cli/bin/ask.js index d0dde731e..55a337230 100644 --- a/packages/cli/bin/ask.js +++ b/packages/cli/bin/ask.js @@ -8,42 +8,42 @@ const ask = inquirer.prompt; /** * @func init - * @desc Initiates a PatternLab project by getting user input through inquiry. Scaffolds the project and download mandatory files + * @desc Initiates a Pattern Lab project by getting user input through inquiry. Scaffolds the project and download mandatory files * @param {object} options - Options passed in from CLI * @param {boolean} options.force - Flag whether to force install in existing project directory. May overwrite stuff. */ const init = options => - wrapsAsync(function*() { - /** - * @property {string} project_root="./" - Path to the project root directory - * @property {string|Symbol} edition - The name of the edition npm package or a Symbol for no install - */ - const editionAnswers = yield ask(editionSetup); + wrapsAsync(function*() { + /** + * @property {string} project_root="./" - Path to the project root directory + * @property {string|Symbol} edition - The name of the edition npm package or a Symbol for no install + */ + const editionAnswers = yield ask(editionSetup); - /** - * @property {object|Symbol} starterkit - The name of a starterkit npm package or a Symbol for no install - */ - const starterkitAnswers = yield ask(starterkitSetup); + /** + * @property {object|Symbol} starterkit - The name of a starterkit npm package or a Symbol for no install + */ + const starterkitAnswers = yield ask(starterkitSetup); - /** - * @property {boolean} confirm - A bool hold the confirmation status - */ - const confirmation = yield ask(confirmSetup); + /** + * @property {boolean} confirm - A bool hold the confirmation status + */ + const confirmation = yield ask(confirmSetup); - // IF we have no confirmation we start all over again. - if (!confirmation.confirm) { - return init(options); - } + // IF we have no confirmation we start all over again. + if (!confirmation.confirm) { + return init(options); + } - return { - // Destructure the answers - projectDir: editionAnswers.project_root, - edition: editionAnswers.edition !== false ? editionAnswers.edition : '', - starterkit: - starterkitAnswers.starterkit !== false - ? starterkitAnswers.starterkit - : '', - }; - }); + return { + // Destructure the answers + projectDir: editionAnswers.project_root, + edition: editionAnswers.edition !== false ? editionAnswers.edition : '', + starterkit: + starterkitAnswers.starterkit !== false + ? starterkitAnswers.starterkit + : '', + }; + }); module.exports = init; diff --git a/packages/cli/bin/build.js b/packages/cli/bin/build.js index 06f9ed757..51108a33d 100644 --- a/packages/cli/bin/build.js +++ b/packages/cli/bin/build.js @@ -5,34 +5,34 @@ const isValidConfig = require('./validate-config'); /** * @func build - * @desc Init patternLab core and build the PatternLab files. - * @param {object} config - The passed PatternLab config. + * @desc Init patternLab core and build the Pattern Lab files. + * @param {object} config - The passed Pattern Lab config. * @param {object} options - Additional opts to specify build mode. */ function build(config, options) { - if (!isValidConfig) { - throw new TypeError( - 'build: Expects config not to be empty and of type object.' - ); - } + if (!isValidConfig) { + throw new TypeError( + 'build: Expects config not to be empty and of type object.' + ); + } - // Initiate PatternLab core with the config - const patternLab = pl(config); + // Initiate Pattern Lab core with the config + const patternLab = pl(config); - /** - * Check whether a flag was passed for build - * 1. Build only patterns - * 2. Normal build - */ - if (options && options.patternsOnly) { - // 1 - debug(`build: Building only patterns now into ${config.paths.public.root}`); - return patternLab.patternsonly(config.cleanPublic); - } else { - // 2 - debug(`build: Building your project now into ${config.paths.public.root}`); - return patternLab.build(config.cleanPublic); - } + /** + * Check whether a flag was passed for build + * 1. Build only patterns + * 2. Normal build + */ + if (options && options.patternsOnly) { + // 1 + debug(`build: Building only patterns now into ${config.paths.public.root}`); + return patternLab.patternsonly(config.cleanPublic); + } else { + // 2 + debug(`build: Building your project now into ${config.paths.public.root}`); + return patternLab.build(config.cleanPublic); + } } module.exports = build; diff --git a/packages/cli/bin/cli-actions/build.js b/packages/cli/bin/cli-actions/build.js index 9651d15ec..c6a34434a 100644 --- a/packages/cli/bin/cli-actions/build.js +++ b/packages/cli/bin/cli-actions/build.js @@ -1,19 +1,17 @@ 'use strict'; const buildPatterns = require('../build'); -const copyFiles = require('../copy-source-files'); const resolveConfig = require('../resolve-config'); const { error, info, wrapAsync } = require('../utils'); const build = options => - wrapAsync(function*() { - try { - const config = yield resolveConfig(options.parent.config); - yield copyFiles(config.paths); - yield buildPatterns(config, options); - info(`build: Yay, your PatternLab project was successfully built ☺`); - } catch (err) { - error(err); - } - }); + wrapAsync(function*() { + try { + const config = yield resolveConfig(options.parent.config); + yield buildPatterns(config, options); + info(`build: Yay, your Pattern Lab project was successfully built ☺`); + } catch (err) { + error(err); + } + }); module.exports = build; diff --git a/packages/cli/bin/cli-actions/disable.js b/packages/cli/bin/cli-actions/disable.js index 5222518e9..6c53cb5a2 100644 --- a/packages/cli/bin/cli-actions/disable.js +++ b/packages/cli/bin/cli-actions/disable.js @@ -11,29 +11,32 @@ const writeJsonAsync = require('../utils').writeJsonAsync; * @param {object} options */ const enable = options => - wrapAsync(function*() { - const { parent: { config: configPath }, plugins } = options; - const config = yield resolveConfig(configPath); + wrapAsync(function*() { + const { + parent: { config: configPath }, + plugins, + } = options; + const config = yield resolveConfig(configPath); - const spinner = ora(`⊙ patternlab → Disable …`).start(); + const spinner = ora(`⊙ patternlab → Disable …`).start(); - if (plugins && Array.isArray(plugins)) { - spinner.succeed( - `⊙ patternlab → Disable following plugins: ${plugins.join(', ')}` - ); - plugins.map(plugin => { - if (_.has(config, `plugins[${plugin}]`)) { - _.set(config, `plugins[${plugin}]['enabled']`, false); - spinner.succeed( - `⊙ patternlab → Disabled following plugin: ${plugin}` - ); - } else { - spinner.warn(`⊙ patternlab → Couldn't find plugin: ${plugin}`); - } - }); - } - yield writeJsonAsync(options.parent.config, config); - spinner.succeed(`⊙ patternlab → Updated config`); - }); + if (plugins && Array.isArray(plugins)) { + spinner.succeed( + `⊙ patternlab → Disable following plugins: ${plugins.join(', ')}` + ); + plugins.map(plugin => { + if (_.has(config, `plugins[${plugin}]`)) { + _.set(config, `plugins[${plugin}]['enabled']`, false); + spinner.succeed( + `⊙ patternlab → Disabled following plugin: ${plugin}` + ); + } else { + spinner.warn(`⊙ patternlab → Couldn't find plugin: ${plugin}`); + } + }); + } + yield writeJsonAsync(options.parent.config, config); + spinner.succeed(`⊙ patternlab → Updated config`); + }); module.exports = enable; diff --git a/packages/cli/bin/cli-actions/enable.js b/packages/cli/bin/cli-actions/enable.js index 17ed14326..0edb57401 100644 --- a/packages/cli/bin/cli-actions/enable.js +++ b/packages/cli/bin/cli-actions/enable.js @@ -11,27 +11,30 @@ const writeJsonAsync = require('../utils').writeJsonAsync; * @param {object} options */ const enable = options => - wrapAsync(function*() { - const { parent: { config: configPath }, plugins } = options; - const config = yield resolveConfig(configPath); + wrapAsync(function*() { + const { + parent: { config: configPath }, + plugins, + } = options; + const config = yield resolveConfig(configPath); - const spinner = ora(`⊙ patternlab → Enable …`).start(); + const spinner = ora(`⊙ patternlab → Enable …`).start(); - if (plugins && Array.isArray(plugins)) { - spinner.succeed( - `⊙ patternlab → Enable following plugins: ${plugins.join(', ')}` - ); - plugins.map(plugin => { - if (_.has(config, `plugins[${plugin}]`)) { - _.set(config, `plugins[${plugin}]['enabled']`, true); - spinner.succeed(`⊙ patternlab → Enabled following plugin: ${plugin}`); - } else { - spinner.warn(`⊙ patternlab → Couldn't find plugin: ${plugin}`); - } - }); - } - yield writeJsonAsync(options.parent.config, config); - spinner.succeed(`⊙ patternlab → Updated config`); - }); + if (plugins && Array.isArray(plugins)) { + spinner.succeed( + `⊙ patternlab → Enable following plugins: ${plugins.join(', ')}` + ); + plugins.map(plugin => { + if (_.has(config, `plugins[${plugin}]`)) { + _.set(config, `plugins[${plugin}]['enabled']`, true); + spinner.succeed(`⊙ patternlab → Enabled following plugin: ${plugin}`); + } else { + spinner.warn(`⊙ patternlab → Couldn't find plugin: ${plugin}`); + } + }); + } + yield writeJsonAsync(options.parent.config, config); + spinner.succeed(`⊙ patternlab → Updated config`); + }); module.exports = enable; diff --git a/packages/cli/bin/cli-actions/export.js b/packages/cli/bin/cli-actions/export.js index 989a00687..5f4f4ebc7 100644 --- a/packages/cli/bin/cli-actions/export.js +++ b/packages/cli/bin/cli-actions/export.js @@ -4,9 +4,9 @@ const resolveConfig = require('../resolve-config'); const wrapAsync = require('../utils').wrapAsync; const _export = options => - wrapAsync(function*() { - const config = yield resolveConfig(options.parent.config); - archive(config); - }); + wrapAsync(function*() { + const config = yield resolveConfig(options.parent.config); + archive(config); + }); module.exports = _export; diff --git a/packages/cli/bin/cli-actions/help.js b/packages/cli/bin/cli-actions/help.js index 1c7806b21..6448e7749 100644 --- a/packages/cli/bin/cli-actions/help.js +++ b/packages/cli/bin/cli-actions/help.js @@ -1,10 +1,10 @@ 'use strict'; module.exports = () => { - /* eslint-disable */ - console.log(` + /* eslint-disable */ + console.log(` Examples: - $ patternlab init # Initialize a PatternLab project.'); - $ patternlab # Builds the PatternLab from the current dir'); - $ patternlab --config # PatternLab from a config in a specified directory');`); - /* eslint-enable */ + $ patternlab init # Initialize a Pattern Lab project.'); + $ patternlab # Builds Pattern Lab from the current dir'); + $ patternlab --config # Pattern Lab from a config in a specified directory');`); + /* eslint-enable */ }; diff --git a/packages/cli/bin/cli-actions/init.js b/packages/cli/bin/cli-actions/init.js index aaf14fa89..afc715a99 100644 --- a/packages/cli/bin/cli-actions/init.js +++ b/packages/cli/bin/cli-actions/init.js @@ -1,5 +1,6 @@ 'use strict'; const patternlab = require('@pattern-lab/core'); +const merge = require('deepmerge'); const ask = require('../ask'); const scaffold = require('../scaffold'); const installEdition = require('../install-edition'); @@ -12,60 +13,77 @@ const writeJsonAsync = require('../utils').writeJsonAsync; const defaultPatternlabConfig = patternlab.getDefaultConfig(); +// https://github.com/TehShrike/deepmerge#overwrite-array +const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray; + const init = options => - wrapAsync(function*() { - const sourceDir = 'source'; - const publicDir = 'public'; - const exportDir = 'pattern_exports'; - const answers = options.projectDir ? options : yield ask(options); - const projectDir = answers.projectDir || './'; - const edition = answers.edition; - const starterkit = answers.starterkit; + wrapAsync(function*() { + const sourceDir = 'source'; + const publicDir = 'public'; + const exportDir = 'pattern_exports'; + const answers = options.projectDir ? options : yield ask(options); + const projectDir = answers.projectDir || './'; + const edition = answers.edition; + const starterkit = answers.starterkit; - /** - * Process the init routines - * 1 Replace config paths - * 2. Scaffold the folder structure - * 3. If `edition` is present: - * 3.1 Install edition - * 3.2 Reassign adjustedconfig - * 4. If `starterkit` is present install it and copy over the mandatory starterkit files to sourceDir - * 5. Save patternlab-config.json in projectDir - */ - const spinner = ora( - `Setting up PatternLab project in ${projectDir}` - ).start(); - let patternlabConfig = replaceConfigPaths( - defaultPatternlabConfig, - projectDir, - sourceDir, - publicDir, - exportDir - ); // 1 + /** + * Process the init routines + * 1 Replace config paths + * 2. Scaffold the folder structure + * 3. If `edition` is present: + * 3.1 Install edition + * 3.2 Reassign adjustedconfig + * 4. If `starterkit` is present install it and copy over the mandatory starterkit files to sourceDir + * 5. Save patternlab-config.json in projectDir + */ + const spinner = ora(`Setting up Pattern Lab in ${projectDir}`).start(); + let patternlabConfig = replaceConfigPaths( + defaultPatternlabConfig, + projectDir, + sourceDir, + publicDir, + exportDir + ); // 1 - yield scaffold(projectDir, sourceDir, publicDir, exportDir); // 2 + yield scaffold(projectDir, sourceDir, publicDir, exportDir); // 2 - if (edition) { - spinner.text = `⊙ patternlab → Installing edition: ${edition}`; - const newConf = yield installEdition(edition, patternlabConfig); // 3.1 - patternlabConfig = Object.assign(patternlabConfig, newConf); // 3.2 - spinner.succeed(`⊙ patternlab → Installed edition: ${edition}`); - } - if (starterkit) { - spinner.text = `⊙ patternlab → Installing starterkit ${starterkit}`; - spinner.start(); - yield installStarterkit(starterkit, patternlabConfig); - spinner.succeed(`⊙ patternlab → Installed starterkit: ${starterkit}`); - } // 4 - yield writeJsonAsync( - path.resolve(projectDir, 'patternlab-config.json'), - patternlabConfig - ); // 5 + if (edition) { + spinner.text = `⊙ patternlab → Installing edition: ${edition}`; + const newConf = yield installEdition( + edition, + patternlabConfig, + projectDir + ); // 3.1 + if (newConf) { + patternlabConfig = merge(patternlabConfig, newConf, { + arrayMerge: overwriteMerge, + }); // 3.2 + } + spinner.succeed(`⊙ patternlab → Installed edition: ${edition}`); + } + if (starterkit) { + spinner.text = `⊙ patternlab → Installing starterkit ${starterkit}`; + spinner.start(); + const starterkitConfig = yield installStarterkit( + starterkit, + patternlabConfig + ); + spinner.succeed(`⊙ patternlab → Installed starterkit: ${starterkit}`); + if (starterkitConfig) { + patternlabConfig = merge(patternlabConfig, starterkitConfig, { + arrayMerge: overwriteMerge, + }); + } + } // 4 + yield writeJsonAsync( + path.resolve(projectDir, 'patternlab-config.json'), + patternlabConfig + ); // 5 - spinner.succeed( - `⊙ patternlab → Yay ☺. PatternLab Node was successfully initialised in ${projectDir}` - ); - return true; - }); + spinner.succeed( + `⊙ patternlab → Yay ☺. Pattern Lab Node was successfully initialized in ${projectDir}` + ); + return true; + }); module.exports = init; diff --git a/packages/cli/bin/cli-actions/install.js b/packages/cli/bin/cli-actions/install.js index 598cf04fa..28aa8a445 100644 --- a/packages/cli/bin/cli-actions/install.js +++ b/packages/cli/bin/cli-actions/install.js @@ -12,54 +12,54 @@ const writeJsonAsync = require('../utils').writeJsonAsync; * @param {object} options */ const install = options => - wrapAsync(function*() { - const config = yield resolveConfig(options.parent.config); + wrapAsync(function*() { + const config = yield resolveConfig(options.parent.config); - const spinner = ora( - `⊙ patternlab → Installing additional resources …` - ).start(); + const spinner = ora( + `⊙ patternlab → Installing additional resources …` + ).start(); - if (options.starterkits && Array.isArray(options.starterkits)) { - const starterkits = yield Promise.all( - options.starterkits.map(starterkit => - wrapAsync(function*() { - spinner.text = `⊙ patternlab → Installing starterkit: ${starterkit}`; - return yield installStarterkit( - { - name: starterkit, - value: starterkit, - }, - config - ); - }) - ) - ); - spinner.succeed( - `⊙ patternlab → Installed following starterkits: ${starterkits.join( - ', ' - )}` - ); - } - if (options.plugins && Array.isArray(options.plugins)) { - const plugins = yield Promise.all( - options.plugins.map(plugin => - wrapAsync(function*() { - return yield installPlugin( - { - name: plugin, - value: plugin, - }, - config - ); - }) - ) - ); - spinner.succeed( - `⊙ patternlab → Installed following plugins: ${plugins.join(', ')}` - ); - } - yield writeJsonAsync(options.parent.config, config); - spinner.succeed(`⊙ patternlab → Updated config`); - }); + if (options.starterkits && Array.isArray(options.starterkits)) { + const starterkits = yield Promise.all( + options.starterkits.map(starterkit => + wrapAsync(function*() { + spinner.text = `⊙ patternlab → Installing starterkit: ${starterkit}`; + return yield installStarterkit( + { + name: starterkit, + value: starterkit, + }, + config + ); + }) + ) + ); + spinner.succeed( + `⊙ patternlab → Installed following starterkits: ${starterkits.join( + ', ' + )}` + ); + } + if (options.plugins && Array.isArray(options.plugins)) { + const plugins = yield Promise.all( + options.plugins.map(plugin => + wrapAsync(function*() { + return yield installPlugin( + { + name: plugin, + value: plugin, + }, + config + ); + }) + ) + ); + spinner.succeed( + `⊙ patternlab → Installed following plugins: ${plugins.join(', ')}` + ); + } + yield writeJsonAsync(options.parent.config, config); + spinner.succeed(`⊙ patternlab → Updated config`); + }); module.exports = install; diff --git a/packages/cli/bin/cli-actions/serve.js b/packages/cli/bin/cli-actions/serve.js index d303519da..6e2cc8fd2 100644 --- a/packages/cli/bin/cli-actions/serve.js +++ b/packages/cli/bin/cli-actions/serve.js @@ -1,14 +1,12 @@ 'use strict'; const resolveConfig = require('../resolve-config'); -const build = require('./build'); const servePatterns = require('../serve'); const wrapAsync = require('../utils').wrapAsync; const serve = options => - wrapAsync(function*() { - const config = yield resolveConfig(options.parent.config); - yield build(options); - servePatterns(config, options.watch); - }); + wrapAsync(function*() { + const config = yield resolveConfig(options.parent.config); + servePatterns(config, options); + }); module.exports = serve; diff --git a/packages/cli/bin/cli-actions/version.js b/packages/cli/bin/cli-actions/version.js index 8dc62863f..9332488b0 100644 --- a/packages/cli/bin/cli-actions/version.js +++ b/packages/cli/bin/cli-actions/version.js @@ -1,8 +1,5 @@ 'use strict'; const patternlab = require('@pattern-lab/core'); -const config = Object.assign(patternlab.getDefaultConfig(), { - logLevel: 'quiet', -}); module.exports = ({ version }) => - `${version} (PatternLab Node Core version: ${patternlab(config).v()})`; + `${version} (Pattern Lab Node Core version: ${patternlab.getVersion()})`; diff --git a/packages/cli/bin/copy-source-files.js b/packages/cli/bin/copy-source-files.js deleted file mode 100644 index 694552988..000000000 --- a/packages/cli/bin/copy-source-files.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -const copy = require('./utils').copyWithPattern; -const debug = require('./utils').debug; -const wrapAsync = require('./utils').wrapAsync; - -/** - * @func copyFilesFromSourceToPublic - * @desc Copies files from the source path to the public path. - * @param {object} paths - The passed PatternLab config paths member. - * @return {Array} - */ -const copyFilesFromSourceToPublic = paths => - wrapAsync(function*() { - // Copy files over - const copiedFiles = [ - copy(paths.source.styleguide, '*', paths.public.root), - copy(paths.source.js, '**/*.js', paths.public.js), - copy(paths.source.css, '*.css', paths.public.css), - copy(paths.source.images, '*', paths.public.images), - copy(paths.source.fonts, '*', paths.public.fonts), - copy(paths.source.root, 'favicon.ico', paths.public.root), - ]; - debug(`build: Your files were copied over to ${paths.public.root}`); - return yield Promise.all(copiedFiles); - }); - -module.exports = copyFilesFromSourceToPublic; diff --git a/packages/cli/bin/inquiries/confirm.js b/packages/cli/bin/inquiries/confirm.js index a28c8145b..9cabdf88d 100644 --- a/packages/cli/bin/inquiries/confirm.js +++ b/packages/cli/bin/inquiries/confirm.js @@ -1,12 +1,12 @@ 'use strict'; /** confirmSetup {Array} - Inquirer question to confirm selection */ const confirmSetup = [ - { - type: 'confirm', - name: 'confirm', - message: 'Are you happy with your choices? (Hit enter for YES)?', - default: true, - }, + { + type: 'confirm', + name: 'confirm', + message: 'Are you happy with your choices? (Hit enter for YES)?', + default: true, + }, ]; module.exports = confirmSetup; diff --git a/packages/cli/bin/inquiries/edition.js b/packages/cli/bin/inquiries/edition.js index d32ccaf25..f62dba232 100644 --- a/packages/cli/bin/inquiries/edition.js +++ b/packages/cli/bin/inquiries/edition.js @@ -3,42 +3,38 @@ const inquirer = require('inquirer'); /** editionSetup {Array} - Inquirer question logic for first question regarding editions */ const editionSetup = [ - { - type: 'input', - name: 'project_root', - message: 'Please specify a directory for your PatternLab project.', - default: () => './', - }, - { - type: 'list', - name: 'edition', - message: 'Which edition do you want to use (defaults to edition-node)?', - choices: [ - { - name: 'edition-node', - value: '@pattern-lab/edition-node', - }, - { - name: 'edition-node-grunt', - value: '@pattern-lab/edition-node-grunt', - }, - { - name: 'edition-node-gulp', - value: '@pattern-lab/edition-node-gulp', - }, - new inquirer.Separator(), - { - name: 'None', - value: false, - }, - ], - default: function() { - return { - name: 'edition-node', - value: '@pattern-lab/edition-node', - }; - }, - }, + { + type: 'input', + name: 'project_root', + message: 'Please specify a directory for your Pattern Lab project.', + default: () => './', + }, + { + type: 'list', + name: 'edition', + message: 'What templating language do you want to use with Pattern Lab?', + choices: [ + { + name: 'Handlebars', + value: '@pattern-lab/edition-node', + }, + { + name: 'Twig (PHP)', + value: '@pattern-lab/edition-twig', + }, + new inquirer.Separator(), + { + name: 'None', + value: false, + }, + ], + default: function() { + return { + name: 'Handlebars', + value: '@pattern-lab/edition-node', + }; + }, + }, ]; module.exports = editionSetup; diff --git a/packages/cli/bin/inquiries/starterkit.js b/packages/cli/bin/inquiries/starterkit.js index 8287b846d..523eb64bc 100644 --- a/packages/cli/bin/inquiries/starterkit.js +++ b/packages/cli/bin/inquiries/starterkit.js @@ -4,74 +4,47 @@ const CUSTOM_STARTERKIT = Symbol('CUSTOM_STARTERKIT'); /** starterkitSetup {Array} - Inquirer question logic for regarding starterkits */ const starterkitSetup = [ - { - type: 'list', - name: 'starterkit', - message: 'Which starterkit do you want to use?', - choices: [ - { - name: 'starterkit-mustache-demo', - value: '@pattern-lab/starterkit-mustache-demo', - }, - { - name: 'starterkit-mustache-bootstrap', - value: 'starterkit-mustache-bootstrap', - }, - { - name: 'starterkit-mustache-foundation', - value: 'starterkit-mustache-foundation', - }, - { - name: 'starterkit-twig-base', - value: 'starterkit-twig-base', - }, - { - name: 'starterkit-twig-demo', - value: 'starterkit-twig-demo', - }, - { - name: 'starterkit-mustache-materialdesign', - value: 'starterkit-mustache-materialdesign', - }, - { - name: 'starterkit-twig-drupal-demo', - value: 'starterkit-twig-drupal-demo', - }, - { - name: 'starterkit-twig-drupal-minimal', - value: 'starterkit-twig-drupal-minimal', - }, - { - name: 'starterkit-mustache-webdesignday', - value: 'starterkit-mustache-webdesignday', - }, - { - name: 'starterkit-mustache-base', - value: '@pattern-lab/starterkit-mustache-base', - }, - new inquirer.Separator(), - { - name: 'Custom starterkit', - value: CUSTOM_STARTERKIT, - }, - new inquirer.Separator(), - { - name: 'None', - value: false, - }, - ], - default: { - name: 'starterkit-mustache-base', - value: 'starterkit-mustache-base', - }, - }, - { - name: 'starterkit', - message: 'Type the name of the custom starterkit to use:', - type: 'input', - when(answers) { - return answers.starterkit === CUSTOM_STARTERKIT; - }, - }, + { + type: 'list', + name: 'starterkit', + message: 'What initial patterns do you want included in your project?', + choices: [ + { + name: + 'Handlebars base patterns (some basic patterns to get started with)', + value: '@pattern-lab/starterkit-handlebars-vanilla', + }, + { + name: 'Handlebars demo patterns (full demo website and patterns)', + value: '@pattern-lab/starterkit-handlebars-demo', + }, + { + name: 'Twig (PHP) demo patterns (full demo website and patterns)', + value: '@pattern-lab/starterkit-twig-demo', + }, + new inquirer.Separator(), + { + name: 'Custom starterkit', + value: CUSTOM_STARTERKIT, + }, + new inquirer.Separator(), + { + name: 'Blank project (no patterns)', + value: false, + }, + ], + default: { + name: 'Handlebars demo patterns (full demo website and patterns)', + value: 'starterkit-handlebars-demo', + }, + }, + { + name: 'starterkit', + message: 'Type the name of the custom starterkit to use:', + type: 'input', + when(answers) { + return answers.starterkit === CUSTOM_STARTERKIT; + }, + }, ]; module.exports = starterkitSetup; diff --git a/packages/cli/bin/install-edition.js b/packages/cli/bin/install-edition.js index fb7ae8745..a8cffe72b 100644 --- a/packages/cli/bin/install-edition.js +++ b/packages/cli/bin/install-edition.js @@ -1,23 +1,109 @@ +/* eslint-disable no-param-reassign */ 'use strict'; + const path = require('path'); -const checkAndInstallPackage = require('./utils').checkAndInstallPackage; -const copyAsync = require('./utils').copyAsync; -const wrapAsync = require('./utils').wrapAsync; - -const installEdition = (edition, config) => - wrapAsync(function*() { - /** - * 1. Trigger edition install - * 2. Copy over the mandatory edition files to sourceDir - * 3. Adjust config paths - */ - const sourceDir = config.paths.source.root; - yield checkAndInstallPackage(edition); // 1 - yield copyAsync( - path.resolve('./node_modules', edition, 'source', '_meta'), - path.resolve(sourceDir, '_meta') - ); // 2 - return config; - }); +const merge = require('deepmerge'); +const EOL = require('os').EOL; +const { + checkAndInstallPackage, + copyAsync, + wrapAsync, + writeJsonAsync, + getJSONKey, +} = require('./utils'); + +// https://github.com/TehShrike/deepmerge#overwrite-array +const overwriteMerge = (destinationArray, sourceArray, options) => sourceArray; + +const installEdition = (edition, config, projectDir) => { + const pkg = require(path.resolve(projectDir, 'package.json')); + + return wrapAsync(function*() { + /** + * 1. Trigger edition install + * 2. Copy over the mandatory edition files to sourceDir + * 3. Copy dependencies defined in edition + * 4. Do custom post-install procedures for different core editions: + * 4.1 Copy gulpfile.js for edition-node-gulp + * 4.2 Copy scripts for edition-node + * 4.3 Copy items for edition-twig + */ + const sourceDir = config.paths.source.root; + yield checkAndInstallPackage(edition); // 1 + yield copyAsync( + path.resolve('./node_modules', edition, 'source', '_meta'), + path.resolve(sourceDir, '_meta') + ); // 2 + pkg.dependencies = Object.assign( + {}, + pkg.dependencies || {}, + yield getJSONKey(edition, 'dependencies') + ); // 3 + switch ( + edition // 4 + ) { + // 4.1 + case '@pattern-lab/edition-node-gulp': { + yield copyAsync( + path.resolve('./node_modules', edition, 'gulpfile.js'), + path.resolve(sourceDir, '../', 'gulpfile.js') + ); + break; + } + // 4.2 + case '@pattern-lab/edition-node': { + const editionPath = path.resolve('./node_modules', edition); + const editionConfigPath = path.resolve( + editionPath, + 'patternlab-config.json' + ); + + const editionConfig = require(editionConfigPath); + + pkg.scripts = Object.assign( + {}, + pkg.scripts || {}, + yield getJSONKey(edition, 'scripts') + ); + + yield copyAsync( + path.join(editionPath, path.sep, 'helpers', path.sep, 'test.js'), + path.resolve(sourceDir, '../', 'helpers/test.js') + ); + + config = merge(config, editionConfig, { arrayMerge: overwriteMerge }); + break; + } + // 4.3 + case '@pattern-lab/edition-twig': { + const editionPath = path.resolve('./node_modules', edition); + const editionConfigPath = path.resolve( + editionPath, + 'patternlab-config.json' + ); + const editionConfig = require(editionConfigPath); + + pkg.scripts = Object.assign( + {}, + pkg.scripts || {}, + yield getJSONKey(edition, 'scripts') + ); + + yield copyAsync( + path.resolve(editionPath, 'alter-twig.php'), + path.resolve(sourceDir, '../', 'alter-twig.php') + ); + + config = merge(config, editionConfig, { arrayMerge: overwriteMerge }); + break; + } + } + yield writeJsonAsync(path.resolve(projectDir, 'package.json'), pkg, { + spaces: 2, + EOL: EOL, + }); + return config; + }); +}; module.exports = installEdition; diff --git a/packages/cli/bin/install-plugin.js b/packages/cli/bin/install-plugin.js index 511adf859..f297bd62a 100644 --- a/packages/cli/bin/install-plugin.js +++ b/packages/cli/bin/install-plugin.js @@ -1,15 +1,33 @@ 'use strict'; + +const path = require('path'); + const _ = require('lodash'); + const checkAndInstallPackage = require('./utils').checkAndInstallPackage; const wrapAsync = require('./utils').wrapAsync; const installPlugin = (plugin, config) => - wrapAsync(function*() { - const name = plugin.name || plugin; - yield checkAndInstallPackage(name); - // Put the installed plugin in the patternlab-config.json - _.set(config, `plugins[${name}]['enabled']`, false); - return name; - }); + wrapAsync(function*() { + const name = plugin.name || plugin; + yield checkAndInstallPackage(name); + // Put the installed plugin in the patternlab-config.json + _.set(config, `plugins[${name}]['enabled']`, true); + _.set(config, `plugins[${name}]['initialized']`, false); + + // Get the options from the plugin, if any + const pluginPathConfig = path.resolve( + path.join(process.cwd(), 'node_modules', name, 'config.json') + ); + try { + const pluginConfigJSON = require(pluginPathConfig); + if (!_.has(config.plugins[name].options)) { + _.set(config, `plugins[${name}][options]`, pluginConfigJSON); + } + } catch (ex) { + //a config.json file is not required at this time + } + return name; + }); module.exports = installPlugin; diff --git a/packages/cli/bin/install-starterkit.js b/packages/cli/bin/install-starterkit.js index 725b311d8..f7ce2b61c 100644 --- a/packages/cli/bin/install-starterkit.js +++ b/packages/cli/bin/install-starterkit.js @@ -1,20 +1,26 @@ 'use strict'; const path = require('path'); -const checkAndInstallPackage = require('./utils').checkAndInstallPackage; -const copyAsync = require('./utils').copyAsync; -const wrapAsync = require('./utils').wrapAsync; +const fs = require('fs-extra'); +const { + copyAsync, + wrapAsync, + checkAndInstallPackage, + readJsonAsync, +} = require('./utils'); const installStarterkit = (starterkit, config) => - wrapAsync(function*() { - const sourceDir = config.paths.source.root; - const name = starterkit.value || starterkit; - const url = name.startsWith('@pattern-lab/') ? name : `pattern-lab/${name}`; - yield checkAndInstallPackage(name, url); - yield copyAsync( - path.resolve('./node_modules', name, 'dist'), - path.resolve(sourceDir) - ); - return name; - }); + wrapAsync(function*() { + const sourceDir = config.paths.source.root; + const name = starterkit.value || starterkit; + yield checkAndInstallPackage(name); + const kitPath = path.resolve('./node_modules', name); + yield copyAsync(path.resolve(kitPath, 'dist'), path.resolve(sourceDir)); + let kitConfig; + const kitConfigPath = path.resolve(kitPath, 'patternlab-config.json'); + if (fs.existsSync(kitConfigPath)) { + kitConfig = yield readJsonAsync(kitConfigPath); + } + return kitConfig; + }); module.exports = installStarterkit; diff --git a/packages/cli/bin/patternlab.js b/packages/cli/bin/patternlab.js index 51c812e3f..a76468994 100755 --- a/packages/cli/bin/patternlab.js +++ b/packages/cli/bin/patternlab.js @@ -1,6 +1,8 @@ #!/usr/bin/env node +/* eslint-disable no-unused-vars */ 'use strict'; const cli = require('commander'); +const path = require('path'); const build = require('./cli-actions/build'); const disable = require('./cli-actions/disable'); const enable = require('./cli-actions/enable'); @@ -19,13 +21,13 @@ log.on('patternlab.info', msg => console.log(msg)); // eslint-disable-line // Conditionally register verbose logging const verboseLogs = verbose => - log.on('patternlab.debug', msg => console.log(msg)); // eslint-disable-line + log.on('patternlab.debug', msg => console.log(msg)); // eslint-disable-line // Conditionally unregister all logging const silenceLogs = () => { - log.removeAllListeners('patternlab.debug'); - log.removeAllListeners('patternlab.info'); - log.removeAllListeners('patternlab.error'); + log.removeAllListeners('patternlab.debug'); + log.removeAllListeners('patternlab.info'); + log.removeAllListeners('patternlab.error'); }; // Split strings into an array @@ -35,102 +37,103 @@ const list = val => val.split(','); * Hook up cli version, usage and options */ cli - .version(version(pkg), '-V, --version') - .usage(' [options]') - .arguments(' [options]') - .option( - '-c, --config ', - 'Specify config file. Default looks up the project dir', - val => val.trim(), - './patternlab-config.json' - ) - .option('-v, --verbose', 'Show verbose console logs', verboseLogs) - .option('--silent', 'Turn off console logs', silenceLogs); + .version(version(pkg), '-V, --version') + .usage(' [options]') + .arguments(' [options]') + .option( + '-c, --config ', + 'Specify config file. Default looks up the project dir', + val => val.trim(), + path.resolve(process.cwd(), 'patternlab-config.json') + ) + .option('-v, --verbose', 'Show verbose console logs', verboseLogs) + .option('--silent', 'Turn off console logs', silenceLogs); /** * build - * @desc Setup patternlab's `build` cmd + * @desc Setup Pattern Lab's `build` cmd */ cli - .command('build') - .alias('compile') - .description('Build the PatternLab. Optionally (re-)build only the patterns') - .option('-p, --patterns-only', 'Whether to only build patterns') - .action(build); + .command('build') + .alias('compile') + .description('Build Pattern Lab. Optionally (re-)build only the patterns') + .option('-p, --patterns-only', 'Whether to only build patterns') + .option('--no-watch', 'Start watching for changes') + .action(build); /** * export - * @desc Export a PatternLab patterns into a compressed format + * @desc Export a Pattern Lab patterns into a compressed format */ cli - .command('export') - .description('Export a PatternLab patterns into a compressed format') - .action(exportPatterns); + .command('export') + .description('Export Pattern Lab patterns into a compressed format') + .action(exportPatterns); /** * init - * @desc Initialize a PatternLab project from scratch or import an edition and/or starterkit + * @desc Initialize a Pattern Lab project from scratch or import an edition and/or starterkit */ cli - .command('init') - .description( - 'Initialize a PatternLab project from scratch or import an edition and/or starterkit' - ) - .option('-p, --project-dir ', 'Specify a project directory') - .option('-e, --edition ', 'Specify an edition to install') - .option('-k, --starterkit ', 'Specify a starterkit to install') - .action(init); + .command('init') + .description( + 'Initialize a Pattern Lab project from scratch or import an edition and/or starterkit' + ) + .option('-p, --project-dir ', 'Specify a project directory') + .option('-e, --edition ', 'Specify an edition to install') + .option('-k, --starterkit ', 'Specify a starterkit to install') + .action(init); /** * install * @desc Installs Pattern Lab related modules like starterkits or plugins */ cli - .command('install') - .alias('add') - .description( - 'Installs Pattern Lab related modules like starterkits or plugins' - ) - .option( - '--starterkits ', - 'Specify one or more starterkit to install', - list - ) - .option('--plugins ', 'Specify one or more plugins to install', list) - .action(install); + .command('install') + .alias('add') + .description( + 'Installs Pattern Lab related modules like starterkits or plugins' + ) + .option( + '--starterkits ', + 'Specify one or more starterkit to install', + list + ) + .option('--plugins ', 'Specify one or more plugins to install', list) + .action(install); /** * enable * @desc Enable Pattern Lab plugins. Unavailable plugins are just skipped */ cli - .command('enable') - .alias('on') - .description('Enable Pattern Lab plugins') - .option('--plugins ', 'Specify one or more plugins to enable', list) - .action(enable); + .command('enable') + .alias('on') + .description('Enable Pattern Lab plugins') + .option('--plugins ', 'Specify one or more plugins to enable', list) + .action(enable); /** * disable * @desc Enable Pattern Lab plugins. Unavailable plugins are just skipped */ cli - .command('disable') - .alias('off') - .description('Disable Pattern Lab plugins') - .option('--plugins ', 'Specify one or more plugins to disable', list) - .action(disable); + .command('disable') + .alias('off') + .description('Disable Pattern Lab plugins') + .option('--plugins ', 'Specify one or more plugins to disable', list) + .action(disable); /** * serve * @desc Starts a server to inspect files in browser */ cli - .command('serve') - .alias('browse') - .description('Starts a server to inspect files in browser') - .option('-w, --watch', 'Start watching for changes') - .action(serve); + .command('serve') + .alias('browse') + .description('Starts a server to inspect files in browser') + .option('--no-watch', 'Start watching for changes') + .action(serve); // Show additional help cli.on('--help', help); @@ -140,10 +143,10 @@ cli.on('--help', help); * Parse at the end because Node emit is immediate */ cli - .on('*', () => { - error( - 'Invalid command provided. See the help for available commands/options.' - ); - cli.help(); - }) - .parse(process.argv); + .on('*', () => { + error( + 'Invalid command provided. See the help for available commands/options.' + ); + cli.help(); + }) + .parse(process.argv); diff --git a/packages/cli/bin/replace-config.js b/packages/cli/bin/replace-config.js index 735b48701..19dd7f2ea 100644 --- a/packages/cli/bin/replace-config.js +++ b/packages/cli/bin/replace-config.js @@ -5,7 +5,7 @@ const _ = require('lodash'); /** * @func replaceConfigPaths * @desc Immutable replace source and public paths in the passed config. - * @param {config} config - The passed PatternLab config. + * @param {config} config - The passed Pattern Lab config. * @param {string} projectDir - The project directory path, defaults to ./ * @param {string} sourceDir - The source root directory path. * @param {string} publicDir - The public root directory path. @@ -13,25 +13,25 @@ const _ = require('lodash'); * @return {config} - Returns a modified config. Original stays unaltered. */ function replaceConfigPaths( - config, - projectDir, - sourceDir, - publicDir, - exportDir + config, + projectDir, + sourceDir, + publicDir, + exportDir ) { - const conf = Object.assign({}, config); - _.map(conf.paths.source, (value, key) => { - conf.paths.source[key] = _.isString(value) - ? value.replace(/^\.\/source/g, path.join(projectDir, sourceDir)) - : value; - }); - _.map(conf.paths.public, (value, key) => { - conf.paths.public[key] = _.isString(value) - ? value.replace(/^\.\/public/g, path.join(projectDir, publicDir)) - : value; - }); - conf.patternExportDirectory = path.join(projectDir, exportDir); - return conf; + const conf = Object.assign({}, config); + _.map(conf.paths.source, (value, key) => { + conf.paths.source[key] = _.isString(value) + ? value.replace(/^\.\/source/g, path.join(projectDir, sourceDir)) + : value; + }); + _.map(conf.paths.public, (value, key) => { + conf.paths.public[key] = _.isString(value) + ? value.replace(/^\.\/public/g, path.join(projectDir, publicDir)) + : value; + }); + conf.patternExportDirectory = path.join(projectDir, exportDir); + return conf; } module.exports = replaceConfigPaths; diff --git a/packages/cli/bin/resolve-config.js b/packages/cli/bin/resolve-config.js index 6ee5a3d02..f34c5e083 100644 --- a/packages/cli/bin/resolve-config.js +++ b/packages/cli/bin/resolve-config.js @@ -7,39 +7,39 @@ const wrapAsync = require('./utils').wrapAsync; /** * @func resolveConfig - * @desc Resolves the given PatternLab config file. + * @desc Resolves the given Pattern Lab config file. * @param {string} [configPath=./patternlab-config.json] - Path to the patternlab-config.json. Defaults to project dir. * @return {object|boolean} Returns the config object or false otherwise. */ function resolveConfig(configPath) { - return wrapAsync(function*() { - if (typeof configPath !== 'string') { - error( - 'resolveConfig: If configPath is set, it is expected to be of type string.' - ); - return false; - } - if (!exists.sync(configPath)) { - error(`resolveConfig: configPath ${configPath} does not exists`); - return false; - } + return wrapAsync(function*() { + if (typeof configPath !== 'string') { + error( + 'resolveConfig: If configPath is set, it is expected to be of type string.' + ); + return false; + } + if (!exists.sync(configPath)) { + error(`resolveConfig: configPath ${configPath} does not exists`); + return false; + } - /** - * Setup the config. - * 1. Check if user specified custom PatternLab config location - * 2. Read the config file - */ - try { - const absoluteConfigPath = path.resolve(configPath); // 1 - return yield readJsonAsync(absoluteConfigPath); // 2 - } catch (err) { - error( - 'resolveConfig: Got an error during parsing your PatternLab config. Please make sure your config file exists.' - ); - error(err); - return false; - } - }); + /** + * Setup the config. + * 1. Check if user specified custom Pattern Lab config location + * 2. Read the config file + */ + try { + const absoluteConfigPath = path.resolve(configPath); // 1 + return yield readJsonAsync(absoluteConfigPath); // 2 + } catch (err) { + error( + 'resolveConfig: Got an error during parsing your Pattern Lab config. Please make sure your config file exists.' + ); + error(err); + return false; + } + }); } module.exports = resolveConfig; diff --git a/packages/cli/bin/scaffold.js b/packages/cli/bin/scaffold.js index 7c2077e5b..de1e4df73 100644 --- a/packages/cli/bin/scaffold.js +++ b/packages/cli/bin/scaffold.js @@ -1,11 +1,13 @@ 'use strict'; const path = require('path'); +const execa = require('execa'); +const fs = require('fs-extra'); const wrapAsync = require('./utils').wrapAsync; const mkdirsAsync = require('./utils').mkdirsAsync; /** * @func scaffold - * @desc Generate file and folder structure for a PatternLab project + * @desc Generate file and folder structure for a Pattern Lab project * @param {string} projectDir - The project root directory path. * @param {string} sourceDir - The source root directory path. * @param {string} publicDir - The public root directory path. @@ -13,18 +15,25 @@ const mkdirsAsync = require('./utils').mkdirsAsync; * @return {void} */ const scaffold = (projectDir, sourceDir, publicDir, exportDir) => - wrapAsync(function*() { - /** - * Create mandatory files structure - * 1. Create project source directory - * 2. Create project public directory - * 3. Create project export directory - */ - yield Promise.all([ - mkdirsAsync(path.resolve(projectDir, path.normalize(sourceDir))), // 1 - mkdirsAsync(path.resolve(projectDir, path.normalize(publicDir))), // 2 - mkdirsAsync(path.resolve(projectDir, path.normalize(exportDir))), // 3 - ]); - }); + wrapAsync(function*() { + const projectPath = path.join(process.cwd(), projectDir); + if (!fs.existsSync(path.join(projectPath, 'package.json'))) { + fs.ensureDirSync(projectPath); + execa.sync('npm', ['init', '-y'], { + cwd: projectPath, + }); + } + /** + * Create mandatory files structure + * 1. Create project source directory + * 2. Create project public directory + * 3. Create project export directory + */ + yield Promise.all([ + mkdirsAsync(path.resolve(projectDir, path.normalize(sourceDir))), // 1 + mkdirsAsync(path.resolve(projectDir, path.normalize(publicDir))), // 2 + mkdirsAsync(path.resolve(projectDir, path.normalize(exportDir))), // 3 + ]); + }); module.exports = scaffold; diff --git a/packages/cli/bin/serve.js b/packages/cli/bin/serve.js index 310240727..a7502b65f 100644 --- a/packages/cli/bin/serve.js +++ b/packages/cli/bin/serve.js @@ -7,40 +7,41 @@ const { error, info } = require('./utils'); /** * @func serve - * @desc Start a browser-sync server in the PatternLab public dir - * @param {object} config - The passed PatternLab config + * @desc Start a browser-sync server in the Pattern Lab public dir + * @param {object} config - The passed Pattern Lab config + * @param {object} options - The passed options at invocation time */ -function serve(config) { - if (!isValidConfig) { - throw new TypeError( - 'serve: Expects config not to be empty and of type object.' - ); - } +function serve(config, options) { + if (!isValidConfig) { + throw new TypeError( + 'serve: Expects config not to be empty and of type object.' + ); + } - if ( - !_.has(config, 'paths.public.root') || - _.isEmpty(config.paths.public.root) - ) { - throw new TypeError( - 'serve: config.paths.public.root is empty or does not exist. Please check your PatternLab config.' - ); - } - if ( - !_.has(config, 'paths.source.root') || - _.isEmpty(config.paths.source.root) - ) { - throw new TypeError( - 'serve: config.paths.source.root is empty or does not exist. Please check your PatternLab config.' - ); - } + if ( + !_.has(config, 'paths.public.root') || + _.isEmpty(config.paths.public.root) + ) { + throw new TypeError( + 'serve: config.paths.public.root is empty or does not exist. Please check your Pattern Lab config.' + ); + } + if ( + !_.has(config, 'paths.source.root') || + _.isEmpty(config.paths.source.root) + ) { + throw new TypeError( + 'serve: config.paths.source.root is empty or does not exist. Please check your Pattern Lab config.' + ); + } - try { - info(`serve: Serving your files …`); - const pl = patternlab(config); - pl.serve({}); - } catch (err) { - error(err); - } + try { + info(`serve: Serving your files …`); + const pl = patternlab(config); + pl.server.serve(options); + } catch (err) { + error(err); + } } module.exports = serve; diff --git a/packages/cli/bin/utils.js b/packages/cli/bin/utils.js index 786ca7acf..771a6f1a9 100644 --- a/packages/cli/bin/utils.js +++ b/packages/cli/bin/utils.js @@ -1,5 +1,5 @@ 'use strict'; -const fs = require('fs-promise'); +const fs = require('fs-extra'); const spawn = require('execa'); const glob = require('glob'); const path = require('path'); @@ -13,24 +13,24 @@ const hasYarn = require('has-yarn'); * @type {*} */ const log = Object.assign( - { - debug(msg) { - this.emit( - 'patternlab.debug', - `${chalk.green('⊙ patternlab →')} ${chalk.dim(msg)}` - ); - }, - info(msg) { - this.emit('patternlab.info', `⊙ patternlab → ${chalk.dim(msg)}`); - }, - error(msg) { - this.emit( - 'patternlab.error', - `${chalk.red('⊙ patternlab →')} ${chalk.dim(msg)}` - ); - }, - }, - EventEmitter.prototype + { + debug(msg) { + this.emit( + 'patternlab.debug', + `${chalk.green('⊙ patternlab →')} ${chalk.dim(msg)}` + ); + }, + info(msg) { + this.emit('patternlab.info', `⊙ patternlab → ${chalk.dim(msg)}`); + }, + error(msg) { + this.emit( + 'patternlab.error', + `${chalk.red('⊙ patternlab →')} ${chalk.dim(msg)}` + ); + }, + }, + EventEmitter.prototype ); /** @@ -63,29 +63,29 @@ const error = log.error.bind(log); * @param {function} fn - Takes a generator function */ const wrapAsync = fn => - new Promise((resolve, reject) => { - const generator = fn(); - /* eslint-disable */ - (function spwn(val) { - let res; - try { - res = - {}.toString.call(val) !== '[object Error]' - ? generator.next(val) - : generator.throw(val); - } catch (err) { - return reject(err); - } - const v = res.value; - if (res.done) { - return resolve(v); - } - Promise.resolve(v) - .then(spwn) - .catch(spwn); - })(); - /* eslint-enable */ - }); + new Promise((resolve, reject) => { + const generator = fn(); + /* eslint-disable */ + (function spwn(val) { + let res; + try { + res = + {}.toString.call(val) !== '[object Error]' + ? generator.next(val) + : generator.throw(val); + } catch (err) { + return reject(err); + } + const v = res.value; + if (res.done) { + return resolve(v); + } + Promise.resolve(v) + .then(spwn) + .catch(spwn); + })(); + /* eslint-enable */ + }); /** * @func glob @@ -95,13 +95,11 @@ const wrapAsync = fn => * @return {Promise} */ const asyncGlob = (pattern, opts) => - new Promise((resolve, reject) => - glob( - pattern, - opts, - (err, matches) => (err !== null ? reject(err) : resolve(matches)) - ) - ); + new Promise((resolve, reject) => + glob(pattern, opts, (err, matches) => + err !== null ? reject(err) : resolve(matches) + ) + ); /** * @func copyWithPattern @@ -112,62 +110,60 @@ const asyncGlob = (pattern, opts) => * @return {Promise} */ const copyWithPattern = (cwd, pattern, dest) => - wrapAsync(function*() { - const files = yield asyncGlob(pattern, { cwd: cwd }); - if (files.length === 0) { - debug('copy: Nothing to copy'); - } - // Copy concurrently - const promises = files.map(file => - fs.copy(path.join(cwd, file), path.join(dest, file)) - ); - return yield Promise.all(promises); - }); + wrapAsync(function*() { + const files = yield asyncGlob(pattern, { cwd: cwd }); + if (files.length === 0) { + debug('copy: Nothing to copy'); + } + // Copy concurrently + const promises = files.map(file => + fs.copy(path.join(cwd, file), path.join(dest, file)) + ); + return yield Promise.all(promises); + }); /** * @func fetchPackage * @desc Fetches and saves packages from npm into node_modules and adds a reference in the package.json under dependencies * @param {string} packageName - The package name - * @param {string} [url] - A URL which will be used to fetch the package from */ -const fetchPackage = (packageName, url) => - wrapAsync(function*() { - const useYarn = hasYarn(); - const pm = useYarn ? 'yarn' : 'npm'; - const installCmd = useYarn ? 'add' : 'install'; - try { - if (packageName || url) { - const cmd = yield spawn(pm, [installCmd, url || packageName]); - error(cmd.stderr); - } - } catch (err) { - error( - `fetchPackage: Fetching required dependencies from ${pm} failed for ${packageName} with ${err}` - ); - throw err; // Rethrow error - } - }); +const fetchPackage = packageName => + wrapAsync(function*() { + const useYarn = hasYarn(); + const pm = useYarn ? 'yarn' : 'npm'; + const installCmd = useYarn ? 'add' : 'install'; + try { + if (packageName) { + const cmd = yield spawn(pm, [installCmd, packageName]); + error(cmd.stderr); + } + } catch (err) { + error( + `fetchPackage: Fetching required dependencies from ${pm} failed for ${packageName} with ${err}` + ); + throw err; // Rethrow error + } + }); /** * @func checkAndInstallPackage * Checks whether a package for a given packageName is installed locally. If package cannot be found, fetch and install it * @param {string} packageName - The package name - * @param {string} [url] - A URL which will be used to fetch the package from * @return {boolean} */ -const checkAndInstallPackage = (packageName, url) => - wrapAsync(function*() { - try { - require.resolve(packageName); - return true; - } catch (err) { - debug( - `checkAndInstallPackage: ${packageName} not installed. Fetching it now …` - ); - yield fetchPackage(packageName, url); - return false; - } - }); +const checkAndInstallPackage = packageName => + wrapAsync(function*() { + try { + require.resolve(packageName); + return true; + } catch (err) { + debug( + `checkAndInstallPackage: ${packageName} not installed. Fetching it now …` + ); + yield fetchPackage(packageName); + return false; + } + }); /** * @func noop @@ -175,18 +171,46 @@ const checkAndInstallPackage = (packageName, url) => */ const noop = () => {}; +/** + * @func writeJsonAsync + * Wrapper for fs.writeJsonAsync with consistent spacing + * @param {string} filePath + * @param {object} data + */ +const writeJsonAsync = (filePath, data) => + wrapAsync(function*() { + yield fs.outputJSON(filePath, data, { spaces: 2 }); + }); + +/** + * @func getJSONKey + * Installs package, then returns the value for the given JSON file's key within + * @param {string} packageName - the node_module to install / load + * @param {object} key - the key to find + * @param {object} fileName - the filePath of the JSON + */ +const getJSONKey = (packageName, key, fileName = 'package.json') => + wrapAsync(function*() { + yield checkAndInstallPackage(packageName); + const jsonData = yield fs.readJson( + path.resolve('node_modules', packageName, fileName) + ); + return jsonData[key]; + }); + module.exports = { - copyWithPattern, - copyAsync: fs.copy, - mkdirsAsync: fs.mkdirs, - moveAsync: fs.move, - writeJsonAsync: fs.outputJson, - readJsonAsync: fs.readJson, - error, - info, - debug, - log, - wrapAsync, - checkAndInstallPackage, - noop, + copyWithPattern, + copyAsync: fs.copy, + mkdirsAsync: fs.mkdirs, + moveAsync: fs.move, + writeJsonAsync: writeJsonAsync, + readJsonAsync: fs.readJson, + error, + info, + debug, + log, + wrapAsync, + checkAndInstallPackage, + noop, + getJSONKey, }; diff --git a/packages/cli/bin/validate-config.js b/packages/cli/bin/validate-config.js index 0cd571e4a..eb4e521e8 100644 --- a/packages/cli/bin/validate-config.js +++ b/packages/cli/bin/validate-config.js @@ -6,7 +6,7 @@ * @return {object} - Returns true is all is good, false otherwise. */ function isValidConfig(config) { - return !config || typeof config !== 'object'; + return !config || typeof config !== 'object'; } module.exports = isValidConfig; diff --git a/packages/cli/package-lock.json b/packages/cli/package-lock.json deleted file mode 100644 index e641a77f4..000000000 --- a/packages/cli/package-lock.json +++ /dev/null @@ -1,1440 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "acorn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", - "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" - } - } - }, - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" - }, - "ansi-escapes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", - "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==" - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" - }, - "archiver": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.1.1.tgz", - "integrity": "sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw=", - "requires": { - "archiver-utils": "1.3.0", - "async": "2.6.0", - "buffer-crc32": "0.2.13", - "glob": "7.1.2", - "lodash": "4.17.5", - "readable-stream": "2.3.4", - "tar-stream": "1.5.5", - "zip-stream": "1.2.0" - } - }, - "archiver-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", - "requires": { - "glob": "7.1.2", - "graceful-fs": "4.1.11", - "lazystream": "1.0.0", - "lodash": "4.17.5", - "normalize-path": "2.1.1", - "readable-stream": "2.3.4" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "1.0.3" - } - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "1.0.3" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.5" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "bl": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", - "requires": { - "readable-stream": "2.3.4" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "requires": { - "callsites": "0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "requires": { - "restore-cursor": "2.0.0" - } - }, - "cli-spinners": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.1.0.tgz", - "integrity": "sha1-8YR7FohE2RemceudFH499JfJDQY=" - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "clone": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz", - "integrity": "sha1-KY1+IjFmD0DAA8LtMUDezz9TCF8=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" - }, - "compress-commons": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", - "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", - "requires": { - "buffer-crc32": "0.2.13", - "crc32-stream": "2.0.0", - "normalize-path": "2.1.1", - "readable-stream": "2.3.4" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.4", - "typedarray": "0.0.6" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "crc": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/crc/-/crc-3.5.0.tgz", - "integrity": "sha1-mLi6fUiWZbo5efWbITgTdBAaGWQ=" - }, - "crc32-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", - "requires": { - "crc": "3.5.0", - "readable-stream": "2.3.4" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "requires": { - "clone": "1.0.3" - } - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "requires": { - "esutils": "2.0.2" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "requires": { - "once": "1.4.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "eslint": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz", - "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", - "requires": { - "ajv": "5.5.2", - "babel-code-frame": "6.26.0", - "chalk": "2.3.2", - "concat-stream": "1.6.1", - "cross-spawn": "5.1.0", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "3.7.1", - "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", - "esquery": "1.0.0", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "functional-red-black-tree": "1.0.1", - "glob": "7.1.2", - "globals": "11.3.0", - "ignore": "3.3.7", - "imurmurhash": "0.1.4", - "inquirer": "3.3.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.10.0", - "json-stable-stringify-without-jsonify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.5", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "7.0.0", - "progress": "2.0.0", - "require-uncached": "1.0.3", - "semver": "5.5.0", - "strip-ansi": "4.0.0", - "strip-json-comments": "2.0.1", - "table": "4.0.2", - "text-table": "0.2.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.3.2", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.1.0", - "figures": "2.0.0", - "lodash": "4.17.5", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" - } - } - } - }, - "eslint-config-prettier": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz", - "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", - "requires": { - "get-stdin": "5.0.1" - } - }, - "eslint-plugin-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", - "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", - "requires": { - "fast-diff": "1.1.2", - "jest-docblock": "21.2.0" - } - }, - "eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", - "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" - } - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "requires": { - "acorn": "5.5.0", - "acorn-jsx": "3.0.1" - } - }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" - }, - "esquery": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", - "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", - "requires": { - "estraverse": "4.2.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "requires": { - "estraverse": "4.2.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "execa": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz", - "integrity": "sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA==", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "external-editor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", - "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", - "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.19", - "tmp": "0.0.33" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" - }, - "fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "requires": { - "escape-string-regexp": "1.0.5" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" - } - }, - "fill-keys": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", - "integrity": "sha1-mo+jb06K1jTjv2tPPIiCVRRS6yA=", - "requires": { - "is-object": "1.0.1", - "merge-descriptors": "1.0.1" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" - } - }, - "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "2.4.0" - } - }, - "fs-promise": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", - "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", - "requires": { - "any-promise": "1.3.0", - "fs-extra": "2.1.2", - "mz": "2.7.0", - "thenify-all": "1.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" - }, - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "globals": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", - "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==" - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - } - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "has-yarn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-1.0.0.tgz", - "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=" - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.1.0.tgz", - "integrity": "sha512-kn7N70US1MSZHZHSGJLiZ7iCwwncc7b0gc68YtlX29OjI3Mp0tSVV+snVXpZ1G+ONS3Ac9zd1m6hve2ibLDYfA==", - "requires": { - "ansi-escapes": "3.0.0", - "chalk": "2.3.2", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.1.0", - "figures": "2.0.0", - "lodash": "4.17.5", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rxjs": "5.5.6", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=" - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "requires": { - "is-path-inside": "1.0.1" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "requires": { - "path-is-inside": "1.0.2" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "jest-docblock": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", - "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==" - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "js-yaml": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", - "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", - "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "4.1.11" - } - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "requires": { - "readable-stream": "2.3.4" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "requires": { - "chalk": "2.3.2" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "module-not-found-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", - "integrity": "sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "requires": { - "any-promise": "1.3.0", - "object-assign": "4.1.1", - "thenify-all": "1.6.0" - } - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "2.0.1" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "requires": { - "mimic-fn": "1.2.0" - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "ora": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-2.0.0.tgz", - "integrity": "sha512-g+IR0nMUXq1k4nE3gkENbN4wkF0XsVZFyxznTF6CdmwQ9qeTGONGpSR9LM5//1l0TVvJoJF3MkMtJp6slUsWFg==", - "requires": { - "chalk": "2.3.2", - "cli-cursor": "2.1.0", - "cli-spinners": "1.1.0", - "log-symbols": "2.2.0", - "strip-ansi": "4.0.0", - "wcwidth": "1.0.1" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "prettier": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.11.1.tgz", - "integrity": "sha512-T/KD65Ot0PB97xTrG8afQ46x3oiVhnfGjGESSI9NWYcG92+OUPZKkwHqGWXH2t9jK1crnQjubECW0FuOth+hxw==" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" - }, - "proxyquire": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.0.0.tgz", - "integrity": "sha512-TO9TAIz0mpa+SKddXsgCFatoe/KmHvoNVj2jDMC1kXE6kKn7/4CRpxvQ+0wAK9sbMT2FVO89qItlvnZMcFbJ2Q==", - "requires": { - "fill-keys": "1.0.2", - "module-not-found-error": "1.0.1", - "resolve": "1.1.7" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "readable-stream": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", - "integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "requires": { - "onetime": "2.0.1", - "signal-exit": "3.0.2" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "requires": { - "is-promise": "2.1.0" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "requires": { - "rx-lite": "4.0.8" - } - }, - "rxjs": { - "version": "5.5.6", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.6.tgz", - "integrity": "sha512-v4Q5HDC0FHAQ7zcBX7T2IL6O5ltl1a2GX4ENjPXg6SjDY69Cmx9v4113C99a4wGF16ClPv5Z8mghuYorVkg/kg==", - "requires": { - "symbol-observable": "1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "sanitize-filename": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.1.tgz", - "integrity": "sha1-YS2hyWRz+gLczaktzVtKsWSmdyo=", - "requires": { - "truncate-utf8-bytes": "1.0.2" - } - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "requires": { - "is-fullwidth-code-point": "2.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "requires": { - "has-flag": "3.0.0" - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" - }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", - "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.3.2", - "lodash": "4.17.5", - "slice-ansi": "1.0.0", - "string-width": "2.1.1" - } - }, - "tar-stream": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.5.tgz", - "integrity": "sha512-mQdgLPc/Vjfr3VWqWbfxW8yQNiJCbAZ+Gf6GDu1Cy0bdb33ofyiNGBtAY96jHFhDuivCwgW1H9DgTON+INiXgg==", - "requires": { - "bl": "1.2.1", - "end-of-stream": "1.4.1", - "readable-stream": "2.3.4", - "xtend": "4.0.1" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "thenify": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", - "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", - "requires": { - "any-promise": "1.3.0" - } - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "requires": { - "thenify": "3.3.0" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "requires": { - "os-tmpdir": "1.0.2" - } - }, - "truncate-utf8-bytes": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", - "integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=", - "requires": { - "utf8-byte-length": "1.0.4" - } - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "utf8-byte-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", - "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", - "requires": { - "defaults": "1.0.3" - } - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "requires": { - "isexe": "2.0.0" - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "requires": { - "mkdirp": "0.5.1" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "zip-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", - "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", - "requires": { - "archiver-utils": "1.3.0", - "compress-commons": "1.2.2", - "lodash": "4.17.5", - "readable-stream": "2.3.4" - } - } - } -} diff --git a/packages/cli/package.json b/packages/cli/package.json index 6468608ef..847f1d94d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,37 +1,42 @@ { "name": "@pattern-lab/cli", "description": "Command-line interface (CLI) for the @pattern-lab/core.", - "version": "0.0.1-alpha.15", + "version": "5.9.3", "bin": { "patternlab": "bin/patternlab.js" }, "author": { "name": "Raphael Okon" }, - "private": true, "dependencies": { - "@pattern-lab/core": "^3.0.0-alpha.11", - "@pattern-lab/live-server": "^1.3.3-alpha.2", + "@pattern-lab/core": "^5.9.3", + "@pattern-lab/live-server": "^5.9.3", + "@pattern-lab/starterkit-mustache-base": "3.0.3", "archiver": "2.1.1", - "chalk": "2.3.2", - "commander": "2.14.1", - "execa": "0.9.0", - "fs-promise": "2.0.3", + "chalk": "2.4.1", + "commander": "2.15.1", + "deepmerge": "^2.1.1", + "execa": "0.10.0", + "fs-extra": "6.0.1", "glob": "7.1.2", "has-yarn": "1.0.0", "inquirer": "5.1.0", - "lodash": "4.17.5", - "ora": "2.0.0", + "lodash": "4.17.15", + "ora": "2.1.0", "path-exists": "3.0.0", - "sanitize-filename": "1.6.1" + "sanitize-filename": "1.6.1", + "starterkit-mustache-acidtest": "0.0.3", + "starterkit-mustache-bootstrap": "0.1.1", + "starterkit-mustache-foundation": "0.1.1", + "starterkit-mustache-materialdesign": "0.1.2" }, "devDependencies": { "eslint": "4.18.2", "eslint-config-prettier": "2.9.0", "eslint-plugin-prettier": "2.6.0", "prettier": "1.11.1", - "proxyquire": "2.0.0", - "tap": "11.1.1" + "proxyquire": "2.0.1", + "tap": "14.6.4" }, "files": [ "bin" @@ -44,13 +49,15 @@ ], "scripts": { "lint": "eslint ./{bin,test}", - "test": "tap './test/*.test.js' --reporter spec --timeout=120", - "pretest": "npm run lint && npm install" + "test:separate": "tap ./test/*.test.js --reporter spec --timeout=120" }, "repository": "https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli", "bugs": "https://github.com/pattern-lab/patternlab-node/issues", "license": "MIT", "engines": { - "node": ">=6.0" + "node": ">=10.0" + }, + "publishConfig": { + "access": "public" } } diff --git a/packages/cli/readme.md b/packages/cli/readme.md index 93f029058..e5a9ae95e 100644 --- a/packages/cli/readme.md +++ b/packages/cli/readme.md @@ -1,36 +1,69 @@ -# PatternLab Node CLI +# Pattern Lab Node CLI > Command-line interface (CLI) for the patternlab-node core. -[![Build Status](https://travis-ci.org/pattern-lab/patternlab-node-cli.svg?branch=master)](https://travis-ci.org/pattern-lab/patternlab-node-cli) +[![Build Status](https://travis-ci.org/pattern-lab/patternlab-node.svg?branch=master)](https://travis-ci.org/pattern-lab/patternlab-node) ## Installation *Note: Global installs are currently not supported and will be fixed when the Pattern Lab core hits v3.0.0* #### Via NPM -`npm install pattern-lab/patternlab-node-cli --save-dev` +`npm install @pattern-lab/cli --save-dev` #### Via Yarn -`yarn add pattern-lab/patternlab-node-cli --dev` +`yarn add @pattern-lab/cli --dev` -## Getting Started -1. In order to use PatternLab you need to initialize a PatternLab project with `patternlab init`. The CLI will ask you some setup question and scaffold your project based on it. -2. Build your patterns use `patternlab build`. The PatternLab CLI will assume that the `patternlab-config.json` is in the project root. Othewise specify a custom path to config with `patternlab build --config path/to/config` -3. To view your patterns in the browser preview `patternlab serve` or again specify a custom config location `patternlab serve --config path/to/config` -4. To export your patterns in the browser preview `patternlab export` or again specify a custom config location `patternlab export --config path/to/config` +## Configuring Your Project to Use the CLI + +If the CLI is installed globally, you may call commands directly, such as `patternlab --version`. + +If the CLI is not installed globally, you need to tell `npm` where to find the executable when invoking commands. + +Open `package.json` and add the following to your `scripts` object: + +```diff +"scripts": { ++ "patternlab": "patternlab" +}, +``` +This tells `npm` to look in the local `node_modules/.bin` directory for the `patternlab` CLI. + +Subcommands and options can then be forwarded to the CLI like this: + +```bash +npm run patternlab -- serve +``` + +Installing [`edition-node`](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node) will add the following CLI commands for convenience: + +```diff + "scripts": { ++ "pl:build": "patternlab build --config ./patternlab-config.json", ++ "pl:help": "patternlab --help", ++ "pl:install": "patternlab install --config ./patternlab-config.json", ++ "pl:serve": "patternlab serve --config ./patternlab-config.json", ++ "pl:version": "patternlab --version" + }, +``` + +Then you can invoke any of these like this: + +``` +npm run pl:serve +``` ## API & Usage ### General usage ``` Usage: patternlab [options] Commands: - build|compile [options] Build the PatternLab. Optionally (re-)build only the patterns - export Export a PatternLab patterns into a compressed format - init [options] Initialize a PatternLab project from scratch or import an edition and/or starterkit + build|compile [options] Build Pattern Lab. Optionally (re-)build only the patterns + export Export a Pattern Lab patterns into a compressed format + init [options] Initialize a Pattern Lab project from scratch or import an edition and/or starterkit install|add [options] Installs Pattern Lab related modules like starterkits or plugins serve|browse [options] Starts a server to inspect files in browser - + Options: -h, --help output usage information -V, --version output the version number @@ -39,22 +72,22 @@ Usage: patternlab [options] --silent Turn off console logs ``` -### Build/Compile PatternLab +### Build/Compile Pattern Lab ``` Usage: build|compile [options] - -Build the PatternLab. Optionally (re-)build only the patterns - + +Build Pattern Lab. Optionally (re-)build only the patterns + Options: -h, --help output usage information -p, --patterns-only Whether to only build patterns ``` -### Initialize PatternLab +### Initialize Pattern Lab ``` Usage: init [options] -Initialize a PatternLab project from scratch or import an edition and/or starterkit +Initialize a Pattern Lab project from scratch or import an edition and/or starterkit Passing no options starts the init in interactive mode Options: @@ -64,7 +97,7 @@ Passing no options starts the init in interactive mode -k, --starterkit Specify a starterkit to install. Default: starterkit-mustache-base ``` -### Serve PatternLab +### Serve Pattern Lab ``` Usage: serve|browse [options] @@ -76,11 +109,11 @@ Starts a server to inspect files in browser -w, --watch Start watching for changes ``` -### Export PatternLab +### Export Pattern Lab ``` Usage: export [options] -Export a PatternLab patterns into a compressed format +Export a Pattern Lab patterns into a compressed format Options: -h, --help output usage information @@ -101,9 +134,9 @@ Installs Pattern Lab related modules like starterkits or plugins ## Examples ``` - $ patternlab init # Initialize a PatternLab project. - $ patternlab build # Builds PatternLab from the current dir - $ patternlab build --config # Builds PatternLab from different project directory + $ patternlab init # Initialize a Pattern Lab project. + $ patternlab build # Builds Pattern Lab from the current dir + $ patternlab build --config # Builds Pattern Lab from different project directory ``` ## License MIT © [Raphael Okon](https://github.com/raphaelokon) diff --git a/packages/cli/test/build.test.js b/packages/cli/test/build.test.js index deb9af92a..6a56cb6fe 100644 --- a/packages/cli/test/build.test.js +++ b/packages/cli/test/build.test.js @@ -6,40 +6,40 @@ const config = patternlab.getDefaultConfig(); // Require build and mock patternlab.build() so that we only test the build module behavior const build = proxyquire('../bin/build', { - '@pattern-lab/core': patternLabMock, + '@pattern-lab/core': patternLabMock, }); const opts = { patternsOnly: true }; tap.test('Build ->', t => { - t.throws( - () => { - build(); - }, - {}, - 'throws when config is empty' - ); - t.throws( - () => { - build(123); - }, - {}, - 'throws when config is not of type object' - ); - t.throws( - () => { - build(undefined, opts); - }, - {}, - '--patterns-only throws when config is empty' - ); - t.throws( - () => { - build(undefined, opts); - }, - {}, - '--patterns-only throws when config is not of type object' - ); - t.type(build(config), 'boolean', 'returns a bool'); - t.type(build(config, opts), 'boolean', '--patterns-only returns a bool'); - t.end(); + t.throws( + () => { + build(); + }, + {}, + 'throws when config is empty' + ); + t.throws( + () => { + build(123); + }, + {}, + 'throws when config is not of type object' + ); + t.throws( + () => { + build(undefined, opts); + }, + {}, + '--patterns-only throws when config is empty' + ); + t.throws( + () => { + build(undefined, opts); + }, + {}, + '--patterns-only throws when config is not of type object' + ); + t.type(build(config), 'boolean', 'returns a bool'); + t.type(build(config, opts), 'boolean', '--patterns-only returns a bool'); + t.end(); }); diff --git a/packages/cli/test/cli-build.test.js b/packages/cli/test/cli-build.test.js index f9d3349a4..d6712deae 100644 --- a/packages/cli/test/cli-build.test.js +++ b/packages/cli/test/cli-build.test.js @@ -8,42 +8,42 @@ const wrapAsync = require('../bin/utils').wrapAsync; const projectRoot = getUniqueProjectPath(); tap.test('Init and build ->', t => - wrapAsync(function*() { - yield spawnCmd([ - 'init', - '--verbose', - '--project-dir', - projectRoot, - '--edition', - '@pattern-lab/edition-node', - '--starterkit', - '@pattern-lab/starterkit-mustache-demo', - ]); - yield spawnCmd([ - 'build', - '--config', - `${projectRoot}/patternlab-config.json`, - ]); - t.ok( - exists.sync(path.resolve(projectRoot, 'public')), - 'should build all files into public dir' - ); - t.ok( - exists.sync(path.resolve(projectRoot, 'public', 'annotations')), - 'with an annotations dir' - ); - t.ok( - exists.sync(path.resolve(projectRoot, 'public', 'css')), - 'with a css dir' - ); - t.ok( - exists.sync(path.resolve(projectRoot, 'public', 'images')), - 'with a images dir' - ); - t.ok( - exists.sync(path.resolve(projectRoot, 'public', 'styleguide')), - 'with a styleguide dir' - ); - t.end(); - }) + wrapAsync(function*() { + yield spawnCmd([ + 'init', + '--verbose', + '--project-dir', + projectRoot, + '--edition', + '@pattern-lab/edition-node', + '--starterkit', + '@pattern-lab/starterkit-mustache-demo', + ]); + yield spawnCmd([ + 'build', + '--config', + `${projectRoot}/patternlab-config.json`, + ]); + t.ok( + exists.sync(path.resolve(projectRoot, 'public')), + 'should build all files into public dir' + ); + t.ok( + exists.sync(path.resolve(projectRoot, 'public', 'annotations')), + 'with an annotations dir' + ); + t.ok( + exists.sync(path.resolve(projectRoot, 'public', 'css')), + 'with a css dir' + ); + t.ok( + exists.sync(path.resolve(projectRoot, 'public', 'images')), + 'with a images dir' + ); + t.ok( + exists.sync(path.resolve(projectRoot, 'public', 'styleguide')), + 'with a styleguide dir' + ); + t.end(); + }) ); diff --git a/packages/cli/test/cli-disable.test.js b/packages/cli/test/cli-disable.test.js index 1e4751511..64715b882 100644 --- a/packages/cli/test/cli-disable.test.js +++ b/packages/cli/test/cli-disable.test.js @@ -7,46 +7,46 @@ const wrapAsync = require('../bin/utils').wrapAsync; const projectRoot = getUniqueProjectPath(); tap.test('Disable ->', t => - wrapAsync(function*() { - yield spawnCmd([ - 'init', - '--verbose', - '--project-dir', - projectRoot, - '--edition', - '@pattern-lab/edition-node', - '--starterkit', - '@pattern-lab/starterkit-mustache-base', - ]); - yield spawnCmd([ - 'install', - '--plugins', - '@pattern-lab/plugin-tab', - '--config', - `${projectRoot}/patternlab-config.json`, - ]); - yield spawnCmd([ - 'enable', - '--plugins', - '@pattern-lab/plugin-tab', - '--config', - `${projectRoot}/patternlab-config.json`, - ]); - yield spawnCmd([ - 'disable', - '--plugins', - '@pattern-lab/plugin-tab', - '--config', - `${projectRoot}/patternlab-config.json`, - ]); - const config = JSON.parse( - readFileSync(`${projectRoot}/patternlab-config.json`, 'utf8') - ); - t.equal( - config.plugins['@pattern-lab/plugin-tab'].enabled, - false, - 'and set the enabled flag to false in patternlab-config.json' - ); - t.end(); - }) + wrapAsync(function*() { + yield spawnCmd([ + 'init', + '--verbose', + '--project-dir', + projectRoot, + '--edition', + '@pattern-lab/edition-node', + '--starterkit', + '@pattern-lab/starterkit-mustache-base', + ]); + yield spawnCmd([ + 'install', + '--plugins', + '@pattern-lab/plugin-tab', + '--config', + `${projectRoot}/patternlab-config.json`, + ]); + yield spawnCmd([ + 'enable', + '--plugins', + '@pattern-lab/plugin-tab', + '--config', + `${projectRoot}/patternlab-config.json`, + ]); + yield spawnCmd([ + 'disable', + '--plugins', + '@pattern-lab/plugin-tab', + '--config', + `${projectRoot}/patternlab-config.json`, + ]); + const config = JSON.parse( + readFileSync(`${projectRoot}/patternlab-config.json`, 'utf8') + ); + t.equal( + config.plugins['@pattern-lab/plugin-tab'].enabled, + false, + 'and set the enabled flag to false in patternlab-config.json' + ); + t.end(); + }) ); diff --git a/packages/cli/test/cli-enable.test.js b/packages/cli/test/cli-enable.test.js index 47b4a70ca..62b7d837a 100644 --- a/packages/cli/test/cli-enable.test.js +++ b/packages/cli/test/cli-enable.test.js @@ -7,39 +7,39 @@ const wrapAsync = require('../bin/utils').wrapAsync; const projectRoot = getUniqueProjectPath(); tap.test('Enable ->', t => - wrapAsync(function*() { - yield spawnCmd([ - 'init', - '--verbose', - '--project-dir', - projectRoot, - '--edition', - '@pattern-lab/edition-node', - '--starterkit', - '@pattern-lab/starterkit-mustache-base', - ]); - yield spawnCmd([ - 'install', - '--plugins', - '@pattern-lab/plugin-tab', - '--config', - `${projectRoot}/patternlab-config.json`, - ]); - yield spawnCmd([ - 'enable', - '--plugins', - '@pattern-lab/plugin-tab', - '--config', - `${projectRoot}/patternlab-config.json`, - ]); - const config = JSON.parse( - readFileSync(`${projectRoot}/patternlab-config.json`, 'utf8') - ); - t.equal( - config.plugins['@pattern-lab/plugin-tab'].enabled, - true, - 'and set the enabled flag in patternlab-config.json' - ); - t.end(); - }) + wrapAsync(function*() { + yield spawnCmd([ + 'init', + '--verbose', + '--project-dir', + projectRoot, + '--edition', + '@pattern-lab/edition-node', + '--starterkit', + '@pattern-lab/starterkit-mustache-base', + ]); + yield spawnCmd([ + 'install', + '--plugins', + '@pattern-lab/plugin-tab', + '--config', + `${projectRoot}/patternlab-config.json`, + ]); + yield spawnCmd([ + 'enable', + '--plugins', + '@pattern-lab/plugin-tab', + '--config', + `${projectRoot}/patternlab-config.json`, + ]); + const config = JSON.parse( + readFileSync(`${projectRoot}/patternlab-config.json`, 'utf8') + ); + t.equal( + config.plugins['@pattern-lab/plugin-tab'].enabled, + true, + 'and set the enabled flag in patternlab-config.json' + ); + t.end(); + }) ); diff --git a/packages/cli/test/cli-export.test.js b/packages/cli/test/cli-export.test.js index c6e266415..63e82ba06 100644 --- a/packages/cli/test/cli-export.test.js +++ b/packages/cli/test/cli-export.test.js @@ -8,26 +8,26 @@ const wrapAsync = require('../bin/utils').wrapAsync; const projectRoot = getUniqueProjectPath(); tap.test('Init and export ->', t => - wrapAsync(function*() { - yield spawnCmd([ - 'init', - '--verbose', - '--project-dir', - projectRoot, - '--edition', - '@pattern-lab/edition-node', - '--starterkit', - '@pattern-lab/starterkit-mustache-base', - ]); - yield spawnCmd([ - 'export', - '--config', - `${projectRoot}/patternlab-config.json`, - ]); - t.ok( - exists.sync(path.resolve(projectRoot, 'pattern_exports', 'patterns.zip')), - ' should create patterns.zip' - ); - t.end(); - }) + wrapAsync(function*() { + yield spawnCmd([ + 'init', + '--verbose', + '--project-dir', + projectRoot, + '--edition', + '@pattern-lab/edition-node', + '--starterkit', + '@pattern-lab/starterkit-mustache-base', + ]); + yield spawnCmd([ + 'export', + '--config', + `${projectRoot}/patternlab-config.json`, + ]); + t.ok( + exists.sync(path.resolve(projectRoot, 'pattern_exports', 'patterns.zip')), + ' should create patterns.zip' + ); + t.end(); + }) ); diff --git a/packages/cli/test/cli-init.test.js b/packages/cli/test/cli-init.test.js index 8cfde79c4..a80c031ff 100644 --- a/packages/cli/test/cli-init.test.js +++ b/packages/cli/test/cli-init.test.js @@ -8,31 +8,31 @@ const wrapAsync = require('../bin/utils').wrapAsync; const projectRoot = getUniqueProjectPath(); tap.test('Init ->', t => - wrapAsync(function*() { - yield spawnCmd([ - 'init', - '--verbose', - '--project-dir', - projectRoot, - '--edition', - '@pattern-lab/edition-node', - '--starterkit', - '@pattern-lab/starterkit-mustache-base', - ]); - t.ok( - exists.sync(path.resolve(projectRoot)), - 'should initialize a PatternLab project' - ); - t.ok(exists.sync(path.resolve(projectRoot, 'source')), 'with a source dir'); - t.ok(exists.sync(path.resolve(projectRoot, 'public')), 'with a public dir'); - t.ok( - exists.sync(path.resolve(projectRoot, 'pattern_exports')), - 'with a pattern_exports dir' - ); - t.ok( - exists.sync(path.resolve(projectRoot, 'patternlab-config.json')), - 'with a pattern_exports dir' - ); - t.end(); - }) + wrapAsync(function*() { + yield spawnCmd([ + 'init', + '--verbose', + '--project-dir', + projectRoot, + '--edition', + '@pattern-lab/edition-node', + '--starterkit', + '@pattern-lab/starterkit-mustache-base', + ]); + t.ok( + exists.sync(path.resolve(projectRoot)), + 'should initialize a Pattern Lab project' + ); + t.ok(exists.sync(path.resolve(projectRoot, 'source')), 'with a source dir'); + t.ok(exists.sync(path.resolve(projectRoot, 'public')), 'with a public dir'); + t.ok( + exists.sync(path.resolve(projectRoot, 'pattern_exports')), + 'with a pattern_exports dir' + ); + t.ok( + exists.sync(path.resolve(projectRoot, 'patternlab-config.json')), + 'with a pattern_exports dir' + ); + t.end(); + }) ); diff --git a/packages/cli/test/export.test.js b/packages/cli/test/export.test.js index 82c88c2d6..169b60771 100644 --- a/packages/cli/test/export.test.js +++ b/packages/cli/test/export.test.js @@ -3,29 +3,29 @@ const tap = require('tap'); const wrapAsync = require('../bin/utils').wrapAsync; tap.test('Export ->', t => { - t.plan(2); - t.test('with options empty', tt => - wrapAsync(function*() { - try { - yield exportPatterns(); - } catch (err) { - tt.type(err, TypeError, 'throws when options are empty'); - tt.end(); - } - }) - ); - t.test('with options not an object', tt => - wrapAsync(function*() { - try { - yield exportPatterns(123); - } catch (err) { - tt.type( - err, - TypeError, - 'throws when passed options are not of type object' - ); - tt.end(); - } - }) - ); + t.plan(2); + t.test('with options empty', tt => + wrapAsync(function*() { + try { + yield exportPatterns(); + } catch (err) { + tt.type(err, TypeError, 'throws when options are empty'); + tt.end(); + } + }) + ); + t.test('with options not an object', tt => + wrapAsync(function*() { + try { + yield exportPatterns(123); + } catch (err) { + tt.type( + err, + TypeError, + 'throws when passed options are not of type object' + ); + tt.end(); + } + }) + ); }); diff --git a/packages/cli/test/install-plugin.test.js b/packages/cli/test/install-plugin.test.js index f269b03e3..269953007 100644 --- a/packages/cli/test/install-plugin.test.js +++ b/packages/cli/test/install-plugin.test.js @@ -7,23 +7,23 @@ const moduleExist = require.resolve; const projectRoot = getUniqueProjectPath(); const minimalConfig = { - paths: { - source: { - root: projectRoot, - }, - }, + paths: { + source: { + root: projectRoot, + }, + }, }; tap.test('Install plugin-tab ->', t => - wrapAsync(function*() { - yield installPlugin('@pattern-lab/plugin-tab', minimalConfig); - const pkg = yield moduleExist('@pattern-lab/plugin-tab'); - t.ok(pkg, 'module should exist after install'); - t.equal( - minimalConfig.plugins['@pattern-lab/plugin-tab'].enabled, - false, - 'and persist it on the patternlab-config.json' - ); - t.end(); - }) + wrapAsync(function*() { + yield installPlugin('@pattern-lab/plugin-tab', minimalConfig); + const pkg = yield moduleExist('@pattern-lab/plugin-tab'); + t.ok(pkg, 'module should exist after install'); + t.equal( + minimalConfig.plugins['@pattern-lab/plugin-tab'].enabled, + false, + 'and persist it on the patternlab-config.json' + ); + t.end(); + }) ); diff --git a/packages/cli/test/install-starterkit.test.js b/packages/cli/test/install-starterkit.test.js index edaf78bd2..0cda685c9 100644 --- a/packages/cli/test/install-starterkit.test.js +++ b/packages/cli/test/install-starterkit.test.js @@ -7,72 +7,72 @@ const moduleExist = require.resolve; const projectRoot = getUniqueProjectPath(); const minimalConfig = { - paths: { - source: { - root: projectRoot, - }, - }, + paths: { + source: { + root: projectRoot, + }, + }, }; tap.test('Install starterkit-mustache-demo ->', t => - wrapAsync(function*() { - yield installStarterkit( - '@pattern-lab/starterkit-mustache-demo', - minimalConfig - ); - const pkg = yield moduleExist('@pattern-lab/starterkit-mustache-demo'); - t.ok(pkg, 'module should exist after install'); - t.end(); - }) + wrapAsync(function*() { + yield installStarterkit( + '@pattern-lab/starterkit-mustache-demo', + minimalConfig + ); + const pkg = yield moduleExist('@pattern-lab/starterkit-mustache-demo'); + t.ok(pkg, 'module should exist after install'); + t.end(); + }) ); tap.test('Install starterkit-mustache-base ->', t => - wrapAsync(function*() { - yield installStarterkit( - '@pattern-lab/starterkit-mustache-base', - minimalConfig - ); - const pkg = yield moduleExist('@pattern-lab/starterkit-mustache-base'); - t.ok(pkg, 'module should exist after install'); - t.end(); - }) + wrapAsync(function*() { + yield installStarterkit( + '@pattern-lab/starterkit-mustache-base', + minimalConfig + ); + const pkg = yield moduleExist('@pattern-lab/starterkit-mustache-base'); + t.ok(pkg, 'module should exist after install'); + t.end(); + }) ); tap.test('Install starterkit-mustache-bootstrap ->', t => - wrapAsync(function*() { - yield installStarterkit('starterkit-mustache-bootstrap', minimalConfig); - const pkg = yield moduleExist('starterkit-mustache-bootstrap'); - t.ok(pkg, 'module should exist after install'); - t.end(); - }) + wrapAsync(function*() { + yield installStarterkit('starterkit-mustache-bootstrap', minimalConfig); + const pkg = yield moduleExist('starterkit-mustache-bootstrap'); + t.ok(pkg, 'module should exist after install'); + t.end(); + }) ); tap.test('Install starterkit-mustache-foundation ->', t => - wrapAsync(function*() { - yield installStarterkit('starterkit-mustache-foundation', minimalConfig); - const pkg = yield moduleExist('starterkit-mustache-foundation'); - t.ok(pkg, 'module should exist after install'); - t.end(); - }) + wrapAsync(function*() { + yield installStarterkit('starterkit-mustache-foundation', minimalConfig); + const pkg = yield moduleExist('starterkit-mustache-foundation'); + t.ok(pkg, 'module should exist after install'); + t.end(); + }) ); tap.test('Install starterkit-mustache-acidtest ->', t => - wrapAsync(function*() { - yield installStarterkit('starterkit-mustache-acidtest', minimalConfig); - const pkg = yield moduleExist('starterkit-mustache-acidtest'); - t.ok(pkg, 'module should exist after install'); - t.end(); - }) + wrapAsync(function*() { + yield installStarterkit('starterkit-mustache-acidtest', minimalConfig); + const pkg = yield moduleExist('starterkit-mustache-acidtest'); + t.ok(pkg, 'module should exist after install'); + t.end(); + }) ); tap.test('Install starterkit-mustache-materialdesign ->', t => - wrapAsync(function*() { - yield installStarterkit( - 'starterkit-mustache-materialdesign', - minimalConfig - ); - const pkg = yield moduleExist('starterkit-mustache-materialdesign'); - t.ok(pkg, 'module should exist after install'); - t.end(); - }) + wrapAsync(function*() { + yield installStarterkit( + 'starterkit-mustache-materialdesign', + minimalConfig + ); + const pkg = yield moduleExist('starterkit-mustache-materialdesign'); + t.ok(pkg, 'module should exist after install'); + t.end(); + }) ); diff --git a/packages/cli/test/mocks/liverserver.mock.js b/packages/cli/test/mocks/liverserver.mock.js index 141173eff..754fd5fc1 100644 --- a/packages/cli/test/mocks/liverserver.mock.js +++ b/packages/cli/test/mocks/liverserver.mock.js @@ -1,15 +1,15 @@ function liveServerMock() { - return { - reload: function() { - return true; - }, - refreshCSS: function() { - return true; - }, - start: function() { - return true; - }, - }; + return { + reload: function() { + return true; + }, + refreshCSS: function() { + return true; + }, + start: function() { + return true; + }, + }; } module.exports = liveServerMock; diff --git a/packages/cli/test/mocks/patternlab.mock.js b/packages/cli/test/mocks/patternlab.mock.js index ce455a868..7186ca734 100644 --- a/packages/cli/test/mocks/patternlab.mock.js +++ b/packages/cli/test/mocks/patternlab.mock.js @@ -1,21 +1,21 @@ function patternLabMock() { - return { - build: function() { - return true; - }, - help: function() { - return true; - }, - patternsonly: function() { - return true; - }, - liststarterkits: function() { - return true; - }, - loadstarterkit: function() { - return true; - }, - }; + return { + build: function() { + return true; + }, + help: function() { + return true; + }, + patternsonly: function() { + return true; + }, + liststarterkits: function() { + return true; + }, + loadstarterkit: function() { + return true; + }, + }; } module.exports = patternLabMock; diff --git a/packages/cli/test/replace_config_paths.test.js b/packages/cli/test/replace_config_paths.test.js index 580958842..6a98385ac 100644 --- a/packages/cli/test/replace_config_paths.test.js +++ b/packages/cli/test/replace_config_paths.test.js @@ -4,41 +4,41 @@ const replaceConfigPaths = require('../bin/replace-config'); const config = patternlab.getDefaultConfig(); tap.test('replaceConfigPaths ->', t => { - const newConfig = replaceConfigPaths( - config, - 'projectDir', - 'sourceDir', - 'publicDir', - 'exportDir' - ); - for (const k of Object.keys(newConfig.paths.source)) { - if (k === 'patternlabFiles') { - for (const l of Object.keys(newConfig.paths.source[k])) { - t.ok( - /^projectDir\/sourceDir\/|^\.\/node_modules/.test( - newConfig.paths.source[k][l] - ), - `should be ok for newConfig.paths.source.${k}.${l}` - ); - } - } else { - t.ok( - /^projectDir\/sourceDir\/|^\.\/node_modules/.test( - newConfig.paths.source[k] - ), - `should be ok for newConfig.paths.source.${k}` - ); - } - } - for (const l of Object.keys(newConfig.paths.public)) { - t.ok( - /^projectDir\/publicDir\//.test(newConfig.paths.public[l]), - `should be ok for newConfig.paths.public.${l}` - ); - } - t.ok( - /^projectDir\/exportDir/.test(newConfig.patternExportDirectory), - `should be ok for newConfig.patternExportDirectory` - ); - t.end(); + const newConfig = replaceConfigPaths( + config, + 'projectDir', + 'sourceDir', + 'publicDir', + 'exportDir' + ); + for (const k of Object.keys(newConfig.paths.source)) { + if (k === 'patternlabFiles') { + for (const l of Object.keys(newConfig.paths.source[k])) { + t.ok( + /^projectDir\/sourceDir\/|^\.\/node_modules/.test( + newConfig.paths.source[k][l] + ), + `should be ok for newConfig.paths.source.${k}.${l}` + ); + } + } else { + t.ok( + /^projectDir\/sourceDir\/|^\.\/node_modules/.test( + newConfig.paths.source[k] + ), + `should be ok for newConfig.paths.source.${k}` + ); + } + } + for (const l of Object.keys(newConfig.paths.public)) { + t.ok( + /^projectDir\/publicDir\//.test(newConfig.paths.public[l]), + `should be ok for newConfig.paths.public.${l}` + ); + } + t.ok( + /^projectDir\/exportDir/.test(newConfig.patternExportDirectory), + `should be ok for newConfig.patternExportDirectory` + ); + t.end(); }); diff --git a/packages/cli/test/resolve_config.test.js b/packages/cli/test/resolve_config.test.js index 7986cdb99..36c250d9a 100644 --- a/packages/cli/test/resolve_config.test.js +++ b/packages/cli/test/resolve_config.test.js @@ -3,16 +3,16 @@ const wrapAsync = require('../bin/utils').wrapAsync; const resolveConfig = require('../bin/resolve-config'); tap.test('resolveConfig ->', t => - wrapAsync(function*() { - const config = yield resolveConfig( - './test/fixtures/patternlab-config.json' - ); - const badConfig = yield resolveConfig(123); - const configNotFound = yield resolveConfig('./test/fixtures/some-config'); - t.type(config, 'object', 'should return a config of type object'); - t.ok(config.paths, 'config should have a paths property'); - t.notOk(badConfig, 'returns false when configPath is not of type string'); - t.notOk(configNotFound, 'returns false when configPath is not found'); - t.end(); - }) + wrapAsync(function*() { + const config = yield resolveConfig( + './test/fixtures/patternlab-config.json' + ); + const badConfig = yield resolveConfig(123); + const configNotFound = yield resolveConfig('./test/fixtures/some-config'); + t.type(config, 'object', 'should return a config of type object'); + t.ok(config.paths, 'config should have a paths property'); + t.notOk(badConfig, 'returns false when configPath is not of type string'); + t.notOk(configNotFound, 'returns false when configPath is not found'); + t.end(); + }) ); diff --git a/packages/cli/test/scaffold.test.js b/packages/cli/test/scaffold.test.js index 993388551..c63d2365d 100644 --- a/packages/cli/test/scaffold.test.js +++ b/packages/cli/test/scaffold.test.js @@ -11,21 +11,21 @@ const publicDir = 'public'; const exportDir = 'patterns_export'; tap.test('Scaffold ->', t => - wrapAsync(function*() { - yield scaffold(projectDir, sourceDir, publicDir, exportDir); - t.ok(exists.sync(path.resolve(projectDir)), 'should create project dir'); - t.ok( - exists.sync(path.resolve(projectDir, sourceDir)), - 'should create source dir' - ); - t.ok( - exists.sync(path.resolve(projectDir, publicDir)), - 'should create public dir' - ); - t.ok( - exists.sync(path.resolve(projectDir, exportDir)), - 'should create export dir' - ); - t.end(); - }) + wrapAsync(function*() { + yield scaffold(projectDir, sourceDir, publicDir, exportDir); + t.ok(exists.sync(path.resolve(projectDir)), 'should create project dir'); + t.ok( + exists.sync(path.resolve(projectDir, sourceDir)), + 'should create source dir' + ); + t.ok( + exists.sync(path.resolve(projectDir, publicDir)), + 'should create public dir' + ); + t.ok( + exists.sync(path.resolve(projectDir, exportDir)), + 'should create export dir' + ); + t.end(); + }) ); diff --git a/packages/cli/test/serve.test.js b/packages/cli/test/serve.test.js index c2fa761fd..c322cc41d 100644 --- a/packages/cli/test/serve.test.js +++ b/packages/cli/test/serve.test.js @@ -7,45 +7,45 @@ const wrapAsync = require('../bin/utils').wrapAsync; // Require preview but mock patternlab so that we only test the module behavior const preview = proxyquire('../bin/serve', { - '@pattern-lab/core': patternLabMock, + '@pattern-lab/core': patternLabMock, }); tap.test('Serve ->', t => - wrapAsync(function*() { - const config = yield resolveConfig( - './test/fixtures/patternlab-config.json' - ); - config.paths.source.root = undefined; - t.throws( - () => { - preview(); - }, - {}, - 'throws when config is empty' - ); - t.throws( - () => { - preview(123); - }, - {}, - 'throws when config is not of type object' - ); - t.throws( - () => { - _.unset(config, 'paths.source.root'); - preview(config); - }, - {}, - 'throws when no source root dir is set on config' - ); - t.throws( - () => { - _.unset(config, 'paths.public.root'); - preview(config); - }, - {}, - 'throws when no public root dir is set on config' - ); - t.end(); - }) + wrapAsync(function*() { + const config = yield resolveConfig( + './test/fixtures/patternlab-config.json' + ); + config.paths.source.root = undefined; + t.throws( + () => { + preview(); + }, + {}, + 'throws when config is empty' + ); + t.throws( + () => { + preview(123); + }, + {}, + 'throws when config is not of type object' + ); + t.throws( + () => { + _.unset(config, 'paths.source.root'); + preview(config); + }, + {}, + 'throws when no source root dir is set on config' + ); + t.throws( + () => { + _.unset(config, 'paths.public.root'); + preview(config); + }, + {}, + 'throws when no public root dir is set on config' + ); + t.end(); + }) ); diff --git a/packages/cli/test/utils/getUniqueProjectPath.js b/packages/cli/test/utils/getUniqueProjectPath.js index aaa153e35..0ac892b19 100644 --- a/packages/cli/test/utils/getUniqueProjectPath.js +++ b/packages/cli/test/utils/getUniqueProjectPath.js @@ -1,6 +1,6 @@ const crypto = require('crypto'); module.exports = () => { - const UUID = crypto.randomBytes(16).toString('hex'); - return `./tmp/${UUID}`; + const UUID = crypto.randomBytes(16).toString('hex'); + return `./tmp/${UUID}`; }; diff --git a/packages/cli/test/utils/spawnCmd.js b/packages/cli/test/utils/spawnCmd.js index e2e0306cd..4d0623515 100644 --- a/packages/cli/test/utils/spawnCmd.js +++ b/packages/cli/test/utils/spawnCmd.js @@ -4,10 +4,10 @@ const wrapAsync = require('../../bin/utils').wrapAsync; const cli = path.resolve(__dirname, '../../bin/patternlab.js'); const spawnCmd = (args, endFn) => - wrapAsync(function*() { - const fn = endFn || function() {}; - yield spawn('node', [cli].concat(args)); - fn(); - }); + wrapAsync(function*() { + const fn = endFn || function() {}; + yield spawn('node', [cli].concat(args)); + fn(); + }); module.exports = spawnCmd; diff --git a/packages/core/.eslintrc.js b/packages/core/.eslintrc.js new file mode 100644 index 000000000..5a2cc7f1e --- /dev/null +++ b/packages/core/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: ['../../.eslintrc.js'], +}; diff --git a/packages/core/.npmrc b/packages/core/.npmrc new file mode 100644 index 000000000..ce73f58bf --- /dev/null +++ b/packages/core/.npmrc @@ -0,0 +1,2 @@ +package-lock=false +save-exact=true diff --git a/packages/core/.nvmrc b/packages/core/.nvmrc new file mode 100644 index 000000000..95c4e8d27 --- /dev/null +++ b/packages/core/.nvmrc @@ -0,0 +1 @@ +10.0.0 \ No newline at end of file diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index aafeb53c1..dc3dbfe77 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,109 +3,329 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -# [3.0.0-alpha.11](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.10...@pattern-lab/core@3.0.0-alpha.11) (2018-03-21) - - -### Bug Fixes - -* **changes_hunter:** guard for incrementalRebuild while watching ([c652b9c](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/c652b9c)), closes [#794](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/794) [#802](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/802) -* **data_loader:** look for exact name of the file passed in ([eb46be2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/eb46be2)) -* **get:** add internal ability to omit missing pattern warning ([e3dddc6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/e3dddc6)), closes [#786](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/786) -* **lint:** run code through prettier ([ca52fde](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/ca52fde)), closes [#825](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/825) -* **package:** update LICENSE ([337aa32](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/337aa32)) -* **tests:** Revert annotations file back to expected legacy format ([3618f27](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/3618f27)) - - -### Features - -* **package:** standardize and hoist common devDependencies ([7f4ce6f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/7f4ce6f)) - - - - - -# [3.0.0-alpha.10](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.9...@pattern-lab/core@3.0.0-alpha.10) (2018-03-05) - - -### Bug Fixes - -* **config:** Add npm registry to lerna config ([1473cd5](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/1473cd5)) -* **config:** update patch to uikit files ([5ccd0d2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5ccd0d2)) -* **package:** clarify description of package ([c65611e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/c65611e)) - - -### Features - -* **README:** Update for brevity and consistency ([aec7c50](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/aec7c50)) - +## [5.9.3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v5.9.2...v5.9.3) (2020-05-01) +**Note:** Version bump only for package @pattern-lab/core - -# 3.0.0-alpha.9 (2018-03-02) -### Bug Fixes - -* **core:** Fix tests ([31d67a7](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/31d67a7)) -* **packages:** Allow scoped publishing ([58beeb6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/58beeb6)) - - -### Features - -* **core:** Add tests for help command ([62cd8fb](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/62cd8fb)) -* **package:** Hoist up tap and test command. ([6cacdb6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/6cacdb6)) -* **packages:** Update all package.json repo and bug links ([5eb2c11](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5eb2c11)) +# [5.9.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v5.8.0...v5.9.0) (2020-04-24) - - - -# [3.0.0-alpha.8](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-alpha.7...v3.0.0-alpha.8) (2018-02-22) - ### Bug Fixes -* **asset copy:** Resolve paths correctly. Break apart files & asyncify ([379419c](https://github.com/pattern-lab/patternlab-node/commit/379419c)) -* **event emission:** Commit failing test ([12ccbd7](https://github.com/pattern-lab/patternlab-node/commit/12ccbd7)) -* **event emission:** Only listen once to changes ([ea6b7d3](https://github.com/pattern-lab/patternlab-node/commit/ea6b7d3)) -* **loadPattern:** Check proper data file paths for modification ([b7ba5b0](https://github.com/pattern-lab/patternlab-node/commit/b7ba5b0)) -* **package** Update dependencies to reduce vulnerabilities ([367d38f](https://github.com/pattern-lab/patternlab-node/commit/367d38f)) -* **package:** Update gitignore and npmignore with current files ([581b3c4](https://github.com/pattern-lab/patternlab-node/commit/581b3c4)) -* **serve:** Reference events by constants ([9f5c143](https://github.com/pattern-lab/patternlab-node/commit/9f5c143)) -* **test configuration:** Remove vestigial configuration entries ([481fce9](https://github.com/pattern-lab/patternlab-node/commit/481fce9)) -* **watchPatternLabFiles:** Register and manager watchers ([48f0190](https://github.com/pattern-lab/patternlab-node/commit/48f0190)) - -### Features - -* **docs:** Add jsdoc output to public API and events ([d45e7b9](https://github.com/pattern-lab/patternlab-node/commit/d45e7b9)) -* **docs:** Experiment with doc generation ([8e1808b](https://github.com/pattern-lab/patternlab-node/commit/8e1808b)) -* **index:** Make the cleaning of public/ an asynchronous adventure ([bd485d2](https://github.com/pattern-lab/patternlab-node/commit/bd485d2)) -* **package:** Communicate official node support ([96ca87f](https://github.com/pattern-lab/patternlab-node/commit/96ca87f)) -* **pattern lab:** Copy pattern-specific js ([99bfc02](https://github.com/pattern-lab/patternlab-node/commit/99bfc02)) -* **pattern lab:** Pass `patternPartial` as data to render ([351ea5e](https://github.com/pattern-lab/patternlab-node/commit/351ea5e)) - - - -# [3.0.0-alpha.7](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-alpha.6...v3.0.0-alpha.7) (2018-01-19) - -### Bug Fixes - -* **lint:** Manually resolve final lint issues ([7cad1f1](https://github.com/pattern-lab/patternlab-node/commit/7cad1f1)) -* **README:** Fix npm link instructions ([ce3a7f0](https://github.com/pattern-lab/patternlab-node/commit/ce3a7f0)) -* **README:** Update npm shield to point to scoped package ([1f62617](https://github.com/pattern-lab/patternlab-node/commit/1f62617)), closes [#760](https://github.com/pattern-lab/patternlab-node/issues/760) -* **unit test:** Fix path to fixture ([b932f14](https://github.com/pattern-lab/patternlab-node/commit/b932f14)) - -### Features - -* **Contributing:** Update contributing info with prettier ([2a0ce52](https://github.com/pattern-lab/patternlab-node/commit/2a0ce52)) -* **list_item_hunter:** Re-work algorithm ([1ac77a7](https://github.com/pattern-lab/patternlab-node/commit/1ac77a7)) -* **package:** Add prettier ([b8e3e11](https://github.com/pattern-lab/patternlab-node/commit/b8e3e11)) -* **package:** Add prettier precommit hook ([a0b85b5](https://github.com/pattern-lab/patternlab-node/commit/a0b85b5)) -* **package:** Add standard version ([b2ba31c](https://github.com/pattern-lab/patternlab-node/commit/b2ba31c)) -* **README:** Add prettier badge ([7c2787b](https://github.com/pattern-lab/patternlab-node/commit/7c2787b)) - ---- - +* **core:** do not warn about uikit-polyfills ([6bb68e7](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/6bb68e763769969546542bf7aaf6d1f4235c6622)) + + + + + +# [5.7.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v5.6.0...v5.7.0) (2020-02-17) + +**Note:** Version bump only for package @pattern-lab/core + + + + + + +# [5.4.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v5.3.3...v5.4.0) (2019-11-26) + + +### Bug Fixes + +* add a new method to check if PL is currently compiling + add new method to get the config PL is using ([26e886c](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/26e886c93db5d135c91de648724f7278c4d5b3e9)) + + + + + +# [5.3.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v5.2.0...v5.3.0) (2019-11-13) + + +### Bug Fixes + +* **core:** re-add cleanPublic fix ([c100bbc](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/c100bbca3f339e9132acb9c482e98c1c8a66b8b5)) + + + + + +# [5.1.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v5.0.2...v5.1.0) (2019-10-29) + + +### Features + +* **config:** add new default pattern export options ([a7487a0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/a7487a0681cb11e6f3c5c8eaefd62e5648ad5ea3)) +* **core:** fix pattern export all conflicts ([b210d82](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/b210d820ba8ac0b64c82c7ff0f18c9f8a900fce2)) + + + + + +# [5.0.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v3.0.0-beta.3...v5.0.0) (2019-10-25) + + +### Bug Fixes + +* add eslint fixes ([00d7bbe](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/00d7bbe319ea77a6ee8cc9cd0348856feaaf13ad)) +* correct typo in build logging ([96d989f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/96d989f8869630ba9f59705bfca66755f20e35ab)) +* updates to address eslint / prettier issues ([d945acc](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/d945acc13b8e4e36f3815b017fbc12266c323d1f)) +* updates to fix eslint / prettier issues; update packages/core to reuse root .eslintrc.js file ([5b7a057](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5b7a057d46ccd16b5832af1441030c7b76f237a8)) +* **1049:** Treat folders like patterns only if they're subfolders of pattern groupings ([4eb79ab](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/4eb79ab48b335a35b2e5ed3b7053974b8e8bb6b6)) +* **core:** allow plugin resolution to follow normal algorithm ([3f6b83b](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/3f6b83be080c88aec1d8b73bececb76f0f57a79d)) +* **core:** find plugins from config only and with simpler args ([fe7351c](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/fe7351cba346425512cbb2ef3a1b7728ab06ae60)) +* **plugin:** correct spelling error and function locations ([d4abd88](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/d4abd88cb017550002407241b5045a2ad1adb1dc)) + + +### Features + +* **core:** invoke registered plugin hooks ([a54d775](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/a54d7753b6939fe6a58da543f4fb34f64dd8901a)) +* **plugin-tab, core:** initial plugin hook exploration ([2f3d39a](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/2f3d39ac6b125ad4c6b872e27ee224ce2ea33a12)) + + +### BREAKING CHANGES + +* **core:** plugins now use async functions instead of events + + + + + + +## [3.0.2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.1...@pattern-lab/core@3.0.2) (2019-08-23) + + +### Bug Fixes + +* add eslint fixes ([00d7bbe](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/00d7bbe)) +* correct typo in build logging ([96d989f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/96d989f)) +* updates to address eslint / prettier issues ([d945acc](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/d945acc)) +* updates to fix eslint / prettier issues; update packages/core to reuse root .eslintrc.js file ([5b7a057](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5b7a057)) + + + + + + +## [3.0.1](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.1-alpha.0...@pattern-lab/core@3.0.1) (2019-05-16) + +**Note:** Version bump only for package @pattern-lab/core + + + + + +# [3.0.0-beta.2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-beta.0...@pattern-lab/core@3.0.0-beta.2) (2019-02-09) + + +### Bug Fixes + +* **cli:** pass watch options cleanly to core ([8bf186b](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/8bf186b)) +* **docs:** regenerate API documentation ([830c568](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/830c568)) +* **patterns:** find all patterns inlcuding pseudo patterns ([d0672f6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/d0672f6)), closes [#975](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/975) +* manually bump package.json versions of packages published in September but with mismatched package.json versions ([98dfadf](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/98dfadf)) + + + + + + +# [3.0.0-beta.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.16...@pattern-lab/core@3.0.0-beta.0) (2018-09-07) + + +### Bug Fixes + +* **docs:** update event info with tab example ([0f227a3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/0f227a3)) +* **package:** Allow .json extension on annotations file (issue [#836](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/836)) ([b92e62b](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/b92e62b)) +* **package:** update tap dependency ([2b70ff4](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/2b70ff4)) +* **plugins:** support scoped packages ([44f0f8e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/44f0f8e)) + + +### Features + +* **API:** remove reliance on patternlab object during plugin install ([0850fd6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/0850fd6)) +* **core:** remove plugin install / disable / enable logic ([5a58824](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5a58824)), closes [#872](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/872) + + + + + + + +# [3.0.0-alpha.16](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.15...@pattern-lab/core@3.0.0-alpha.16) (2018-07-06) + +**Note:** Version bump only for package @pattern-lab/core + + + +# [3.0.0-alpha.15](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.14...@pattern-lab/core@3.0.0-alpha.15) (2018-07-06) + +### Features + +* **package:** add npmrc file ([55f5bc2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/55f5bc2)) +* **package:** pin all dependencies ([415698e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/415698e)) +* **package:** remove package-lock.json files ([5ab3995](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5ab3995)) + + + +# [3.0.0-alpha.14](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.13...@pattern-lab/core@3.0.0-alpha.14) (2018-07-05) + +### Bug Fixes + +* **core:** rename serverModule import to avoid conflict with CLI ([f3170e7](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/f3170e7)) +* **server:** remove setInterval hack ([a76e4a2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/a76e4a2)) +* **uikits:** fix generation of view all pages within uikits ([7d6bdce](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/7d6bdce)) +* **viewall:** fix viewall generation ([543558a](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/543558a)) +* **watch:** wire up serve and watch listeners correctly ([04cd18e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/04cd18e)) + +### Features + +* **events:** add PATTERNLAB_BUILD_END event and rename BUILD_START ([5b7bfa3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5b7bfa3)) +* **help:** remove help. API is now documented ([2aef3a1](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/2aef3a1)) +* **server:** beginning of refator ([a3d65c3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/a3d65c3)) +* **server:** continue server refactor ([8f6cd91](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/8f6cd91)) +* **watches:** add additional assets to ignore ([18e74c2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/18e74c2)) + + + +# [3.0.0-alpha.13](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.12...@pattern-lab/core@3.0.0-alpha.13) (2018-05-04) + +### Features + +* **api:** expose getVersion statically ([4683cd0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/4683cd0)) + + + +# [3.0.0-alpha.12](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.11...@pattern-lab/core@3.0.0-alpha.12) (2018-05-04) + +### Bug Fixes + +* **build:** improve stability of changes causing a live-server reload ([06c6123](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/06c6123)) +* **buildPatterns:** move meta processing back into function for now ([cea2c45](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/cea2c45)) +* **pattern graph:** move support and coverage of graph file to root ([bb9ef3c](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/bb9ef3c)) +* **pattern watch:** Defensively add change listeners ([cdbd11f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/cdbd11f)) +* **test:** fix the test please and thank you ([cdc6c38](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/cdc6c38)) +* **test:** sledgehammer a test ([8b34be0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/8b34be0)) +* **tests:** prevent dependency graph output file from being written ([0d9c57e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/0d9c57e)) +* **uikits:** fix ui_builder_tests ([e75f434](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/e75f434)) + +### Features + +* **API:** standardize v() and version() into a single call ([6309e69](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/6309e69)) +* **uikits:** add uikits to test config ([43a2017](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/43a2017)) +* **uikits:** additional test coverage ([f5b60b2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/f5b60b2)) +* **uikits:** additional test coverage of the main API ([fbcacfb](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/fbcacfb)) +* **uikits:** clean each build directory if configured ([8e11342](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/8e11342)) +* **uikits:** copy pattern-specific javascript ([3ac93dc](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/3ac93dc)) +* **uikits:** create MVP output to disk ([e1598d3](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/e1598d3)) +* **uikits:** filter out excluded pattern states from uikit output ([87c9d0d](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/87c9d0d)) +* **uikits:** load uikits before build ([4565202](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/4565202)) +* **uikits:** output assets and annotations to each location ([b0a84ca](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/b0a84ca)) +* **uikits:** output pattern files to each location ([5df87b0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5df87b0)) +* **uikits:** promote dependencyGraph.json output to root ([dd3e708](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/dd3e708)) +* **uikits:** render header and footer data correctly ([f2a6f23](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/f2a6f23)) +* **uikits:** support incremental builds ([6670364](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/6670364)) +* **uikits:** support watched-asset copying ([4f05311](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/4f05311)) +* **uikits:** uikits config to default ([a393851](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/a393851)) + +### BREAKING CHANGES + +* **API:** change `version()` to return a string representation of the version, removing `v()` + + + +# [3.0.0-alpha.11](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.10...@pattern-lab/core@3.0.0-alpha.11) (2018-03-21) + +### Bug Fixes + +* **changes_hunter:** guard for incrementalRebuild while watching ([c652b9c](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/c652b9c)), closes [#794](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/794) [#802](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/802) +* **data_loader:** look for exact name of the file passed in ([eb46be2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/eb46be2)) +* **get:** add internal ability to omit missing pattern warning ([e3dddc6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/e3dddc6)), closes [#786](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/786) +* **lint:** run code through prettier ([ca52fde](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/ca52fde)), closes [#825](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/issues/825) +* **package:** update LICENSE ([337aa32](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/337aa32)) +* **tests:** Revert annotations file back to expected legacy format ([3618f27](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/3618f27)) + +### Features + +* **package:** standardize and hoist common devDependencies ([7f4ce6f](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/7f4ce6f)) + + + +# [3.0.0-alpha.10](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/@pattern-lab/core@3.0.0-alpha.9...@pattern-lab/core@3.0.0-alpha.10) (2018-03-05) + +### Bug Fixes + +* **config:** Add npm registry to lerna config ([1473cd5](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/1473cd5)) +* **config:** update patch to uikit files ([5ccd0d2](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5ccd0d2)) +* **package:** clarify description of package ([c65611e](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/c65611e)) + +### Features + +* **README:** Update for brevity and consistency ([aec7c50](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/aec7c50)) + + + +# 3.0.0-alpha.9 (2018-03-02) + +### Bug Fixes + +* **core:** Fix tests ([31d67a7](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/31d67a7)) +* **packages:** Allow scoped publishing ([58beeb6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/58beeb6)) + +### Features + +* **core:** Add tests for help command ([62cd8fb](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/62cd8fb)) +* **package:** Hoist up tap and test command. ([6cacdb6](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/6cacdb6)) +* **packages:** Update all package.json repo and bug links ([5eb2c11](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/commit/5eb2c11)) + + + +# [3.0.0-alpha.8](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-alpha.7...v3.0.0-alpha.8) (2018-02-22) + +### Bug Fixes + +* **asset copy:** Resolve paths correctly. Break apart files & asyncify ([379419c](https://github.com/pattern-lab/patternlab-node/commit/379419c)) +* **event emission:** Commit failing test ([12ccbd7](https://github.com/pattern-lab/patternlab-node/commit/12ccbd7)) +* **event emission:** Only listen once to changes ([ea6b7d3](https://github.com/pattern-lab/patternlab-node/commit/ea6b7d3)) +* **loadPattern:** Check proper data file paths for modification ([b7ba5b0](https://github.com/pattern-lab/patternlab-node/commit/b7ba5b0)) +* **package** Update dependencies to reduce vulnerabilities ([367d38f](https://github.com/pattern-lab/patternlab-node/commit/367d38f)) +* **package:** Update gitignore and npmignore with current files ([581b3c4](https://github.com/pattern-lab/patternlab-node/commit/581b3c4)) +* **serve:** Reference events by constants ([9f5c143](https://github.com/pattern-lab/patternlab-node/commit/9f5c143)) +* **test configuration:** Remove vestigial configuration entries ([481fce9](https://github.com/pattern-lab/patternlab-node/commit/481fce9)) +* **watchPatternLabFiles:** Register and manager watchers ([48f0190](https://github.com/pattern-lab/patternlab-node/commit/48f0190)) + +### Features + +* **docs:** Add jsdoc output to public API and events ([d45e7b9](https://github.com/pattern-lab/patternlab-node/commit/d45e7b9)) +* **docs:** Experiment with doc generation ([8e1808b](https://github.com/pattern-lab/patternlab-node/commit/8e1808b)) +* **index:** Make the cleaning of public/ an asynchronous adventure ([bd485d2](https://github.com/pattern-lab/patternlab-node/commit/bd485d2)) +* **package:** Communicate official node support ([96ca87f](https://github.com/pattern-lab/patternlab-node/commit/96ca87f)) +* **pattern lab:** Copy pattern-specific js ([99bfc02](https://github.com/pattern-lab/patternlab-node/commit/99bfc02)) +* **pattern lab:** Pass `patternPartial` as data to render ([351ea5e](https://github.com/pattern-lab/patternlab-node/commit/351ea5e)) + + + +# [3.0.0-alpha.7](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-alpha.6...v3.0.0-alpha.7) (2018-01-19) + +### Bug Fixes + +* **lint:** Manually resolve final lint issues ([7cad1f1](https://github.com/pattern-lab/patternlab-node/commit/7cad1f1)) +* **README:** Fix npm link instructions ([ce3a7f0](https://github.com/pattern-lab/patternlab-node/commit/ce3a7f0)) +* **README:** Update npm shield to point to scoped package ([1f62617](https://github.com/pattern-lab/patternlab-node/commit/1f62617)), closes [#760](https://github.com/pattern-lab/patternlab-node/issues/760) +* **unit test:** Fix path to fixture ([b932f14](https://github.com/pattern-lab/patternlab-node/commit/b932f14)) + +### Features + +* **Contributing:** Update contributing info with prettier ([2a0ce52](https://github.com/pattern-lab/patternlab-node/commit/2a0ce52)) +* **list_item_hunter:** Re-work algorithm ([1ac77a7](https://github.com/pattern-lab/patternlab-node/commit/1ac77a7)) +* **package:** Add prettier ([b8e3e11](https://github.com/pattern-lab/patternlab-node/commit/b8e3e11)) +* **package:** Add prettier precommit hook ([a0b85b5](https://github.com/pattern-lab/patternlab-node/commit/a0b85b5)) +* **package:** Add standard version ([b2ba31c](https://github.com/pattern-lab/patternlab-node/commit/b2ba31c)) +* **README:** Add prettier badge ([7c2787b](https://github.com/pattern-lab/patternlab-node/commit/7c2787b)) + +--- + Older releases found at https://github.com/pattern-lab/patternlab-node/wiki/ChangeLog diff --git a/packages/core/README.md b/packages/core/README.md index 62f5ec2cc..f6a81c7bd 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -28,9 +28,9 @@ See [Usage](#usage) for more information. For users wanting a more pre-packaged experience several editions are available. -* [Pattern Lab/Node: Vanilla Edition](https://github.com/pattern-lab/patternlab-node/packages/edition-node) contains info how to get started within a pure node environment. +* [Pattern Lab/Node: Vanilla Edition](https://github.com/pattern-lab/patternlab-node/tree/dev/packages/edition-node) contains info how to get started within a pure node environment. -* [Pattern Lab/Node: Gulp Edition](https://github.com/pattern-lab/patternlab-node/packages/edition-node-gulp) contains info how to get started within a Gulp task running environment. +* [Pattern Lab/Node: Gulp Edition](https://github.com/pattern-lab/patternlab-node/tree/dev/packages/edition-node-gulp) contains info how to get started within a Gulp task running environment. ## Ecosystem @@ -63,7 +63,7 @@ patternlab.serve({ * Read more about the rest of [Public API](./docs), and already implemented for you within [Editions](#editions). -* A full-featured [command line interface](https://github.com/pattern-lab/patternlab-node/packages/cli) is also available. +* A full-featured [command line interface](https://github.com/pattern-lab/patternlab-node/tree/dev/packages/cli) is also available. ### Events diff --git a/packages/core/docs/README.md b/packages/core/docs/README.md index 16ad07812..7317083f6 100644 --- a/packages/core/docs/README.md +++ b/packages/core/docs/README.md @@ -10,108 +10,188 @@ ``` javascript const config = require('./patternlab-config.json'); -const patternlab = require('patternlab-node')(config); +const patternlab = require('@pattern-lab/core')(config); ``` -## Events - -Pattern Lab emits numerous [events](./events.md). - -## Functions + +## `patternlab` : object +Build thoughtful, pattern-driven user interfaces using atomic design principles. Many of these functions are exposed to users within [Editions](https://github.com/pattern-lab/patternlab-node#editions), but [direct consumption](https://github.com/pattern-lab/patternlab-node#direct-consumption) is also encouraged. -## `getDefaultConfig()` ⇒ object - - Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation. - -**Returns**: object - Returns the object representation of the `patternlab-config.json` -## `version()` ⇒ void - - Logs current version to standard output - -**Returns**: void - current patternlab-node version as defined in `package.json` -## `v()` ⇒ string - - Returns current version - +**Kind**: global namespace +**See** + +- [patternlab.io](patternlab.io) for more documentation. +- [https://github.com/pattern-lab/patternlab-node](https://github.com/pattern-lab/patternlab-node) for code, issues, and releases + +**License**: MIT + +* [`patternlab`](#patternlab) : object + * _instance_ + * [`.version`](#patternlab+version) ⇒ string + * [`.build`](#patternlab+build) ⇒ Promise + * [`.getDefaultConfig`](#patternlab+getDefaultConfig) ⇒ object + * [`.getSupportedTemplateExtensions`](#patternlab+getSupportedTemplateExtensions) ⇒ Array.<string> + * [`.installplugin`](#patternlab+installplugin) ⇒ void + * [`.liststarterkits`](#patternlab+liststarterkits) ⇒ Promise + * [`.loadstarterkit`](#patternlab+loadstarterkit) ⇒ void + * [`.patternsonly`](#patternlab+patternsonly) ⇒ Promise + * _static_ + * [`.getDefaultConfig`](#patternlab.getDefaultConfig) ⇒ object + * [`.getVersion`](#patternlab.getVersion) ⇒ string + * [`.server`](#patternlab.server) : object + * [`.serve(options)`](#patternlab.server.serve) ⇒ Promise + * [`.reload()`](#patternlab.server.reload) ⇒ Promise + * [`.refreshCSS()`](#patternlab.server.refreshCSS) ⇒ Promise + * [`.events`](#patternlab.events) : EventEmitter + + + +### `patternlab.version` ⇒ string +Returns current version + +**Kind**: instance property of [patternlab](#patternlab) **Returns**: string - current patternlab-node version as defined in `package.json`, as string -## `build(options)` ⇒ Promise + - Builds patterns, copies assets, and constructs user interface +### `patternlab.build` ⇒ Promise +Builds patterns, copies assets, and constructs user interface +**Kind**: instance property of [patternlab](#patternlab) **Returns**: Promise - a promise fulfilled when build is complete +**Emits**: event:PATTERNLAB_BUILD_START, event:PATTERNLAB_BUILD_END +**See**: [all events](./events.md) -| Param | Type | Description | -| --- | --- | --- | -| options | object | an object used to control build behavior | -| options.cleanPublic | bool | whether or not to delete the configured output location (usually `public/`) before build | -| options.data | object | additional data to be merged with global data prior to build | -| options.watch | bool | whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild | +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object | | an object used to control build behavior | +| [options.cleanPublic] | bool | true | whether or not to delete the configured output location (usually `public/`) before build | +| [options.data] | object | {} | additional data to be merged with global data prior to build | +| [options.watch] | bool | true | whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild | -## `getDefaultConfig()` ⇒ object + - Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation. +### `patternlab.getDefaultConfig` ⇒ object +Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation. +**Kind**: instance property of [patternlab](#patternlab) **Returns**: object - Returns the object representation of the `patternlab-config.json` -## `getSupportedTemplateExtensions()` ⇒ Array.<string> + - Returns all file extensions supported by installed PatternEngines +### `patternlab.getSupportedTemplateExtensions` ⇒ Array.<string> +Returns all file extensions supported by installed PatternEngines +**Kind**: instance property of [patternlab](#patternlab) **Returns**: Array.<string> - all supported file extensions -## `help()` ⇒ void - - Logs usage to standard output - -**Returns**: void - pattern lab API usage, as console output -## `installplugin(pluginName)` ⇒ void + - Installs plugin already available via `node_modules/` +### `patternlab.installplugin` ⇒ void +Installs plugin already available via `node_modules/` +**Kind**: instance property of [patternlab](#patternlab) | Param | Type | Description | | --- | --- | --- | | pluginName | string | name of plugin | -## `liststarterkits()` ⇒ Promise + - Fetches starterkit repositories from pattern-lab github org that contain 'starterkit' in their name +### `patternlab.liststarterkits` ⇒ Promise +Fetches starterkit repositories from pattern-lab github org that contain 'starterkit' in their name +**Kind**: instance property of [patternlab](#patternlab) **Returns**: Promise - Returns an Array<{name,url}> for the starterkit repos -## `loadstarterkit(starterkitName, clean)` ⇒ void + - Loads starterkit already available via `node_modules/` +### `patternlab.loadstarterkit` ⇒ void +Loads starterkit already available via `node_modules/` +**Kind**: instance property of [patternlab](#patternlab) | Param | Type | Description | | --- | --- | --- | | starterkitName | string | name of starterkit | | clean | boolean | whether or not to delete contents of source/ before load | -## `patternsonly(options)` ⇒ Promise + - Builds patterns only, leaving existing user interface files intact +### `patternlab.patternsonly` ⇒ Promise +Builds patterns only, leaving existing user interface files intact +**Kind**: instance property of [patternlab](#patternlab) **Returns**: Promise - a promise fulfilled when build is complete -| Param | Type | Description | -| --- | --- | --- | -| options | object | an object used to control build behavior | -| options.cleanPublic | bool | whether or not to delete the configured output location (usually `public/`) before build | -| options.data | object | additional data to be merged with global data prior to build | +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [options.cleanPublic] | bool | true | whether or not to delete the configured output location (usually `public/`) before build | +| [options.data] | object | {} | additional data to be merged with global data prior to build | +| [options.watch] | bool | true | whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild | + + + +### `patternlab.getDefaultConfig` ⇒ object +Static method that returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation. -## `serve(options)` ⇒ Promise +**Kind**: static property of [patternlab](#patternlab) +**Returns**: object - Returns the object representation of the `patternlab-config.json` + + +### `patternlab.getVersion` ⇒ string +Static method that returns current version + +**Kind**: static property of [patternlab](#patternlab) +**Returns**: string - current @pattern-lab/core version as defined in `package.json` + + +### `patternlab.server` : object +Server module + +**Kind**: static property of [patternlab](#patternlab) - Build patterns, copies assets, and constructs user interface. Watches configured `source/` directories, and serves all output locally +* [`.server`](#patternlab.server) : object + * [`.serve(options)`](#patternlab.server.serve) ⇒ Promise + * [`.reload()`](#patternlab.server.reload) ⇒ Promise + * [`.refreshCSS()`](#patternlab.server.refreshCSS) ⇒ Promise + + +#### `server.serve(options)` ⇒ Promise +Build patterns, copies assets, and constructs user interface. Watches configured `source/` directories, and serves all output locally + +**Kind**: static method of [server](#patternlab.server) **Returns**: Promise - a promise fulfilled when build is complete -| Param | Type | Description | -| --- | --- | --- | -| options | object | an object used to control build behavior | -| options.cleanPublic | bool | whether or not to delete the configured output location (usually `public/`) before build | -| options.data | object | additional data to be merged with global data prior to build | -| options.watch | bool | **ALWAYS OVERRIDDEN to `true`** whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild | +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object | | an object used to control build behavior | +| [options.cleanPublic] | bool | true | whether or not to delete the configured output location (usually `public/`) before build | +| [options.data] | object | {} | additional data to be merged with global data prior to build | +| [options.watch] | bool | true | whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild | + + + +#### `server.reload()` ⇒ Promise +Reloads any active live-server instances + +**Kind**: static method of [server](#patternlab.server) +**Returns**: Promise - a promise fulfilled when operation is complete + + +#### `server.refreshCSS()` ⇒ Promise +Reloads CSS on any active live-server instances + +**Kind**: static method of [server](#patternlab.server) +**Returns**: Promise - a promise fulfilled when operation is complete + + +### `patternlab.events` : EventEmitter +**Kind**: static property of [patternlab](#patternlab) +**See** + +- [EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) +- [All Pattern Lab events](./events.md) + * * * diff --git a/packages/core/docs/events.md b/packages/core/docs/events.md index 35478d3c5..2df8191d1 100644 --- a/packages/core/docs/events.md +++ b/packages/core/docs/events.md @@ -5,7 +5,7 @@ Pattern Lab emits numerous events during the [build](../docs/) process. Some uses of events: * Core uses `patternlab-pattern-change` events when watching for changes in order to trigger another build -* Plugins such as [plugin-node-tab](https://github.com/pattern-lab/plugin-node-tab) can use an event like `patternlab-pattern-write-end` to define additional code tabs to the pattern viewer / modal +* Plugins such as [plugin-tab](https://github.com/pattern-lab/patternlab-node/tree/master/packages/plugin-tab) can use an event like `patternlab-pattern-write-end` to define additional code tabs to the pattern viewer / modal Learn more about [Creating Plugins](https://github.com/pattern-lab/patternlab-node/wiki/Creating-Plugins). @@ -18,9 +18,9 @@ Learn more about [Creating Plugins](https://github.com/pattern-lab/patternlab-no ### `EVENTS` ⏏ **Kind**: Exported constant - + -#### `EVENTS~PATTERNLAB_BUILD_PATTERN_START` +#### `EVENTS~PATTERNLAB_BUILD_START` Emitted before any logic run inside `build()`, which is the entry point for single builds, pattern-only builds, run singly or when watched. @@ -31,6 +31,19 @@ Emitted before any logic run inside `build()`, which is the entry point for sing | ---------- | ------------------- | ----------------- | | patternlab | object | global data store | + + +#### `EVENTS~PATTERNLAB_BUILD_END` + +Emitted after all logic run inside `build()`, which is the entry point for single builds, pattern-only builds, run singly or when watched. + +**Kind**: inner property of [EVENTS](#exp_module_Events--EVENTS) +**Properties** + +| Name | Type | Description | +| ---------- | ------------------- | ----------------- | +| patternlab | object | global data store | + #### `EVENTS~PATTERNLAB_PATTERN_ITERATION_END` diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json deleted file mode 100644 index 6d1ea01a6..000000000 --- a/packages/core/package-lock.json +++ /dev/null @@ -1,5174 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } - }, - "chokidar": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", - "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", - "requires": { - "anymatch": "1.3.2", - "async-each": "1.0.1", - "glob-parent": "2.0.0", - "inherits": "2.0.3", - "is-binary-path": "1.0.1", - "is-glob": "2.0.1", - "path-is-absolute": "1.0.1", - "readdirp": "2.1.0" - }, - "dependencies": { - "anymatch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", - "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", - "requires": { - "micromatch": "2.3.11", - "normalize-path": "2.1.1" - } - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "requires": { - "arr-flatten": "1.1.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" - }, - "async-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", - "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "requires": { - "expand-range": "1.8.2", - "preserve": "0.2.0", - "repeat-element": "1.1.2" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "requires": { - "is-posix-bracket": "0.1.1" - } - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "requires": { - "fill-range": "2.2.3" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "requires": { - "is-extglob": "1.0.0" - } - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "requires": { - "is-number": "2.1.0", - "isobject": "2.1.0", - "randomatic": "1.1.7", - "repeat-element": "1.1.2", - "repeat-string": "1.6.1" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "requires": { - "for-in": "1.0.2" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "requires": { - "glob-parent": "2.0.0", - "is-glob": "2.0.1" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "requires": { - "is-glob": "2.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "requires": { - "binary-extensions": "1.11.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "requires": { - "is-primitive": "2.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "1.0.0" - } - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "requires": { - "kind-of": "3.2.2" - } - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "requires": { - "arr-diff": "2.0.0", - "array-unique": "0.2.1", - "braces": "1.8.5", - "expand-brackets": "0.1.5", - "extglob": "0.3.2", - "filename-regex": "2.0.1", - "is-extglob": "1.0.0", - "is-glob": "2.0.1", - "kind-of": "3.2.2", - "normalize-path": "2.1.1", - "object.omit": "2.0.1", - "parse-glob": "3.0.4", - "regex-cache": "0.4.4" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "nan": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz", - "integrity": "sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw==" - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "requires": { - "remove-trailing-separator": "1.1.0" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "requires": { - "for-own": "0.1.5", - "is-extendable": "0.1.1" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "requires": { - "glob-base": "0.3.0", - "is-dotfile": "1.0.3", - "is-extglob": "1.0.0", - "is-glob": "2.0.1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "requires": { - "is-number": "3.0.0", - "kind-of": "4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "readdirp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", - "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", - "requires": { - "graceful-fs": "4.1.11", - "minimatch": "3.0.4", - "readable-stream": "2.3.5", - "set-immediate-shim": "1.0.1" - } - }, - "regex-cache": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", - "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", - "requires": { - "is-equal-shallow": "0.1.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - } - } - }, - "dive": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/dive/-/dive-0.5.0.tgz", - "integrity": "sha1-BtDgft0l2oSVmLrKtE1R8oCb7Ec=" - }, - "eslint": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.5.0.tgz", - "integrity": "sha1-IvyfeA6lvKEwb6srbTM2sPpix1Q=", - "requires": { - "chalk": "1.1.3", - "concat-stream": "1.6.1", - "debug": "2.6.9", - "doctrine": "1.5.0", - "escope": "3.6.0", - "espree": "3.5.4", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "file-entry-cache": "2.0.0", - "glob": "7.1.2", - "globals": "9.18.0", - "ignore": "3.3.7", - "imurmurhash": "0.1.4", - "inquirer": "0.12.0", - "is-my-json-valid": "2.17.2", - "is-resolvable": "1.1.0", - "js-yaml": "3.11.0", - "json-stable-stringify": "1.0.1", - "levn": "0.3.0", - "lodash": "4.17.5", - "mkdirp": "0.5.1", - "natural-compare": "1.4.0", - "optionator": "0.8.2", - "path-is-inside": "1.0.2", - "pluralize": "1.2.1", - "progress": "1.1.8", - "require-uncached": "1.0.3", - "shelljs": "0.6.1", - "strip-bom": "3.0.0", - "strip-json-comments": "1.0.4", - "table": "3.8.3", - "text-table": "0.2.0", - "user-home": "2.0.0" - }, - "dependencies": { - "acorn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.0.tgz", - "integrity": "sha512-arn53F07VXmls4o4pUhSzBa4fvaagPRe7AVZ8l7NHxFWUie2DsuFSBMMNAkgzRlOhEhzAnxeKyaWVzOH4xqp/g==" - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" - } - } - }, - "ajv": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", - "integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ajv-keywords": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz", - "integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=" - }, - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "1.0.3" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "requires": { - "callsites": "0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "requires": { - "restore-cursor": "1.0.1" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.5", - "typedarray": "0.0.6" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "requires": { - "es5-ext": "0.10.39" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" - } - }, - "es5-ext": { - "version": "0.10.39", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.39.tgz", - "integrity": "sha512-AlaXZhPHl0po/uxMx1tyrlt1O86M6D5iVaDH8UgLfgek4kXTX6vzsRfJQWC2Ku+aG8pkw1XWzh9eTkwfVrsD5g==", - "requires": { - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.39", - "es6-symbol": "3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.39", - "es6-iterator": "2.0.3", - "es6-set": "0.1.5", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.39", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1", - "event-emitter": "0.3.5" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.39" - } - }, - "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.39", - "es6-iterator": "2.0.3", - "es6-symbol": "3.1.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", - "requires": { - "es6-map": "0.1.5", - "es6-weak-map": "2.0.2", - "esrecurse": "4.2.1", - "estraverse": "4.2.0" - } - }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "requires": { - "acorn": "5.5.0", - "acorn-jsx": "3.0.1" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "requires": { - "estraverse": "4.2.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "requires": { - "d": "1.0.0", - "es5-ext": "0.10.39" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" - } - }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "requires": { - "flat-cache": "1.3.0", - "object-assign": "4.1.1" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" - } - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=", - "requires": { - "is-property": "1.0.2" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "inquirer": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", - "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", - "requires": { - "ansi-escapes": "1.4.0", - "ansi-regex": "2.1.1", - "chalk": "1.1.3", - "cli-cursor": "1.0.2", - "cli-width": "2.2.0", - "figures": "1.7.0", - "lodash": "4.17.5", - "readline2": "1.0.1", - "run-async": "0.1.0", - "rx-lite": "3.1.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "through": "2.3.8" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-my-ip-valid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz", - "integrity": "sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==" - }, - "is-my-json-valid": { - "version": "2.17.2", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz", - "integrity": "sha512-IBhBslgngMQN8DDSppmgDv7RNrlFotuuDsKcrCP3+HbFaVivIBU7u9oiiErw8sH4ynx3+gOGQ3q2otkgiSi6kg==", - "requires": { - "generate-function": "2.0.0", - "generate-object-property": "1.2.0", - "is-my-ip-valid": "1.0.0", - "jsonpointer": "4.0.1", - "xtend": "4.0.1" - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "requires": { - "is-path-inside": "1.0.1" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "requires": { - "path-is-inside": "1.0.2" - } - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "requires": { - "jsonify": "0.0.0" - } - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" - }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "mute-stream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz", - "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=" - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "pluralize": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz", - "integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=" - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=" - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "readline2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz", - "integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "mute-stream": "0.0.5" - } - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" - } - }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "requires": { - "exit-hook": "1.1.1", - "onetime": "1.1.0" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "run-async": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz", - "integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=", - "requires": { - "once": "1.4.0" - } - }, - "rx-lite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", - "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=" - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "shelljs": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz", - "integrity": "sha1-7GIRvtGSBEIIj+D3Cyg3Iy7SyKg=" - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=" - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=" - }, - "table": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", - "integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=", - "requires": { - "ajv": "4.11.8", - "ajv-keywords": "1.5.1", - "chalk": "1.1.3", - "lodash": "4.17.5", - "slice-ansi": "0.0.4", - "string-width": "2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "user-home": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", - "integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=", - "requires": { - "os-homedir": "1.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "requires": { - "mkdirp": "0.5.1" - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - } - } - }, - "eslint-config-prettier": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz", - "integrity": "sha512-ag8YEyBXsm3nmOv1Hz991VtNNDMRa+MNy8cY47Pl4bw6iuzqKbJajXdqUpiw13STdLLrznxgm1hj9NhxeOYq0A==", - "requires": { - "get-stdin": "5.0.1" - }, - "dependencies": { - "get-stdin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", - "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=" - } - } - }, - "eslint-plugin-prettier": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz", - "integrity": "sha512-floiaI4F7hRkTrFe8V2ItOK97QYrX75DjmdzmVITZoAP6Cn06oEDPQRsO6MlHEP/u2SxI3xQ52Kpjw6j5WGfeQ==", - "requires": { - "fast-diff": "1.1.2", - "jest-docblock": "21.2.0" - }, - "dependencies": { - "fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" - }, - "jest-docblock": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", - "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==" - } - } - }, - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" - }, - "dependencies": { - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "4.1.11" - } - }, - "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=" - } - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - }, - "dependencies": { - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - } - } - }, - "graphlib": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.5.tgz", - "integrity": "sha512-XvtbqCcw+EM5SqQrIetIKKD+uZVNQtDPD1goIg7K73RuRZtVI5rYMdcCVSHm/AS1sCBZ7vt0p5WgXouucHQaOA==", - "requires": { - "lodash": "4.17.5" - } - }, - "husky": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz", - "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==", - "requires": { - "is-ci": "1.1.0", - "normalize-path": "1.0.0", - "strip-indent": "2.0.0" - }, - "dependencies": { - "ci-info": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.1.2.tgz", - "integrity": "sha512-uTGIPNx/nSpBdsF6xnseRXLLtfr9VLqkz8ZqHXr3Y7b6SftyRxBGjwMtJj1OhNbmlc1wZzLNAlAcvyIiE8a6ZA==" - }, - "is-ci": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.1.0.tgz", - "integrity": "sha512-c7TnwxLePuqIlxHgr7xtxzycJPegNHFuIrBkwbf8hc58//+Op1CqFkyS+xnIMkwn9UsJIwc174BIjkyBmSpjKg==", - "requires": { - "ci-info": "1.1.2" - } - }, - "normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - } - } - }, - "js-beautify": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.7.5.tgz", - "integrity": "sha512-9OhfAqGOrD7hoQBLJMTA+BKuKmoEtTJXzZ7WDF/9gvjtey1koVLuZqIY6c51aPDjbNdNtIXAkiWKVhziawE9Og==", - "requires": { - "config-chain": "1.1.11", - "editorconfig": "0.13.3", - "mkdirp": "0.5.1", - "nopt": "3.0.6" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "commander": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", - "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==" - }, - "config-chain": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.11.tgz", - "integrity": "sha1-q6CXR9++TD5w52am5BWG4YWfxvI=", - "requires": { - "ini": "1.3.5", - "proto-list": "1.2.4" - } - }, - "editorconfig": { - "version": "0.13.3", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.13.3.tgz", - "integrity": "sha512-WkjsUNVCu+ITKDj73QDvi0trvpdDWdkDyHybDGSXPfekLCqwmpD7CP7iPbvBgosNuLcI96XTDwNa75JyFl7tEQ==", - "requires": { - "bluebird": "3.5.1", - "commander": "2.14.1", - "lru-cache": "3.2.0", - "semver": "5.5.0", - "sigmund": "1.0.1" - } - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "lru-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-3.2.0.tgz", - "integrity": "sha1-cXibO39Tmb7IVl3aOKow0qCX7+4=", - "requires": { - "pseudomap": "1.0.2" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "requires": { - "abbrev": "1.1.1" - } - }, - "proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" - } - } - }, - "js-yaml": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", - "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", - "requires": { - "argparse": "1.0.10", - "esprima": "4.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "1.0.3" - } - }, - "esprima": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", - "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - } - } - }, - "jsdoc-to-markdown": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/jsdoc-to-markdown/-/jsdoc-to-markdown-3.0.4.tgz", - "integrity": "sha512-NDD+dpLiF9SYJXFcYPutKi/K8pRtIHHmVyQJzUArYQCoVhNISKeIVK5Pe78mi7K5s16/Nk7EviN2xxlJJ+S5Bw==", - "requires": { - "array-back": "2.0.0", - "command-line-tool": "0.7.0", - "config-master": "3.1.0", - "dmd": "3.0.11", - "jsdoc-api": "3.0.0", - "jsdoc-parse": "3.0.1", - "walk-back": "3.0.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "requires": { - "acorn": "3.3.0" - } - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, - "ansi-escape-sequences": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-3.0.0.tgz", - "integrity": "sha1-HBg5S2r5t2/5pjUJ+kl2af0s5T4=", - "requires": { - "array-back": "1.0.4" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - } - } - }, - "array-back": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", - "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", - "requires": { - "typical": "2.6.1" - } - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "bluebird": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" - }, - "cache-point": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cache-point/-/cache-point-0.4.1.tgz", - "integrity": "sha512-4TgWfe9SF+bUy5cCql8gWHqKNrviufNwSYxLjf2utB0pY4+bdcuFwMmY1hDB+67Gz/L1vmhFNhePAjJTFBtV+Q==", - "requires": { - "array-back": "2.0.0", - "fs-then-native": "2.0.0", - "mkdirp2": "1.0.3" - } - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "optional": true - }, - "catharsis": { - "version": "0.8.9", - "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.9.tgz", - "integrity": "sha1-mMyJDKZS3S7w5ws3klMQ/56Q/Is=", - "requires": { - "underscore-contrib": "0.3.0" - } - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "optional": true, - "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "optional": true, - "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "optional": true - } - } - }, - "collect-all": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.3.tgz", - "integrity": "sha512-0y0rBgoX8IzIjBAUnO73SEtSb4Mhk3IoceWJq5zZSxb9mWORhWH8xLYo4EDSOE1jRBk1LhmfjqWFFt10h/+MEA==", - "requires": { - "stream-connect": "1.0.2", - "stream-via": "1.0.4" - } - }, - "command-line-args": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-4.0.7.tgz", - "integrity": "sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA==", - "requires": { - "array-back": "2.0.0", - "find-replace": "1.0.3", - "typical": "2.6.1" - } - }, - "command-line-tool": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/command-line-tool/-/command-line-tool-0.7.0.tgz", - "integrity": "sha1-yoB5KuIGnPfKpWLAy8LNEYERIqA=", - "requires": { - "ansi-escape-sequences": "3.0.0", - "array-back": "1.0.4", - "command-line-args": "4.0.7", - "command-line-usage": "4.1.0", - "typical": "2.6.1" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - } - } - }, - "command-line-usage": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-4.1.0.tgz", - "integrity": "sha512-MxS8Ad995KpdAC0Jopo/ovGIroV/m0KHwzKfXxKag6FHOkGsH8/lv5yjgablcRxCJJC0oJeUMuO/gmaq+Wq46g==", - "requires": { - "ansi-escape-sequences": "4.0.0", - "array-back": "2.0.0", - "table-layout": "0.4.2", - "typical": "2.6.1" - }, - "dependencies": { - "ansi-escape-sequences": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-4.0.0.tgz", - "integrity": "sha512-v+0wW9Wezwsyb0uF4aBVCjmSqit3Ru7PZFziGF0o2KwTvN2zWfTi3BRLq9EkJFdg3eBbyERXGTntVpBxH1J68Q==", - "requires": { - "array-back": "2.0.0" - } - } - } - }, - "common-sequence": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-1.0.2.tgz", - "integrity": "sha1-MOB/P49vf5s97oVPILLTnu4Ibeg=" - }, - "config-master": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/config-master/-/config-master-3.1.0.tgz", - "integrity": "sha1-ZnZjWQUFooO/JqSE1oSJ10xUhdo=", - "requires": { - "walk-back": "2.0.1" - }, - "dependencies": { - "walk-back": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-2.0.1.tgz", - "integrity": "sha1-VU4qnYdPrEeoywBr9EwvDEmYoKQ=" - } - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "optional": true - }, - "deep-extend": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.0.tgz", - "integrity": "sha1-bvSgmwX5iw41jW2T1Mo8rsZnKAM=" - }, - "dmd": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/dmd/-/dmd-3.0.11.tgz", - "integrity": "sha512-Naq/y7ME1dG8e4u0IJ2jA/G2gtbm4ZQzAG0LldwE1BCUrVWzR9VY5ayvXYSd+p9fdh5ojxayABbelDRM32xIhg==", - "requires": { - "array-back": "2.0.0", - "cache-point": "0.4.1", - "common-sequence": "1.0.2", - "file-set": "2.0.0", - "handlebars": "4.0.11", - "marked": "0.3.17", - "object-get": "2.1.0", - "reduce-flatten": "1.0.1", - "reduce-unique": "1.0.0", - "reduce-without": "1.0.1", - "test-value": "3.0.0", - "walk-back": "3.0.0" - }, - "dependencies": { - "test-value": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", - "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", - "requires": { - "array-back": "2.0.0", - "typical": "2.6.1" - } - } - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "espree": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.1.7.tgz", - "integrity": "sha1-/V3ux2qXpRIKnNOnyxF3oJI7EdI=", - "requires": { - "acorn": "3.3.0", - "acorn-jsx": "3.0.1" - } - }, - "file-set": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-set/-/file-set-2.0.0.tgz", - "integrity": "sha512-cCWXfw+nrYoIoUVmEF7Xsw91lGWuObtSnTEZ7AmdvZou1A/6Xx237HfxdQyC/ayKRvQSMbNOBwg62OjN5JxbXw==", - "requires": { - "array-back": "2.0.0", - "glob": "7.1.2" - } - }, - "find-replace": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-1.0.3.tgz", - "integrity": "sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A=", - "requires": { - "array-back": "1.0.4", - "test-value": "2.1.0" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - } - } - }, - "fs-then-native": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fs-then-native/-/fs-then-native-2.0.0.tgz", - "integrity": "sha1-GaEk2U2QwiyOBF8ujdbr6jbUjGc=" - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "optional": true - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "js2xmlparser": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-1.0.0.tgz", - "integrity": "sha1-WhcPLo1kds5FQF4EgjJCUTeC/jA=" - }, - "jsdoc-75lb": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/jsdoc-75lb/-/jsdoc-75lb-3.6.0.tgz", - "integrity": "sha1-qAcRlSi0AJzLyrSbdSL2P+xs0L0=", - "requires": { - "bluebird": "3.4.7", - "catharsis": "0.8.9", - "escape-string-regexp": "1.0.5", - "espree": "3.1.7", - "js2xmlparser": "1.0.0", - "klaw": "1.3.1", - "marked": "0.3.17", - "mkdirp": "0.5.1", - "requizzle": "0.2.1", - "strip-json-comments": "2.0.1", - "taffydb": "2.6.2", - "underscore": "1.8.3" - } - }, - "jsdoc-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsdoc-api/-/jsdoc-api-3.0.0.tgz", - "integrity": "sha1-DVJwAjX4Zb1Ki61evB77Vi/IrSo=", - "requires": { - "array-back": "1.0.4", - "cache-point": "0.4.1", - "collect-all": "1.0.3", - "file-set": "1.1.1", - "fs-then-native": "2.0.0", - "jsdoc-75lb": "3.6.0", - "object-to-spawn-args": "1.1.1", - "temp-path": "1.0.0", - "walk-back": "2.0.1" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - }, - "file-set": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/file-set/-/file-set-1.1.1.tgz", - "integrity": "sha1-0+xwwIDsjxjyBLod4QZ4DJBWkms=", - "requires": { - "array-back": "1.0.4", - "glob": "7.1.2" - } - }, - "walk-back": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-2.0.1.tgz", - "integrity": "sha1-VU4qnYdPrEeoywBr9EwvDEmYoKQ=" - } - } - }, - "jsdoc-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-3.0.1.tgz", - "integrity": "sha512-btZLp4wYl90vcAfgk4hoGQbO17iBVrhh3LJRMKZNtZgniO3F8H2CjxXld0owBIB1XxN+j3bAcWZnZKMnSj3iMA==", - "requires": { - "array-back": "2.0.0", - "lodash.omit": "4.5.0", - "lodash.pick": "4.4.0", - "reduce-extract": "1.0.0", - "sort-array": "2.0.0", - "test-value": "3.0.0" - }, - "dependencies": { - "test-value": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", - "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", - "requires": { - "array-back": "2.0.0", - "typical": "2.6.1" - } - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "requires": { - "graceful-fs": "4.1.11" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "optional": true - }, - "lodash.omit": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=" - }, - "lodash.padend": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", - "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=" - }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" - }, - "marked": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.17.tgz", - "integrity": "sha512-+AKbNsjZl6jFfLPwHhWmGTqE009wTKn3RTmn9K8oUKHrX/abPJjtcRtXpYB/FFrwPJRUA86LX/de3T0knkPCmQ==" - }, - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } - }, - "mkdirp2": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mkdirp2/-/mkdirp2-1.0.3.tgz", - "integrity": "sha1-zI3YJl8fBuLY9bELblL04FC+0hs=" - }, - "object-get": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object-get/-/object-get-2.1.0.tgz", - "integrity": "sha1-ciu9tgA576R8rTxtws5RqFwCxa4=" - }, - "object-to-spawn-args": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-to-spawn-args/-/object-to-spawn-args-1.1.1.tgz", - "integrity": "sha1-d9qIJ/Bz0BHJ4bFz+JV4FHAkZ4U=" - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "requires": { - "minimist": "0.0.10", - "wordwrap": "0.0.3" - } - }, - "reduce-extract": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/reduce-extract/-/reduce-extract-1.0.0.tgz", - "integrity": "sha1-Z/I4W+2mUGG19fQxJmLosIDKFSU=", - "requires": { - "test-value": "1.1.0" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - }, - "test-value": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", - "integrity": "sha1-oJE29y7AQ9J8iTcHwrFZv6196T8=", - "requires": { - "array-back": "1.0.4", - "typical": "2.6.1" - } - } - } - }, - "reduce-flatten": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", - "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=" - }, - "reduce-unique": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/reduce-unique/-/reduce-unique-1.0.0.tgz", - "integrity": "sha1-flhrz4ek4ytter2Cd/rWzeyfSAM=" - }, - "reduce-without": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/reduce-without/-/reduce-without-1.0.1.tgz", - "integrity": "sha1-aK0OrRGFXJo31OglbBW7+Hly/Iw=", - "requires": { - "test-value": "2.1.0" - } - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "requizzle": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.1.tgz", - "integrity": "sha1-aUPDUwxNmn5G8c3dUcFY/GcM294=", - "requires": { - "underscore": "1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" - } - } - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "optional": true, - "requires": { - "align-text": "0.1.4" - } - }, - "sort-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-2.0.0.tgz", - "integrity": "sha1-OKnG2if9fRR7QuYFVPKBGHtN9HI=", - "requires": { - "array-back": "1.0.4", - "object-get": "2.1.0", - "typical": "2.6.1" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - } - } - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } - }, - "stream-connect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", - "integrity": "sha1-GLyB8u2zW4tdmoAJIAqYUxRCipc=", - "requires": { - "array-back": "1.0.4" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - } - } - }, - "stream-via": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-1.0.4.tgz", - "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==" - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "table-layout": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.2.tgz", - "integrity": "sha512-tygyl5+eSHj4chpq5Zfy6cpc7MOUBClAW9ozghFH7hg9bAUzShOYn+/vUzTRkKOSLJWKfgYtP2tAU2c0oAD8eg==", - "requires": { - "array-back": "2.0.0", - "deep-extend": "0.5.0", - "lodash.padend": "4.6.1", - "typical": "2.6.1", - "wordwrapjs": "3.0.0" - } - }, - "taffydb": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", - "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=" - }, - "temp-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/temp-path/-/temp-path-1.0.0.tgz", - "integrity": "sha1-JLFUOXOrRCiW2a02fdnL2/r+kYs=" - }, - "test-value": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", - "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", - "requires": { - "array-back": "1.0.4", - "typical": "2.6.1" - }, - "dependencies": { - "array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", - "requires": { - "typical": "2.6.1" - } - } - } - }, - "typical": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", - "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=" - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "optional": true, - "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "optional": true - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" - }, - "underscore-contrib": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/underscore-contrib/-/underscore-contrib-0.3.0.tgz", - "integrity": "sha1-ZltmwkeD+PorGMn4y7Dix9SMJsc=", - "requires": { - "underscore": "1.6.0" - }, - "dependencies": { - "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" - } - } - }, - "walk-back": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-3.0.0.tgz", - "integrity": "sha1-I1h4ejXakQMtrV6S+AsSNw2HlcU=" - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" - }, - "wordwrapjs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz", - "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==", - "requires": { - "reduce-flatten": "1.0.1", - "typical": "2.6.1" - } - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "optional": true, - "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", - "window-size": "0.1.0" - } - } - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "markdown-it": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-6.1.1.tgz", - "integrity": "sha1-ztA39Ec+6fUVOsQU933IPJG6knw=", - "requires": { - "argparse": "1.0.10", - "entities": "1.1.1", - "linkify-it": "1.2.4", - "mdurl": "1.0.1", - "uc.micro": "1.0.5" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "1.0.3" - } - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" - }, - "linkify-it": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-1.2.4.tgz", - "integrity": "sha1-B3NSbDF8j9E71TTuHRgP+Iq/iBo=", - "requires": { - "uc.micro": "1.0.5" - } - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "uc.micro": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.5.tgz", - "integrity": "sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg==" - } - } - }, - "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", - "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", - "requires": { - "encoding": "0.1.12", - "is-stream": "1.1.0" - }, - "dependencies": { - "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "0.4.19" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - } - } - }, - "prettier": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.10.2.tgz", - "integrity": "sha512-TcdNoQIWFoHblurqqU6d1ysopjq7UX0oRcT/hJ8qvBAELiYWn+Ugf0AXdnzISEJ7vuhNnQ98N8jR8Sh53x4IZg==" - }, - "pretty-quick": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-1.4.1.tgz", - "integrity": "sha512-Q4V2GAflSaM739kKH63utbfI2n4s2fCDCyjFC4ykxA9ueb7FknLcLAZSKa3DejHMt5q9Fq395eKTZ9wYwoILBw==", - "requires": { - "chalk": "2.3.2", - "execa": "0.8.0", - "find-up": "2.1.0", - "ignore": "3.3.7", - "mri": "1.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "ignore": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", - "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "mri": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.0.tgz", - "integrity": "sha1-XAo/KcjM/7ux7JQdzsCdcfoy82o=" - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "2.0.1" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", - "requires": { - "p-try": "1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "1.2.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "requires": { - "has-flag": "3.0.0" - } - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "requires": { - "isexe": "2.0.0" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - } - } - }, - "recursive-copy": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/recursive-copy/-/recursive-copy-2.0.9.tgz", - "integrity": "sha512-0AkHV+QtfS/1jW01z3m2t/TRTW56Fpc+xYbsoa/bqn8BCYPwmsaNjlYmUU/dyGg9w8MmGoUWihU5W+s+qjxvBQ==", - "requires": { - "del": "2.2.2", - "emitter-mixin": "0.0.3", - "errno": "0.1.7", - "graceful-fs": "4.1.11", - "junk": "1.0.3", - "maximatch": "0.1.0", - "mkdirp": "0.5.1", - "pify": "2.3.0", - "promise": "7.3.1", - "slash": "1.0.0" - }, - "dependencies": { - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "1.0.3" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "del": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", - "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", - "requires": { - "globby": "5.0.0", - "is-path-cwd": "1.0.0", - "is-path-in-cwd": "1.0.0", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "rimraf": "2.6.2" - } - }, - "emitter-mixin": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/emitter-mixin/-/emitter-mixin-0.0.3.tgz", - "integrity": "sha1-WUjLKG8uSO3DslGnz8H3iDOW1lw=" - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "requires": { - "prr": "1.0.1" - } - }, - "globby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", - "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", - "requires": { - "array-union": "1.0.2", - "arrify": "1.0.1", - "glob": "7.1.2", - "object-assign": "4.1.1", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" - }, - "is-path-in-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", - "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", - "requires": { - "is-path-inside": "1.0.1" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "requires": { - "path-is-inside": "1.0.2" - } - }, - "junk": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/junk/-/junk-1.0.3.tgz", - "integrity": "sha1-h75jSIZJy9ym9Tqzm+yczSNH9ZI=" - }, - "maximatch": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/maximatch/-/maximatch-0.1.0.tgz", - "integrity": "sha1-hs2NawTJ8wfAWmuUGZBtA2D7E6I=", - "requires": { - "array-differ": "1.0.0", - "array-union": "1.0.2", - "arrify": "1.0.1", - "minimatch": "3.0.4" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", - "requires": { - "asap": "2.0.6" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "requires": { - "glob": "7.1.2" - } - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" - } - } - }, - "rewire": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-2.5.2.tgz", - "integrity": "sha1-ZCfee3/u+n02QBUH62SlOFvFjcc=" - }, - "standard-version": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-4.3.0.tgz", - "integrity": "sha512-2UJ2BIUNa7+41PH4FvYicSQED2LCt2RXjmNFis+JZlxZtwzNnGn4uuL8WBUqHoC9b+bJ0AHIAX/bilzm+pGPeA==", - "requires": { - "chalk": "1.1.3", - "conventional-changelog": "1.1.18", - "conventional-recommended-bump": "1.2.1", - "dotgitignore": "1.0.3", - "figures": "1.7.0", - "fs-access": "1.0.1", - "semver": "5.5.0", - "yargs": "8.0.2" - }, - "dependencies": { - "JSONStream": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", - "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", - "requires": { - "jsonparse": "1.3.1", - "through": "2.3.8" - } - }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "requires": { - "kind-of": "3.2.2", - "longest": "1.0.1", - "repeat-string": "1.6.1" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" - }, - "array-ify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", - "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=" - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "1.0.0", - "concat-map": "0.0.1" - } - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" - }, - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "optional": true - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "requires": { - "camelcase": "4.1.0", - "map-obj": "2.0.0", - "quick-lru": "1.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - } - } - }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "optional": true, - "requires": { - "align-text": "0.1.4", - "lazy-cache": "1.0.4" - } - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "optional": true, - "requires": { - "center-align": "0.1.3", - "right-align": "0.1.3", - "wordwrap": "0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "compare-func": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", - "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", - "requires": { - "array-ify": "1.0.0", - "dot-prop": "3.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", - "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.5", - "typedarray": "0.0.6" - } - }, - "conventional-changelog": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-1.1.18.tgz", - "integrity": "sha512-swf5bqhm7PsY2cw6zxuPy6+rZiiGwEpQnrWki+L+z2oZI53QSYwU4brpljmmWss821AsiwmVL+7V6hP+ER+TBA==", - "requires": { - "conventional-changelog-angular": "1.6.6", - "conventional-changelog-atom": "0.2.4", - "conventional-changelog-codemirror": "0.3.4", - "conventional-changelog-core": "2.0.5", - "conventional-changelog-ember": "0.3.6", - "conventional-changelog-eslint": "1.0.5", - "conventional-changelog-express": "0.3.4", - "conventional-changelog-jquery": "0.1.0", - "conventional-changelog-jscs": "0.1.0", - "conventional-changelog-jshint": "0.3.4", - "conventional-changelog-preset-loader": "1.1.6" - } - }, - "conventional-changelog-angular": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz", - "integrity": "sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg==", - "requires": { - "compare-func": "1.3.2", - "q": "1.5.1" - } - }, - "conventional-changelog-atom": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-0.2.4.tgz", - "integrity": "sha512-4+hmbBwcAwx1XzDZ4aEOxk/ONU0iay10G0u/sld16ksgnRUHN7CxmZollm3FFaptr6VADMq1qxomA+JlpblBlg==", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-codemirror": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.3.4.tgz", - "integrity": "sha512-8M7pGgQVzRU//vG3rFlLYqqBywOLxu9XM0/lc1/1Ll7RuKA79PgK9TDpuPmQDHFnqGS7D1YiZpC3Z0D9AIYExg==", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-core": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-2.0.5.tgz", - "integrity": "sha512-lP1s7Z3NyEFcG78bWy7GG7nXsq9OpAJgo2xbyAlVBDweLSL5ghvyEZlkEamnAQpIUVK0CAVhs8nPvCiQuXT/VA==", - "requires": { - "conventional-changelog-writer": "3.0.4", - "conventional-commits-parser": "2.1.5", - "dateformat": "3.0.3", - "get-pkg-repo": "1.4.0", - "git-raw-commits": "1.3.4", - "git-remote-origin-url": "2.0.0", - "git-semver-tags": "1.3.4", - "lodash": "4.17.5", - "normalize-package-data": "2.4.0", - "q": "1.5.1", - "read-pkg": "1.1.0", - "read-pkg-up": "1.0.1", - "through2": "2.0.3" - } - }, - "conventional-changelog-ember": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-0.3.6.tgz", - "integrity": "sha512-hBM1xb5IrjNtsjXaGryPF/Wn36cwyjkNeqX/CIDbJv/1kRFBHsWoSPYBiNVEpg8xE5fcK4DbPhGTDN2sVoPeiA==", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-eslint": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-1.0.5.tgz", - "integrity": "sha512-7NUv+gMOS8Y49uPFRgF7kuLZqpnrKa2bQMZZsc62NzvaJmjUktnV03PYHuXhTDEHt5guvV9gyEFtUpgHCDkojg==", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-express": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-0.3.4.tgz", - "integrity": "sha512-M+UUb715TXT6l9vyMf4HYvAepnQn0AYTcPi6KHrFsd80E0HErjQnqStBg8i3+Qm7EV9+RyATQEnIhSzHbdQ7+A==", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-jquery": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz", - "integrity": "sha1-Agg5cWLjhGmG5xJztsecW1+A9RA=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-jscs": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz", - "integrity": "sha1-BHnrRDzH1yxYvwvPDvHURKkvDlw=", - "requires": { - "q": "1.5.1" - } - }, - "conventional-changelog-jshint": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-0.3.4.tgz", - "integrity": "sha512-CdrqwDgL56b176FVxHmhuOvnO1dRDQvrMaHyuIVjcFlOXukATz2wVT17g8jQU3LvybVbyXvJRbdD5pboo7/1KQ==", - "requires": { - "compare-func": "1.3.2", - "q": "1.5.1" - } - }, - "conventional-changelog-preset-loader": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.6.tgz", - "integrity": "sha512-yWPIP9wwsCKeUSPYApnApWhKIDjWRIX/uHejGS1tYfEsQR/bwpDFET7LYiHT+ujNbrlf6h1s3NlPGheOd4yJRQ==" - }, - "conventional-changelog-writer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-3.0.4.tgz", - "integrity": "sha512-EUf/hWiEj3IOa5Jk8XDzM6oS0WgijlYGkUfLc+mDnLH9RwpZqhYIBwgJHWHzEB4My013wx2FhmUu45P6tQrucw==", - "requires": { - "compare-func": "1.3.2", - "conventional-commits-filter": "1.1.5", - "dateformat": "3.0.3", - "handlebars": "4.0.11", - "json-stringify-safe": "5.0.1", - "lodash": "4.17.5", - "meow": "4.0.0", - "semver": "5.5.0", - "split": "1.0.1", - "through2": "2.0.3" - } - }, - "conventional-commits-filter": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-1.1.5.tgz", - "integrity": "sha512-mj3+WLj8UZE72zO9jocZjx8+W4Bwnx/KHoIz1vb4F8XUXj0XSjp8Y3MFkpRyIpsRiCBX+DkDjxGKF/nfeu7BGw==", - "requires": { - "is-subset": "0.1.1", - "modify-values": "1.0.0" - } - }, - "conventional-commits-parser": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-2.1.5.tgz", - "integrity": "sha512-jaAP61py+ISMF3/n3yIiIuY5h6mJlucOqawu5mLB1HaQADLvg/y5UB3pT7HSucZJan34lp7+7ylQPfbKEGmxrA==", - "requires": { - "JSONStream": "1.3.2", - "is-text-path": "1.0.1", - "lodash": "4.17.5", - "meow": "4.0.0", - "split2": "2.2.0", - "through2": "2.0.3", - "trim-off-newlines": "1.0.1" - } - }, - "conventional-recommended-bump": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-1.2.1.tgz", - "integrity": "sha512-oJjG6DkRgtnr/t/VrPdzmf4XZv8c4xKVJrVT4zrSHd92KEL+EYxSbYoKq8lQ7U5yLMw7130wrcQTLRjM/T+d4w==", - "requires": { - "concat-stream": "1.6.1", - "conventional-commits-filter": "1.1.5", - "conventional-commits-parser": "2.1.5", - "git-raw-commits": "1.3.4", - "git-semver-tags": "1.3.4", - "meow": "3.7.0", - "object-assign": "4.1.1" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" - } - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "2.0.1" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "4.0.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - } - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "requires": { - "array-find-index": "1.0.2" - } - }, - "dargs": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", - "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "requires": { - "decamelize": "1.2.0", - "map-obj": "1.0.1" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - } - } - }, - "dot-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", - "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", - "requires": { - "is-obj": "1.0.1" - } - }, - "dotgitignore": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dotgitignore/-/dotgitignore-1.0.3.tgz", - "integrity": "sha512-eu5XjSstm0WXQsARgo6kPjkINYZlOUW+z/KtAAIBjHa5mUpMPrxJytbPIndWz6GubBuuuH5ljtVcXKnVnH5q8w==", - "requires": { - "find-up": "2.1.0", - "minimatch": "3.0.4" - } - }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", - "requires": { - "is-arrayish": "0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "requires": { - "escape-string-regexp": "1.0.5", - "object-assign": "4.1.1" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "fs-access": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz", - "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=", - "requires": { - "null-check": "1.0.0" - } - }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" - }, - "get-pkg-repo": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", - "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", - "requires": { - "hosted-git-info": "2.5.0", - "meow": "3.7.0", - "normalize-package-data": "2.4.0", - "parse-github-repo-url": "1.4.1", - "through2": "2.0.3" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", - "requires": { - "camelcase": "2.1.1", - "map-obj": "1.0.1" - } - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", - "requires": { - "repeating": "2.0.1" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", - "requires": { - "camelcase-keys": "2.1.0", - "decamelize": "1.2.0", - "loud-rejection": "1.6.0", - "map-obj": "1.0.1", - "minimist": "1.2.0", - "normalize-package-data": "2.4.0", - "object-assign": "4.1.1", - "read-pkg-up": "1.0.1", - "redent": "1.0.0", - "trim-newlines": "1.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", - "requires": { - "indent-string": "2.1.0", - "strip-indent": "1.0.1" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", - "requires": { - "get-stdin": "4.0.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" - } - } - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "git-raw-commits": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-1.3.4.tgz", - "integrity": "sha512-G3O+41xHbscpgL5nA0DUkbFVgaAz5rd57AMSIMew8p7C8SyFwZDyn08MoXHkTl9zcD0LmxsLFPxbqFY4YPbpPA==", - "requires": { - "dargs": "4.1.0", - "lodash.template": "4.4.0", - "meow": "4.0.0", - "split2": "2.2.0", - "through2": "2.0.3" - } - }, - "git-remote-origin-url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", - "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", - "requires": { - "gitconfiglocal": "1.0.0", - "pify": "2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } - } - }, - "git-semver-tags": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-1.3.4.tgz", - "integrity": "sha512-Xe2Z74MwXZfAezuaO6e6cA4nsgeCiARPzaBp23gma325c/OXdt//PhrknptIaynNeUp2yWtmikV7k5RIicgGIQ==", - "requires": { - "meow": "4.0.0", - "semver": "5.5.0" - } - }, - "gitconfiglocal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", - "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", - "requires": { - "ini": "1.3.5" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", - "requires": { - "async": "1.5.2", - "optimist": "0.6.1", - "source-map": "0.4.4", - "uglify-js": "2.8.29" - } - }, - "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "requires": { - "builtin-modules": "1.1.1" - } - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-subset": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz", - "integrity": "sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY=" - }, - "is-text-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", - "requires": { - "text-extensions": "1.7.0" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "json-parse-better-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", - "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "1.1.6" - } - }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "optional": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "requires": { - "invert-kv": "1.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "2.0.0", - "path-exists": "3.0.0" - } - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" - }, - "lodash.template": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", - "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", - "requires": { - "lodash._reinterpolate": "3.0.0", - "lodash.templatesettings": "4.1.0" - } - }, - "lodash.templatesettings": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", - "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=", - "requires": { - "lodash._reinterpolate": "3.0.0" - } - }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "requires": { - "currently-unhandled": "0.4.1", - "signal-exit": "3.0.2" - } - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=" - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "requires": { - "mimic-fn": "1.2.0" - } - }, - "meow": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.0.tgz", - "integrity": "sha512-Me/kel335m6vMKmEmA6c87Z6DUFW3JqkINRnxkbC+A/PUm0D5Fl2dEBQrPKnqCL9Te/CIa1MUt/0InMJhuC/sw==", - "requires": { - "camelcase-keys": "4.2.0", - "decamelize-keys": "1.1.0", - "loud-rejection": "1.6.0", - "minimist": "1.2.0", - "minimist-options": "3.0.2", - "normalize-package-data": "2.4.0", - "read-pkg-up": "3.0.0", - "redent": "2.0.0", - "trim-newlines": "2.0.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "requires": { - "load-json-file": "4.0.0", - "normalize-package-data": "2.4.0", - "path-type": "3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "requires": { - "find-up": "2.1.0", - "read-pkg": "3.0.0" - } - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "1.1.11" - } - }, - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" - }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "requires": { - "arrify": "1.0.1", - "is-plain-obj": "1.1.0" - } - }, - "modify-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.0.tgz", - "integrity": "sha1-4rbN65zhn5kxelNyLz2/XfXqqrI=" - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "requires": { - "hosted-git-info": "2.5.0", - "is-builtin-module": "1.0.0", - "semver": "5.5.0", - "validate-npm-package-license": "3.0.3" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "2.0.1" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=" - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "requires": { - "minimist": "0.0.10", - "wordwrap": "0.0.3" - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "requires": { - "execa": "0.7.0", - "lcid": "1.0.0", - "mem": "1.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-limit": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", - "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", - "requires": { - "p-try": "1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "1.2.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, - "parse-github-repo-url": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", - "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=" - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "requires": { - "error-ex": "1.3.1", - "json-parse-better-errors": "1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "requires": { - "pify": "3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "requires": { - "pinkie": "2.0.4" - } - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=" - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "requires": { - "load-json-file": "1.1.0", - "normalize-package-data": "2.4.0", - "path-type": "1.1.0" - }, - "dependencies": { - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "pinkie-promise": "2.0.1", - "strip-bom": "2.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "1.3.1" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "4.1.11", - "pify": "2.3.0", - "pinkie-promise": "2.0.1" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "0.2.1" - } - } - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "1.1.2", - "read-pkg": "1.1.0" - }, - "dependencies": { - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "2.0.1" - } - } - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "requires": { - "indent-string": "3.2.0", - "strip-indent": "2.0.0" - } - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", - "requires": { - "is-finite": "1.0.2" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" - }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "optional": true, - "requires": { - "align-text": "0.1.4" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "requires": { - "amdefine": "1.0.1" - } - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "requires": { - "spdx-expression-parse": "3.0.0", - "spdx-license-ids": "3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "requires": { - "spdx-exceptions": "2.1.0", - "spdx-license-ids": "3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" - }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", - "requires": { - "through": "2.3.8" - } - }, - "split2": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", - "requires": { - "through2": "2.0.3" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - } - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" - }, - "text-extensions": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.7.0.tgz", - "integrity": "sha512-AKXZeDq230UaSzaO5s3qQUZOaC7iKbzq0jOFL614R7d9R593HLqAOL0cYoqLdkNrjBSOdmoQI06yigq1TSBXAg==" - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" - }, - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "requires": { - "readable-stream": "2.3.5", - "xtend": "4.0.1" - } - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=" - }, - "trim-off-newlines": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", - "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=" - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "optional": true, - "requires": { - "source-map": "0.5.7", - "uglify-to-browserify": "1.0.2", - "yargs": "3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "optional": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "optional": true, - "requires": { - "camelcase": "1.2.1", - "cliui": "2.1.0", - "decamelize": "1.2.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", - "requires": { - "spdx-correct": "3.0.0", - "spdx-expression-parse": "3.0.0" - } - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "requires": { - "isexe": "2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "optional": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", - "requires": { - "camelcase": "4.1.0", - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "os-locale": "2.1.0", - "read-pkg-up": "2.0.0", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "2.1.1", - "which-module": "2.0.0", - "y18n": "3.2.1", - "yargs-parser": "7.0.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - } - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "requires": { - "graceful-fs": "4.1.11", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "requires": { - "error-ex": "1.3.1" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "2.3.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - } - } - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", - "requires": { - "camelcase": "4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - } - } - } - } - }, - "update-notifier": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.3.0.tgz", - "integrity": "sha1-TognpruRUUCrCTVZ1wFOPruDdFE=", - "requires": { - "boxen": "1.3.0", - "chalk": "2.3.2", - "configstore": "3.1.1", - "import-lazy": "2.1.0", - "is-installed-globally": "0.1.0", - "is-npm": "1.0.0", - "latest-version": "3.1.0", - "semver-diff": "2.1.0", - "xdg-basedir": "3.0.0" - }, - "dependencies": { - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "requires": { - "string-width": "2.1.1" - } - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "1.9.1" - } - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "requires": { - "ansi-align": "2.0.0", - "camelcase": "4.1.0", - "chalk": "2.3.2", - "cli-boxes": "1.0.0", - "string-width": "2.1.1", - "term-size": "1.2.0", - "widest-line": "2.0.0" - } - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=" - }, - "chalk": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", - "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", - "requires": { - "ansi-styles": "3.2.1", - "escape-string-regexp": "1.0.5", - "supports-color": "5.3.0" - } - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=" - }, - "color-convert": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", - "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "configstore": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.1.tgz", - "integrity": "sha512-5oNkD/L++l0O6xGXxb1EWS7SivtjfGQlRyxJsYgE0Z495/L81e2h4/d3r969hoPXuFItzNOKMtsXgYG4c7dYvw==", - "requires": { - "dot-prop": "4.2.0", - "graceful-fs": "4.1.11", - "make-dir": "1.2.0", - "unique-string": "1.0.0", - "write-file-atomic": "2.3.0", - "xdg-basedir": "3.0.0" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "requires": { - "capture-stack-trace": "1.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "requires": { - "lru-cache": "4.1.1", - "shebang-command": "1.2.0", - "which": "1.3.0" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=" - }, - "deep-extend": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.4.2.tgz", - "integrity": "sha1-SLaZwn4zS/ifEIkr5DL25MfTSn8=" - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "requires": { - "is-obj": "1.0.1" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "requires": { - "cross-spawn": "5.1.0", - "get-stream": "3.0.0", - "is-stream": "1.1.0", - "npm-run-path": "2.0.2", - "p-finally": "1.0.0", - "signal-exit": "3.0.2", - "strip-eof": "1.0.0" - } - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "requires": { - "ini": "1.3.5" - } - }, - "got": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "requires": { - "create-error-class": "3.0.2", - "duplexer3": "0.1.4", - "get-stream": "3.0.0", - "is-redirect": "1.0.0", - "is-retry-allowed": "1.1.0", - "is-stream": "1.1.0", - "lowercase-keys": "1.0.0", - "safe-buffer": "5.1.1", - "timed-out": "4.0.1", - "unzip-response": "2.0.1", - "url-parse-lax": "1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "requires": { - "global-dirs": "0.1.1", - "is-path-inside": "1.0.1" - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=" - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "requires": { - "path-is-inside": "1.0.2" - } - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=" - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "requires": { - "package-json": "4.0.1" - } - }, - "lowercase-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", - "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=" - }, - "lru-cache": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", - "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", - "requires": { - "pseudomap": "1.0.2", - "yallist": "2.1.2" - } - }, - "make-dir": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.2.0.tgz", - "integrity": "sha512-aNUAa4UMg/UougV25bbrU4ZaaKNjJ/3/xnvg/twpmKROPdKZPZ9wGgI0opdZzO8q/zUFawoUuixuOv33eZ61Iw==", - "requires": { - "pify": "3.0.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "requires": { - "path-key": "2.0.1" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "requires": { - "got": "6.7.1", - "registry-auth-token": "3.3.2", - "registry-url": "3.1.0", - "semver": "5.5.0" - } - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=" - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "rc": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.5.tgz", - "integrity": "sha1-J1zWh/bjs2zHVrqibf7oCnkDAf0=", - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.5", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "requires": { - "rc": "1.2.5", - "safe-buffer": "5.1.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "requires": { - "rc": "1.2.5" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "requires": { - "semver": "5.5.0" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "requires": { - "shebang-regex": "1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "requires": { - "is-fullwidth-code-point": "2.0.0", - "strip-ansi": "4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "requires": { - "ansi-regex": "3.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", - "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", - "requires": { - "has-flag": "3.0.0" - } - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "requires": { - "execa": "0.7.0" - } - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "requires": { - "crypto-random-string": "1.0.0" - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=" - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "requires": { - "prepend-http": "1.0.4" - } - }, - "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", - "requires": { - "isexe": "2.0.0" - } - }, - "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", - "requires": { - "string-width": "2.1.1" - } - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "requires": { - "graceful-fs": "4.1.11", - "imurmurhash": "0.1.4", - "signal-exit": "3.0.2" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - } - } - } - } -} diff --git a/packages/core/package.json b/packages/core/package.json index d162def7f..866ea172d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,36 +1,42 @@ { "name": "@pattern-lab/core", "description": "Create atomic design systems with Pattern Lab. This is the core API and orchestrator of the ecosystem.", - "version": "3.0.0-alpha.11", + "version": "5.9.3", "main": "./src/index.js", "dependencies": { - "@pattern-lab/engine-mustache": "^2.0.0-alpha.5", - "@pattern-lab/live-server": "^1.3.3-alpha.2", - "chalk": "^1.1.3", - "chokidar": "^1.7.0", - "dive": "^0.5.0", - "fs-extra": "^5.0.0", - "glob": "^7.0.0", - "graphlib": "^2.1.1", - "js-beautify": "^1.6.3", - "js-yaml": "^3.6.1", - "lodash": "~4.17.5", - "markdown-it": "^6.0.1", - "node-fetch": "^1.6.0", - "recursive-copy": "^2.0.8", - "update-notifier": "^2.2.0" + "@pattern-lab/engine-mustache": "^5.0.0", + "@pattern-lab/live-server": "^5.9.3", + "chalk": "1.1.3", + "chokidar": "1.7.0", + "dive": "0.5.0", + "fs-extra": "5.0.0", + "glob": "7.0.0", + "graphlib": "2.1.1", + "js-beautify": "1.6.3", + "js-yaml": "3.13.1", + "lodash": "4.17.15", + "markdown-it": "6.0.1", + "node-fetch": "1.6.0", + "recursive-copy": "2.0.8", + "update-notifier": "2.2.0" }, "devDependencies": { - "eslint": "4.18.2", - "eslint-config-prettier": "2.9.0", - "eslint-plugin-prettier": "2.6.0", - "husky": "^0.14.3", - "jsdoc-to-markdown": "^3.0.0", - "prettier": "1.11.1", - "pretty-quick": "^1.2.2", + "@babel/core": "^7.5.5", + "@babel/plugin-proposal-decorators": "^7.4.4", + "@babel/plugin-syntax-jsx": "^7.2.0", + "babel-eslint": "^10.0.2", + "eslint": "^6.1.0", + "eslint-config-airbnb-base": "^14.0.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-prettier": "^3.1.0", + "husky": "0.14.3", + "jsdoc-to-markdown": "5.0.1", + "prettier": "^1.14.3", + "pretty-quick": "^1.11.1", "rewire": "2.5.2", - "standard-version": "^4.3.0", - "tap": "11.1.1" + "standard-version": "4.3.0", + "tap": "14.6.4" }, "keywords": [ "Pattern Lab", @@ -59,13 +65,13 @@ "license": "MIT", "scripts": { "docs": "node ./scripts/docs.js", - "lint": "eslint src/**/*.js", + "lint": "eslint -c ../../.eslintrc.js src/**/*.js", "pretest": "npm run lint", "release": "standard-version", "test": "tap test/*_tests.js --reporter spec --coverage" }, "engines": { - "node": ">=6.0" + "node": ">=10.0" }, "publishConfig": { "access": "public" diff --git a/packages/core/patternlab-config.json b/packages/core/patternlab-config.json index 70b86544f..39eed54fd 100644 --- a/packages/core/patternlab-config.json +++ b/packages/core/patternlab-config.json @@ -32,41 +32,49 @@ "markupOnly": ".markup-only" }, "paths" : { - "source" : { + "source": { "root": "./source/", - "patterns" : "./source/_patterns/", - "data" : "./source/_data/", + "patterns": "./source/_patterns/", + "data": "./source/_data/", "meta": "./source/_meta/", - "annotations" : "./source/_annotations/", - "styleguide" : "./node_modules/@pattern-lab/uikit-workshop/dist/", - "patternlabFiles" : { - "general-header": "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-header.mustache", - "general-footer": "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-footer.mustache", - "patternSection": "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSection.mustache", - "patternSectionSubtype": "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSectionSubtype.mustache", - "viewall": "./node_modules/@pattern-lab/uikit-workshop/views/viewall.mustache" + "annotations": "./source/_annotations/", + "styleguide": "dist/", + "patternlabFiles": { + "general-header": + "views/partials/general-header.mustache", + "general-footer": + "views/partials/general-footer.mustache", + "patternSection": + "views/partials/patternSection.mustache", + "patternSectionSubtype": + "views/partials/patternSectionSubtype.mustache", + "viewall": + "views/viewall.mustache" }, - "js" : "./source/js", - "images" : "./source/images", - "fonts" : "./source/fonts", - "css" : "./source/css/" + "js": "./source/js", + "images": "./source/images", + "fonts": "./source/fonts", + "css": "./source/css" }, - "public" : { - "root" : "./public/", - "patterns" : "./public/patterns/", - "data" : "./public/styleguide/data/", - "annotations" : "./public/annotations/", - "styleguide" : "./public/styleguide/", - "js" : "./public/js", - "images" : "./public/images", - "fonts" : "./public/fonts", - "css" : "./public/css" + "public": { + "root": "public/", + "patterns": "public/patterns/", + "data": "public/styleguide/data/", + "annotations": "public/annotations/", + "styleguide": "public/styleguide/", + "js": "public/js", + "images": "public/images", + "fonts": "public/fonts", + "css": "public/css" } }, "patternExtension": "mustache", "patternStateCascade": ["inprogress", "inreview", "complete"], - "patternExportDirectory": "./pattern_exports/", + "patternExportAll": false, + "patternExportDirectory": "pattern_exports", "patternExportPatternPartials": [], + "patternExportPreserveDirectoryStructure": true, + "patternExportRaw": false, "serverOptions": { "wait": 1000 }, @@ -77,5 +85,14 @@ "color": "dark", "density": "compact", "layout": "horizontal" - } + }, + "uikits": [ + { + "name": "uikit-workshop", + "outputDir": "", + "enabled": true, + "excludedPatternStates": [], + "excludedTags": [] + } + ] } diff --git a/packages/core/scripts/api.handlebars b/packages/core/scripts/api.handlebars index 599102f62..8959ef5cf 100644 --- a/packages/core/scripts/api.handlebars +++ b/packages/core/scripts/api.handlebars @@ -10,50 +10,10 @@ ``` javascript const config = require('./patternlab-config.json'); -const patternlab = require('patternlab-node')(config); +const patternlab = require('@pattern-lab/core')(config); ``` -## Events - -Pattern Lab emits numerous [events](./events.md). - -## Functions - -Many of these functions are exposed to users within [Editions](https://github.com/pattern-lab/patternlab-node#editions), but [direct consumption](https://github.com/pattern-lab/patternlab-node#direct-consumption) is also encouraged. - -{{#orphans ~}} - {{>heading-indent}}{{>sig-name}} - - {{>deprecated~}} - {{>description~}} - {{>summary~}} - {{>augments~}} - {{>implements~}} - {{>mixes~}} - {{>default~}} - {{>chainable~}} - {{>overrides~}} - {{>returns~}} - {{>category~}} - {{>throws~}} - {{>fires~}} - {{>this~}} - {{>access~}} - {{>readOnly~}} - {{>requires~}} - {{>customTags~}} - {{>see~}} - {{>since~}} - {{>version~}} - {{>authors~}} - {{>license~}} - {{>copyright~}} - {{>todo~}} - {{>params~}} - {{>properties~}} - {{>examples~}} - -{{/orphans~}} +{{>main}} * * * diff --git a/packages/core/scripts/events.handlebars b/packages/core/scripts/events.handlebars index ca564fd52..667e8c9bf 100644 --- a/packages/core/scripts/events.handlebars +++ b/packages/core/scripts/events.handlebars @@ -5,7 +5,7 @@ Pattern Lab emits numerous events during the [build](../docs/) process. Some uses of events: * Core uses `patternlab-pattern-change` events when watching for changes in order to trigger another build -* Plugins such as [plugin-node-tab](https://github.com/pattern-lab/plugin-node-tab) can use an event like `patternlab-pattern-write-end` to define additional code tabs to the pattern viewer / modal +* Plugins such as [plugin-tab](https://github.com/pattern-lab/patternlab-node/tree/master/packages/plugin-tab) can use an event like `patternlab-pattern-write-end` to define additional code tabs to the pattern viewer / modal Learn more about [Creating Plugins](https://github.com/pattern-lab/patternlab-node/wiki/Creating-Plugins). diff --git a/packages/core/src/index.js b/packages/core/src/index.js index bd78281af..1c575c3ab 100644 --- a/packages/core/src/index.js +++ b/packages/core/src/index.js @@ -1,44 +1,33 @@ -/* - * patternlab-node https://github.com/pattern-lab/patternlab-node - * - * Brian Muenzenmeyer, Geoff Pursell, Raphael Okon, tburny and the web community. - * Licensed under the MIT license. - * - * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. +/** + * Build thoughtful, pattern-driven user interfaces using atomic design principles. + * Many of these functions are exposed to users within {@link https://github.com/pattern-lab/patternlab-node#editions|Editions}, but {@link https://github.com/pattern-lab/patternlab-node#direct-consumption|direct consumption} is also encouraged. * + * @namespace patternlab + * @see {@link patternlab.io} for more documentation. + * @see {@link https://github.com/pattern-lab/patternlab-node} for code, issues, and releases + * @license MIT */ 'use strict'; -const packageInfo = require('../package.json'); - -const { concat } = require('lodash'); -const copy = require('recursive-copy'); const path = require('path'); + const updateNotifier = require('update-notifier'); -const help = require('./lib/help'); +const packageInfo = require('../package.json'); const events = require('./lib/events'); -const logger = require('./lib/log'); -const PatternGraph = require('./lib/pattern_graph').PatternGraph; -const CompileState = require('./lib/object_factory').CompileState; const pe = require('./lib/pattern_exporter'); -const lh = require('./lib/lineage_hunter'); -const markModifiedPatterns = require('./lib/markModifiedPatterns'); -const parseAllLinks = require('./lib/parseAllLinks'); -const processMetaPattern = require('./lib/processMetaPattern'); -const render = require('./lib/render'); -const Pattern = require('./lib/object_factory').Pattern; +const pm = require('./lib/plugin_manager'); const defaultConfig = require('../patternlab-config.json'); +let buildPatterns = require('./lib/buildPatterns'); // eslint-disable-line +let logger = require('./lib/log'); // eslint-disable-line let fs = require('fs-extra'); // eslint-disable-line let ui_builder = require('./lib/ui_builder'); // eslint-disable-line let copier = require('./lib/copier'); // eslint-disable-line let pattern_exporter = new pe(); // eslint-disable-line -let serve = require('./lib/serve'); // eslint-disable-line - -const lineage_hunter = new lh(); +let serverModule = require('./lib/server'); // eslint-disable-line //bootstrap update notifier updateNotifier({ @@ -47,257 +36,95 @@ updateNotifier({ }).notify(); /** - * Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation. + * Static method that returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation. * + * @memberof patternlab + * @name getDefaultConfig + * @static * @return {object} Returns the object representation of the `patternlab-config.json` */ const getDefaultConfig = function() { return defaultConfig; }; -const patternlab_module = function(config) { - const PatternLab = require('./lib/patternlab'); - const patternlab = new PatternLab(config); - const paths = patternlab.config.paths; - - /** - * If a graph was serialized and then {@code deletePatternDir == true}, there is a mismatch in the - * pattern metadata and not all patterns might be recompiled. - * For that reason an empty graph is returned in this case, so every pattern will be flagged as - * "needs recompile". Otherwise the pattern graph is loaded from the meta data. - * - * @param patternlab - * @param {boolean} deletePatternDir When {@code true}, an empty graph is returned - * @return {PatternGraph} - */ - function loadPatternGraph(deletePatternDir) { - // Sanity check to prevent problems when code is refactored - if (deletePatternDir) { - return PatternGraph.empty(); - } - return PatternGraph.loadFromFile(patternlab); - } - - function cleanBuildDirectory(incrementalBuildsEnabled) { - if (incrementalBuildsEnabled) { - logger.info('Incremental builds enabled.'); - return Promise.resolve(); - } else { - // needs to be done BEFORE processing patterns - return fs - .emptyDir(paths.public.patterns) - .then(() => { - return Promise.resolve(); - }) - .catch(reason => { - logger.error(reason); - }); - } - } - - function buildPatterns(deletePatternDir, additionalData) { - patternlab.events.emit(events.PATTERNLAB_BUILD_PATTERN_START, patternlab); - - // - // CHECK INCREMENTAL BUILD GRAPH - // - const graph = (patternlab.graph = loadPatternGraph(deletePatternDir)); - const graphNeedsUpgrade = !PatternGraph.checkVersion(graph); - if (graphNeedsUpgrade) { - logger.info( - 'Due to an upgrade, a complete rebuild is required and the public/patterns directory was deleted. ' + - 'Incremental build is available again on the next successful run.' - ); - - // Ensure that the freshly built graph has the latest version again. - patternlab.graph.upgradeVersion(); - } - - // Flags - patternlab.incrementalBuildsEnabled = !( - deletePatternDir || graphNeedsUpgrade - ); - - // - // CLEAN BUILD DIRECTORY, maybe - // - return cleanBuildDirectory(patternlab.incrementalBuildsEnabled).then(() => { - patternlab.buildGlobalData(additionalData); - - return patternlab - .processAllPatternsIterative(paths.source.patterns) - .then(() => { - patternlab.events.emit( - events.PATTERNLAB_PATTERN_ITERATION_END, - patternlab - ); - - //now that all the main patterns are known, look for any links that might be within data and expand them - //we need to do this before expanding patterns & partials into extendedTemplates, otherwise we could lose the data -> partial reference - parseAllLinks(patternlab); - - //dive again to recursively include partials, filling out the - //extendedTemplate property of the patternlab.patterns elements - - return patternlab - .processAllPatternsRecursive(paths.source.patterns) - .then(() => { - //take the user defined head and foot and process any data and patterns that apply - const headPatternPromise = processMetaPattern( - `_00-head.${patternlab.config.patternExtension}`, - 'userHead', - patternlab - ); - const footPatternPromise = processMetaPattern( - `_01-foot.${patternlab.config.patternExtension}`, - 'userFoot', - patternlab - ); - - return Promise.all([headPatternPromise, footPatternPromise]) - .then(() => { - //cascade any patternStates - lineage_hunter.cascade_pattern_states(patternlab); - - //set the pattern-specific header by compiling the general-header with data, and then adding it to the meta header - return render( - Pattern.createEmpty({ - extendedTemplate: patternlab.header, - }), - { - cacheBuster: patternlab.cacheBuster, - } - ) - .then(results => { - patternlab.data.patternLabHead = results; - - // If deletePatternDir == true or graph needs to be updated - // rebuild all patterns - let patternsToBuild = null; - - // If deletePatternDir == true or graph needs to be updated - // rebuild all patterns - patternsToBuild = null; - - if (patternlab.incrementalBuildsEnabled) { - // When the graph was loaded from file, some patterns might have been moved/deleted between runs - // so the graph data become out of sync - patternlab.graph.sync().forEach(n => { - logger.info('[Deleted/Moved] ' + n); - }); - - // TODO Find created or deleted files - const now = new Date().getTime(); - markModifiedPatterns(now, patternlab); - patternsToBuild = patternlab.graph.compileOrder(); - } else { - // build all patterns, mark all to be rebuilt - patternsToBuild = patternlab.patterns; - for (const p of patternsToBuild) { - p.compileState = CompileState.NEEDS_REBUILD; - } - } - //render all patterns last, so lineageR works - const allPatternsPromise = patternsToBuild.map(pattern => - patternlab.renderSinglePattern(pattern) - ); - //copy non-pattern files like JavaScript - const allJS = patternsToBuild.map(pattern => { - const { name, patternPartial, subdir } = pattern; - const { - source: { patterns: sourceDir }, - public: { patterns: publicDir }, - } = patternlab.config.paths; - const src = path.join(sourceDir, subdir); - const dest = path.join(publicDir, name); - return copy(src, dest, { - overwrite: true, - filter: ['*.js'], - rename: () => { - return `${patternPartial}.js`; - }, - }).on(copy.events.COPY_FILE_COMPLETE, () => { - logger.debug( - `Copied JavaScript files from ${src} to ${dest}` - ); - }); - }); - return Promise.all(concat(allPatternsPromise, allJS)) - .then(() => { - // Saves the pattern graph when all files have been compiled - PatternGraph.storeToFile(patternlab); - if (patternlab.config.exportToGraphViz) { - PatternGraph.exportToDot( - patternlab, - 'dependencyGraph.dot' - ); - logger.info( - `Exported pattern graph to ${path.join( - config.paths.public.root, - 'dependencyGraph.dot' - )}` - ); - } +/** + * Static method that returns current version + * + * @memberof patternlab + * @name getVersion + * @static + * @returns {string} current @pattern-lab/core version as defined in `package.json` + */ +const getVersion = function() { + return packageInfo.version; +}; - //export patterns if necessary - pattern_exporter.export_patterns(patternlab); - }) - .catch(reason => { - console.log(reason); - logger.error('Error rendering patterns'); - }); - }) - .catch(reason => { - console.log(reason); - logger.error('Error rendering pattern lab header'); - }); - }) - .catch(reason => { - console.log(reason); - logger.error('Error processing meta patterns'); - }); - }) - .catch(reason => { - console.log(reason); - logger.error('Error processing patterns recursively'); - }); - }) - .catch(reason => { - console.log(reason); - logger.error('Error in buildPatterns()'); - }); - }); - } +const patternlab_module = function(config) { + const PatternLabClass = require('./lib/patternlab'); + const patternlab = new PatternLabClass(config); + const server = serverModule(patternlab); - return { + const _api = { /** - * Logs current version to standard output + * Returns current version * - * @returns {void} current patternlab-node version as defined in `package.json` + * @memberof patternlab + * @name version + * @instance + * @returns {string} current patternlab-node version as defined in `package.json`, as string */ version: function() { - return patternlab.logVersion(); + return patternlab.getVersion(); }, /** - * Returns current version + * Returns the current pattern lab configuration being used * - * @returns {string} current patternlab-node version as defined in `package.json`, as string + * @memberof patternlab + * @name getConfig + * @instance + * @returns {object} the current patternlab-node config (defaults + customizations) */ - v: function() { - return patternlab.getVersion(); + getConfig() { + return config; + }, + + /** + * Returns if Pattern Lab is busy compiling or not + * + * @memberof patternlab + * @name isBusy + * @instance + * @returns {boolean} if pattern lab is currently busy compiling + */ + isBusy: function() { + return patternlab.isBusy; }, /** * Builds patterns, copies assets, and constructs user interface * + * @memberof patternlab + * @name build + * @instance * @param {object} options an object used to control build behavior - * @param {bool} options.cleanPublic whether or not to delete the configured output location (usually `public/`) before build - * @param {object} options.data additional data to be merged with global data prior to build - * @param {bool} options.watch whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild + * @param {bool} [options.cleanPublic=true] whether or not to delete the configured output location (usually `public/`) before build + * @param {object} [options.data={}] additional data to be merged with global data prior to build + * @param {bool} [options.watch=true] whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild + * @emits PATTERNLAB_BUILD_START + * @emits PATTERNLAB_BUILD_END + * @see {@link ./events.md|all events} * @returns {Promise} a promise fulfilled when build is complete */ - build: function(options) { + build: async function(options) { + // process.on('unhandledRejection', (reason, p) => { + // console.log('Unhandled Rejection at: Promise', p, 'reason:', reason); + // // application specific logging, throwing an error, or other logic here + + // console.log(reason.stack); + // debugger; + // }); + if (patternlab && patternlab.isBusy) { logger.info( 'Pattern Lab is busy building a previous run - returning early.' @@ -305,28 +132,49 @@ const patternlab_module = function(config) { return Promise.resolve(); } patternlab.isBusy = true; - return buildPatterns(options.cleanPublic, options.data).then(() => { + + return await buildPatterns( + options.cleanPublic, + patternlab, + options.data + ).then(() => { return new ui_builder().buildFrontend(patternlab).then(() => { copier() .copyAndWatch(patternlab.config.paths, patternlab, options) .then(() => { - this.events.once(events.PATTERNLAB_PATTERN_CHANGE, () => { - if (!patternlab.isBusy) { - return this.build(options); - } - return Promise.resolve(); - }); - - this.events.once(events.PATTERNLAB_GLOBAL_CHANGE, () => { - if (!patternlab.isBusy) { - return this.build( - Object.assign({}, options, { cleanPublic: true }) // rebuild everything - ); - } - return Promise.resolve(); - }); - patternlab.isBusy = false; + // only wire up this listener and the one inside serve.js + // figure out how to detect if serve was called. we should not assume it was + if ( + patternlab.serverReady //check for server presence + ? this.events.listenerCount( + events.PATTERNLAB_PATTERN_CHANGE + ) === 1 //if the server is started, it has already setup one listener + : !this.events.listenerCount(events.PATTERNLAB_PATTERN_CHANGE) // else, check for the presnce of none + ) { + this.events.on(events.PATTERNLAB_PATTERN_CHANGE, () => { + if (!patternlab.isBusy) { + return this.build(options).then(() => { + patternlab.isBusy = false; + }); + } + return Promise.resolve(); + }); + } + + if (!this.events.listenerCount(events.PATTERNLAB_GLOBAL_CHANGE)) { + this.events.on(events.PATTERNLAB_GLOBAL_CHANGE, () => { + if (!patternlab.isBusy) { + return this.build( + Object.assign({}, options, { cleanPublic: true }) // rebuild everything + ); + } + return Promise.resolve(); + }); + } + }) + .then(() => { + this.events.emit(events.PATTERNLAB_BUILD_END, patternlab); }); }); }); @@ -335,6 +183,9 @@ const patternlab_module = function(config) { /** * Returns the standardized default config used to run Pattern Lab. This method can be called statically or after instantiation. * + * @memberof patternlab + * @name getDefaultConfig + * @instance * @return {object} Returns the object representation of the `patternlab-config.json` */ getDefaultConfig: function() { @@ -344,34 +195,38 @@ const patternlab_module = function(config) { /** * Returns all file extensions supported by installed PatternEngines * + * @memberof patternlab + * @name getSupportedTemplateExtensions + * @instance * @returns {Array} all supported file extensions */ getSupportedTemplateExtensions: function() { return patternlab.getSupportedTemplateExtensions(); }, - /** - * Logs usage to standard output - * - * @returns {void} pattern lab API usage, as console output - */ - help: function() { - logger.info(help(patternlab.package.version)); - }, - /** * Installs plugin already available via `node_modules/` * + * @memberof patternlab + * @name installplugin + * @instance * @param {string} pluginName name of plugin * @returns {void} */ installplugin: function(pluginName) { - patternlab.installPlugin(pluginName); + //get the config + const configPath = path.resolve(process.cwd(), 'patternlab-config.json'); + const plugin_manager = new pm(); + + plugin_manager.install_plugin(pluginName); }, /** * Fetches starterkit repositories from pattern-lab github org that contain 'starterkit' in their name * + * @memberof patternlab + * @name liststarterkits + * @instance * @returns {Promise} Returns an Array<{name,url}> for the starterkit repos */ liststarterkits: function() { @@ -381,6 +236,9 @@ const patternlab_module = function(config) { /** * Loads starterkit already available via `node_modules/` * + * @memberof patternlab + * @name loadstarterkit + * @instance * @param {string} starterkitName name of starterkit * @param {boolean} clean whether or not to delete contents of source/ before load * @returns {void} @@ -392,12 +250,15 @@ const patternlab_module = function(config) { /** * Builds patterns only, leaving existing user interface files intact * - * @param {object} options an object used to control build behavior - * @param {bool} options.cleanPublic whether or not to delete the configured output location (usually `public/`) before build - * @param {object} options.data additional data to be merged with global data prior to build + * @memberof patternlab + * @name patternsonly + * @instance + * @param {bool} [options.cleanPublic=true] whether or not to delete the configured output location (usually `public/`) before build + * @param {object} [options.data={}] additional data to be merged with global data prior to build + * @param {bool} [options.watch=true] whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild * @returns {Promise} a promise fulfilled when build is complete */ - patternsonly: function(options) { + patternsonly: async function(options) { if (patternlab && patternlab.isBusy) { logger.info( 'Pattern Lab is busy building a previous run - returning early.' @@ -405,32 +266,72 @@ const patternlab_module = function(config) { return Promise.resolve(); } patternlab.isBusy = true; - return buildPatterns(options.cleanPublic, options.data).then(() => { + return await buildPatterns( + options.cleanPublic, + patternlab, + options.data + ).then(() => { patternlab.isBusy = false; }); }, /** - * Build patterns, copies assets, and constructs user interface. Watches configured `source/` directories, and serves all output locally + * Server module * - * @param {object} options an object used to control build behavior - * @param {bool} options.cleanPublic whether or not to delete the configured output location (usually `public/`) before build - * @param {object} options.data additional data to be merged with global data prior to build - * @param {bool} options.watch **ALWAYS OVERRIDDEN to `true`** whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild - * @returns {Promise} a promise fulfilled when build is complete + * @memberof patternlab + * @type {object} */ - serve: function(options) { - options.watch = true; - return this.build(options).then(function() { - serve(patternlab); - return Promise.resolve(); - }); + server: { + /** + * Build patterns, copies assets, and constructs user interface. Watches configured `source/` directories, and serves all output locally + * + * @method serve + * @memberof patternlab.server + * @param {object} options an object used to control build behavior + * @param {bool} [options.cleanPublic=true] whether or not to delete the configured output location (usually `public/`) before build + * @param {object} [options.data={}] additional data to be merged with global data prior to build + * @param {bool} [options.watch=true] whether or not Pattern Lab should watch configured `source/` directories for changes to rebuild + * @returns {Promise} a promise fulfilled when build is complete + */ + serve: options => { + return _api + .build(options) + .then(() => server.serve()) + .catch(e => + logger.error(`error inside core index.js server serve: ${e}`) + ); + }, + /** + * Reloads any active live-server instances + * + * @method reload + * @memberof patternlab.server + * @returns {Promise} a promise fulfilled when operation is complete + */ + reload: server.reload, + /** + * Reloads CSS on any active live-server instances + * + * @method refreshCSS + * @memberof patternlab.server + * @returns {Promise} a promise fulfilled when operation is complete + */ + refreshCSS: server.refreshCSS, }, + /** + * @memberof patternlab + * @type {EventEmitter} + * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter} + * @see {@link ./events.md|All Pattern Lab events} + */ events: patternlab.events, }; + + return _api; }; patternlab_module.getDefaultConfig = getDefaultConfig; +patternlab_module.getVersion = getVersion; module.exports = patternlab_module; diff --git a/packages/core/src/lib/addPattern.js b/packages/core/src/lib/addPattern.js index 6cc5e0266..12c0c9429 100644 --- a/packages/core/src/lib/addPattern.js +++ b/packages/core/src/lib/addPattern.js @@ -1,7 +1,5 @@ 'use strict'; -const _ = require('lodash'); - const logger = require('./log'); module.exports = function(pattern, patternlab) { @@ -41,12 +39,7 @@ module.exports = function(pattern, patternlab) { patternlab.partials[pattern.patternPartial] = pattern.patternDesc; } - //patterns sorted by name so the patterntype and patternsubtype is adhered to for menu building - patternlab.patterns.splice( - _.sortedIndexBy(patternlab.patterns, pattern, 'name'), - 0, - pattern - ); + patternlab.patterns.push(pattern); patternlab.graph.add(pattern); } }; diff --git a/packages/core/src/lib/annotation_exporter.js b/packages/core/src/lib/annotation_exporter.js index 8fb22470d..7ed86da28 100644 --- a/packages/core/src/lib/annotation_exporter.js +++ b/packages/core/src/lib/annotation_exporter.js @@ -23,9 +23,7 @@ const annotations_exporter = function(pl) { ); } catch (ex) { logger.debug( - `annotations.js file missing from ${ - paths.source.annotations - }. This may be expected if you do not use annotations or are using markdown.` + `annotations.js file missing from ${paths.source.annotations}. This may be expected if you do not use annotations or are using markdown.` ); return []; } @@ -39,9 +37,7 @@ const annotations_exporter = function(pl) { return oldAnnotationsJSON.comments; } catch (ex) { logger.error( - `There was an error parsing JSON for ${ - paths.source.annotations - }annotations.js` + `There was an error parsing JSON for ${paths.source.annotations}annotations.js` ); return []; } diff --git a/packages/core/src/lib/buildFooter.js b/packages/core/src/lib/buildFooter.js index 888b36634..5a3eb6217 100644 --- a/packages/core/src/lib/buildFooter.js +++ b/packages/core/src/lib/buildFooter.js @@ -13,9 +13,9 @@ let render = require('./render'); //eslint-disable-line prefer-const * @param patternPartial - the partial key to build this for, either viewall-patternPartial or a viewall-patternType-all * @returns A promise which resolves with the HTML */ -module.exports = function(patternlab, patternPartial) { +module.exports = function(patternlab, patternPartial, uikit) { //first render the general footer - return render(Pattern.createEmpty({ extendedTemplate: patternlab.footer }), { + return render(Pattern.createEmpty({ extendedTemplate: uikit.footer }), { patternData: JSON.stringify({ patternPartial: patternPartial, }), diff --git a/packages/core/src/lib/buildPatterns.js b/packages/core/src/lib/buildPatterns.js new file mode 100644 index 000000000..c550a6880 --- /dev/null +++ b/packages/core/src/lib/buildPatterns.js @@ -0,0 +1,229 @@ +'use strict'; + +const { concat, map } = require('lodash'); +const copy = require('recursive-copy'); +const path = require('path'); + +const cleanBuildDirectory = require('./cleanBuildDirectory'); +const compose = require('./compose'); +const events = require('./events'); +const loadPatternGraph = require('./loadPatternGraph'); +const logger = require('./log'); +const PatternGraph = require('./pattern_graph').PatternGraph; +const CompileState = require('./object_factory').CompileState; +const processMetaPattern = require('./processMetaPattern'); +const pe = require('./pattern_exporter'); +const lh = require('./lineage_hunter'); +const pm = require('./plugin_manager'); +const pluginMananger = new pm(); +const markModifiedPatterns = require('./markModifiedPatterns'); +const parseAllLinks = require('./parseAllLinks'); +const render = require('./render'); +const Pattern = require('./object_factory').Pattern; + +let fs = require('fs-extra'); // eslint-disable-line +let pattern_exporter = new pe(); // eslint-disable-line + +const lineage_hunter = new lh(); + +module.exports = async (deletePatternDir, patternlab, additionalData) => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_BUILD_START, + patternlab + ); + + const paths = patternlab.config.paths; + + // + // CHECK INCREMENTAL BUILD GRAPH + // + const graph = (patternlab.graph = loadPatternGraph( + patternlab, + patternlab.config.cleanPublic + )); + const graphNeedsUpgrade = !PatternGraph.checkVersion(graph); + if (graphNeedsUpgrade) { + logger.info( + 'Due to an upgrade, a complete rebuild is required and the public/patterns directory was deleted. ' + + 'Incremental build is available again on the next successful run.' + ); + + // Ensure that the freshly built graph has the latest version again. + patternlab.graph.upgradeVersion(); + } + + // Flags + patternlab.incrementalBuildsEnabled = !( + patternlab.config.cleanPublic || graphNeedsUpgrade + ); + + // + // CLEAN BUILD DIRECTORY, maybe + // + return cleanBuildDirectory( + patternlab.incrementalBuildsEnabled, + patternlab + ).then(() => { + patternlab.buildGlobalData(additionalData); + + return patternlab + .processAllPatternsIterative(paths.source.patterns) + .then(async () => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_PATTERN_ITERATION_END, + patternlab + ); + + //now that all the main patterns are known, look for any links that might be within data and expand them + //we need to do this before expanding patterns & partials into extendedTemplates, otherwise we could lose the data -> partial reference + parseAllLinks(patternlab); + + //dive again to recursively include partials, filling out the + //extendedTemplate property of the patternlab.patterns elements + + return patternlab + .processAllPatternsRecursive(paths.source.patterns) + .then(() => { + //take the user defined head and foot and process any data and patterns that apply + + //todo this need to be made aware of multiple ui kits + //perhaps we can check for a convention like [uikitname]_00-head.mustache, and if found, add them to patternlab.uikits[uikitname].userFoot + //then, if present, use those during compose() + const headPatternPromise = processMetaPattern( + `_00-head.${patternlab.config.patternExtension}`, + 'userHead', + patternlab + ); + const footPatternPromise = processMetaPattern( + `_01-foot.${patternlab.config.patternExtension}`, + 'userFoot', + patternlab + ); + + return Promise.all([headPatternPromise, footPatternPromise]) + .then(() => { + //cascade any patternStates + lineage_hunter.cascade_pattern_states(patternlab); + + //set the pattern-specific header by compiling the general-header with data, and then adding it to the meta header + return render( + Pattern.createEmpty({ + // todo should this be uikit.header? + extendedTemplate: patternlab.header, + }), + { + cacheBuster: patternlab.cacheBuster, + } + ) + .then(results => { + patternlab.data.patternLabHead = results; + + // If deletePatternDir == true or graph needs to be updated + // rebuild all patterns + let patternsToBuild = null; + + // If deletePatternDir == true or graph needs to be updated + // rebuild all patterns + patternsToBuild = null; + + if (patternlab.incrementalBuildsEnabled) { + // When the graph was loaded from file, some patterns might have been moved/deleted between runs + // so the graph data become out of sync + patternlab.graph.sync().forEach(n => { + logger.info('[Deleted/Moved] ' + n); + }); + + // TODO Find created or deleted files + const now = new Date().getTime(); + markModifiedPatterns(now, patternlab); + patternsToBuild = patternlab.graph.compileOrder(); + } else { + // build all patterns, mark all to be rebuilt + patternsToBuild = patternlab.patterns; + for (const p of patternsToBuild) { + p.compileState = CompileState.NEEDS_REBUILD; + } + } + //render all patterns last, so lineageR works + const allPatternsPromise = patternsToBuild.map( + async pattern => + await compose( + pattern, + patternlab + ) + ); + //copy non-pattern files like JavaScript + const allJS = patternsToBuild.map(pattern => { + const { name, patternPartial, subdir } = pattern; + const { + source: { patterns: sourceDir }, + public: { patterns: publicDir }, + } = patternlab.config.paths; + const src = path.join(sourceDir, subdir); + const dest = path.join(publicDir, name); + return map(patternlab.uikits, uikit => { + return copy( + src, + path.resolve(process.cwd(), uikit.outputDir, dest), + { + overwrite: true, + filter: ['*.js'], + rename: () => { + return `${patternPartial}.js`; + }, + } + ).on(copy.events.COPY_FILE_COMPLETE, () => { + logger.debug( + `Copied JavaScript files from ${src} to ${dest}` + ); + }); + }); + }); + return Promise.all(concat(allPatternsPromise, allJS)) + .then(() => { + // Saves the pattern graph when all files have been compiled + PatternGraph.storeToFile(patternlab); + if (patternlab.config.exportToGraphViz) { + PatternGraph.exportToDot( + patternlab, + 'dependencyGraph.dot' + ); + logger.info( + `Exported pattern graph to ${path.join( + patternlab.config.paths.public.root, + 'dependencyGraph.dot' + )}` + ); + } + + //export patterns if necessary + pattern_exporter.export_patterns(patternlab); + }) + .catch(reason => { + console.log(reason); + logger.error('Error rendering patterns'); + }); + }) + .catch(reason => { + console.log(reason); + logger.error('Error rendering pattern lab header'); + }); + }) + .catch(reason => { + console.log(reason); + logger.error('Error processing meta patterns'); + }); + }) + .catch(reason => { + console.log(reason); + logger.error('Error processing patterns recursively'); + }); + }) + .catch(reason => { + console.log(reason); + logger.error('Error in buildPatterns()'); + }); + }); +}; diff --git a/packages/core/src/lib/changes_hunter.js b/packages/core/src/lib/changes_hunter.js index a2bcec0a3..038be8b41 100644 --- a/packages/core/src/lib/changes_hunter.js +++ b/packages/core/src/lib/changes_hunter.js @@ -1,4 +1,8 @@ 'use strict'; + +const path = require('path'); +const _ = require('lodash'); + const CompileState = require('./object_factory').CompileState; //this is mocked in unit tests @@ -36,25 +40,33 @@ ChangesHunter.prototype = { pattern.compileState = CompileState.NEEDS_REBUILD; } - try { - // renderedTemplatePath required to display a single element - // Markup only is required for "View All" pages. It will get loaded later on. - // If any of these is missing, mark pattern for recompile - [renderedTemplatePath, markupOnlyPath].forEach(renderedFile => - // Prevent error message if file does not exist - fs.accessSync(renderedFile, fs.F_OK) - ); - const outputLastModified = fs - .statSync(renderedTemplatePath) - .mtime.getTime(); - - if (pattern.lastModified && outputLastModified > pattern.lastModified) { - pattern.compileState = CompileState.CLEAN; + _.each(patternlab.uikits, uikit => { + try { + // renderedTemplatePath required to display a single element + // Markup only is required for "View All" pages. It will get loaded later on. + // If any of these is missing, mark pattern for recompile + [renderedTemplatePath, markupOnlyPath].forEach(renderedFile => { + // Prevent error message if file does not exist + fs.accessSync( + path.join(process.cwd(), uikit.outputDir, renderedFile), + fs.F_OK + ); + }); + + const outputLastModified = fs + .statSync( + path.join(process.cwd(), uikit.outputDir, renderedTemplatePath) + ) + .mtime.getTime(); + + if (pattern.lastModified && outputLastModified > pattern.lastModified) { + pattern.compileState = CompileState.CLEAN; + } + } catch (e) { + // Output does not exist yet, force recompile + pattern.compileState = CompileState.NEEDS_REBUILD; } - } catch (e) { - // Output does not exist yet, force recompile - pattern.compileState = CompileState.NEEDS_REBUILD; - } + }); const node = patternlab.graph.node(pattern); diff --git a/packages/core/src/lib/cleanBuildDirectory.js b/packages/core/src/lib/cleanBuildDirectory.js new file mode 100644 index 000000000..11d78c01e --- /dev/null +++ b/packages/core/src/lib/cleanBuildDirectory.js @@ -0,0 +1,27 @@ +'use strict'; + +const _ = require('lodash'); +const path = require('path'); + +const logger = require('./log'); + +let fs = require('fs-extra'); // eslint-disable-line + +module.exports = (incrementalBuildsEnabled, patternlab) => { + const paths = patternlab.config.paths; + + if (incrementalBuildsEnabled) { + logger.info('Incremental builds enabled.'); + return Promise.resolve(); + } else { + return Promise.all( + _.map(patternlab.uikits, uikit => { + return fs.emptyDir( + path.join(process.cwd(), uikit.outputDir, paths.public.patterns) + ); + }) + ).catch(reason => { + logger.error(reason); + }); + } +}; diff --git a/packages/core/src/lib/compose.js b/packages/core/src/lib/compose.js new file mode 100644 index 000000000..07c202ce7 --- /dev/null +++ b/packages/core/src/lib/compose.js @@ -0,0 +1,213 @@ +'use strict'; + +const _ = require('lodash'); + +const events = require('./events'); +const jsonCopy = require('./json_copy'); +const logger = require('./log'); +const parseLink = require('./parseLink'); +const render = require('./render'); +const uikitExcludePattern = require('./uikitExcludePattern'); +const pm = require('./plugin_manager'); +const pluginMananger = new pm(); + +const Pattern = require('./object_factory').Pattern; +const CompileState = require('./object_factory').CompileState; + +module.exports = async function(pattern, patternlab) { + // Pattern does not need to be built and recompiled more than once + if (!pattern.isPattern || pattern.compileState === CompileState.CLEAN) { + return Promise.resolve(false); + } + + // Allows serializing the compile state + patternlab.graph.node(pattern).compileState = pattern.compileState = + CompileState.BUILDING; + + //todo move this into lineage_hunter + pattern.patternLineages = pattern.lineage; + pattern.patternLineageExists = pattern.lineage.length > 0; + pattern.patternLineagesR = pattern.lineageR; + pattern.patternLineageRExists = pattern.lineageR.length > 0; + pattern.patternLineageEExists = + pattern.patternLineageExists || pattern.patternLineageRExists; + + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_PATTERN_BEFORE_DATA_MERGE, + patternlab, + pattern + ); + + return Promise.all( + _.map(patternlab.uikits, uikit => { + // exclude pattern from uikit rendering + if (uikitExcludePattern(pattern, uikit)) { + return Promise.resolve(); + } + + //render the pattern, but first consolidate any data we may have + let allData; + + let allListItems = _.merge({}, patternlab.listitems, pattern.listitems); + allListItems = parseLink( + patternlab, + allListItems, + 'listitems.json + any pattern listitems.json' + ); + + allData = _.merge({}, patternlab.data, pattern.jsonFileData); + allData = _.merge({}, allData, allListItems); + allData.cacheBuster = patternlab.cacheBuster; + allData.patternPartial = pattern.patternPartial; + + /////////////// + // HEADER + /////////////// + + //re-rendering the headHTML each time allows pattern-specific data to influence the head of the pattern + let headPromise; + if (patternlab.userHead) { + headPromise = render(patternlab.userHead, allData); + } else { + headPromise = render( + Pattern.createEmpty({ extendedTemplate: uikit.header }), + allData + ); + } + + /////////////// + // PATTERN + /////////////// + + //render the extendedTemplate with all data + const patternPartialPromise = render( + pattern, + allData, + patternlab.partials + ); + + /////////////// + // FOOTER + /////////////// + + // stringify this data for individual pattern rendering and use on the styleguide + // see if patternData really needs these other duped values + + // construct our extraOutput dump + const extraOutput = Object.assign( + {}, + pattern.extraOutput, + pattern.allMarkdown + ); + delete extraOutput.title; + delete extraOutput.state; + delete extraOutput.markdown; + + pattern.patternData = JSON.stringify({ + cssEnabled: false, + patternLineageExists: pattern.patternLineageExists, + patternLineages: pattern.patternLineages, + lineage: pattern.patternLineages, + patternLineageRExists: pattern.patternLineageRExists, + patternLineagesR: pattern.patternLineagesR, + lineageR: pattern.patternLineagesR, + patternLineageEExists: + pattern.patternLineageExists || pattern.patternLineageRExists, + patternDesc: pattern.patternDescExists ? pattern.patternDesc : '', + patternBreadcrumb: + pattern.patternGroup === pattern.patternSubGroup + ? { + patternType: pattern.patternGroup, + } + : { + patternType: pattern.patternGroup, + patternSubtype: pattern.patternSubGroup, + }, + patternExtension: pattern.fileExtension.substr(1), //remove the dot because styleguide asset default adds it for us + patternName: pattern.patternName, + patternPartial: pattern.patternPartial, + patternState: pattern.patternState, + patternEngineName: pattern.engine.engineName, + extraOutput: extraOutput, + }); + + //set the pattern-specific footer by compiling the general-footer with data, and then adding it to the meta footer + const footerPartialPromise = render( + Pattern.createEmpty({ extendedTemplate: uikit.footer }), + { + isPattern: pattern.isPattern, + patternData: pattern.patternData, + cacheBuster: patternlab.cacheBuster, + } + ); + + return Promise.all([ + headPromise, + patternPartialPromise, + footerPartialPromise, + ]) + .then(intermediateResults => { + // retrieve results of promises + const headHTML = intermediateResults[0]; //headPromise + pattern.patternPartialCode = intermediateResults[1]; //patternPartialPromise + const footerPartial = intermediateResults[2]; //footerPartialPromise + + //finish up our footer data + let allFooterData; + try { + allFooterData = jsonCopy( + patternlab.data, + 'config.paths.source.data global data' + ); + } catch (err) { + logger.info( + 'There was an error parsing JSON for ' + pattern.relPath + ); + logger.info(err); + } + allFooterData = _.merge(allFooterData, pattern.jsonFileData); + allFooterData.cacheBuster = patternlab.cacheBuster; + allFooterData.patternLabFoot = footerPartial; + + return render(patternlab.userFoot, allFooterData).then( + async footerHTML => { + /////////////// + // WRITE FILES + /////////////// + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_PATTERN_WRITE_BEGIN, + patternlab, + pattern + ); + + //write the compiled template to the public patterns directory + patternlab.writePatternFiles( + headHTML, + pattern, + footerHTML, + uikit.outputDir + ); + + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_PATTERN_WRITE_END, + patternlab, + pattern + ); + + // Allows serializing the compile state + patternlab.graph.node( + pattern + ).compileState = pattern.compileState = CompileState.CLEAN; + logger.info('Built pattern: ' + pattern.patternPartial); + } + ); + }) + .catch(reason => { + console.log(reason); + }); + }) + ); +}; diff --git a/packages/core/src/lib/copier.js b/packages/core/src/lib/copier.js index 9957f5362..441ffdf5b 100644 --- a/packages/core/src/lib/copier.js +++ b/packages/core/src/lib/copier.js @@ -18,6 +18,7 @@ const copier = () => { 'meta', 'annotations', 'patternlabFiles', + 'styleguide', ]; _.each(directories.source, (dir, key) => { if (blackList.includes(key)) { @@ -37,6 +38,7 @@ const copier = () => { // add public key path dirs[key].public = directories.public[key]; }); + return dirs; }; @@ -63,27 +65,42 @@ const copier = () => { watchAssets(patternlab, basePath, dir, key, copyOptions); } else { //just copy - const destination = path.resolve(basePath, dir.public); - copyPromises.push(copyFile(dir.source, destination, copyOptions)); + copyPromises.push( + _.map(patternlab.uikits, uikit => { + copyFile( + dir.source, + path.join(basePath, uikit.outputDir, dir.public), + copyOptions + ); + }) + ); } }); // copy the styleguide copyPromises.push( - copyFile( - assetDirectories.source.styleguide, - assetDirectories.public.root, - copyOptions - ) + _.map(patternlab.uikits, uikit => { + copyFile( + path.join(uikit.modulePath, assetDirectories.source.styleguide), + path.join(basePath, uikit.outputDir, assetDirectories.public.root), + copyOptions + ); + }) ); // copy the favicon copyPromises.push( - copyFile( - `${assetDirectories.source.root}/favicon.ico`, - `${assetDirectories.public.root}/favicon.ico`, - copyOptions - ) + _.map(patternlab.uikits, uikit => { + copyFile( + `${assetDirectories.source.root}/favicon.ico`, + path.join( + basePath, + uikit.outputDir, + `${assetDirectories.public.root}/favicon.ico` + ), + copyOptions + ); + }) ); return Promise.all(copyPromises).then(() => { diff --git a/packages/core/src/lib/events.js b/packages/core/src/lib/events.js index faa71496b..b1653b3c8 100644 --- a/packages/core/src/lib/events.js +++ b/packages/core/src/lib/events.js @@ -14,7 +14,14 @@ const EVENTS = Object.freeze({ * @property {object} patternlab - global data store * */ - PATTERNLAB_BUILD_PATTERN_START: 'patternlab-build-pattern-start', + PATTERNLAB_BUILD_START: 'patternlab-build-start', + + /** + * @desc Emitted after all logic run inside `build()`, which is the entry point for single builds, pattern-only builds, run singly or when watched. + * @property {object} patternlab - global data store + * + */ + PATTERNLAB_BUILD_END: 'patternlab-build-end', /** * @desc Emitted after patterns are iterated over to gather data about them. Right before Pattern Lab processes and renders patterns into HTML diff --git a/packages/core/src/lib/expandPartials.js b/packages/core/src/lib/expandPartials.js index a42df2cbc..0a9200052 100644 --- a/packages/core/src/lib/expandPartials.js +++ b/packages/core/src/lib/expandPartials.js @@ -60,11 +60,7 @@ module.exports = function(currentPattern, patternlab) { //this is what we came here for logger.debug( - `within ${ - currentPattern.patternPartial - }, replacing extendedTemplate partial ${foundPartial} with ${ - cleanPartialPattern.patternPartial - }'s extendedTemplate` + `within ${currentPattern.patternPartial}, replacing extendedTemplate partial ${foundPartial} with ${cleanPartialPattern.patternPartial}'s extendedTemplate` ); currentPattern.extendedTemplate = currentPattern.extendedTemplate.replace( diff --git a/packages/core/src/lib/exportData.js b/packages/core/src/lib/exportData.js index eab91d189..9a8468ce5 100644 --- a/packages/core/src/lib/exportData.js +++ b/packages/core/src/lib/exportData.js @@ -2,6 +2,7 @@ const eol = require('os').EOL; const path = require('path'); +const _ = require('lodash'); const ae = require('./annotation_exporter'); @@ -70,15 +71,42 @@ module.exports = function(patternlab) { const annotationsJSON = annotation_exporter.gather(); const annotations = 'var comments = { "comments" : ' + JSON.stringify(annotationsJSON) + '};'; - fs.outputFileSync( - path.resolve(paths.public.annotations, 'annotations.js'), - annotations - ); + _.each(patternlab.uikits, uikit => { + fs.outputFileSync( + path.resolve( + path.join( + process.cwd(), + uikit.outputDir, + paths.public.annotations, + 'annotations.js' + ) + ), + annotations + ); + }); + + // add module.export to the Nodejs-specific file generated. + const exportedOutput = + output + + 'module.exports = { config, ishControls, navItems, patternPaths, viewAllPaths, plugins, defaultShowPatternInfo, defaultPattern };'; //write all output to patternlab-data - fs.outputFileSync( - path.resolve(paths.public.data, 'patternlab-data.js'), - output - ); + _.each(patternlab.uikits, uikit => { + fs.outputFileSync( + path.resolve( + path.join(process.cwd(), uikit.outputDir, paths.public.data), + 'patternlab-data.js' + ), + output + ); + fs.outputFileSync( + path.resolve( + path.join(process.cwd(), uikit.outputDir, paths.public.data), + 'patternlab-data.cjs.js' + ), + exportedOutput + ); + }); + return output; }; diff --git a/packages/core/src/lib/findModules.js b/packages/core/src/lib/findModules.js new file mode 100644 index 000000000..246612ec8 --- /dev/null +++ b/packages/core/src/lib/findModules.js @@ -0,0 +1,60 @@ +'use strict'; + +const path = require('path'); + +const isScopedPackage = require('./isScopedPackage'); + +let fs = require('fs-extra'); // eslint-disable-line + +const isDir = fPath => { + const stats = fs.lstatSync(fPath); + return stats.isDirectory() || stats.isSymbolicLink(); +}; + +module.exports = (dir, filter) => { + /** + * @name findModules + * @desc Traverse the given path and gather possible engines + * @param {string} fPath - The file path to traverse + * @param {Array} foundModules - An array of modules + * @return {Array} - The final array of engines + */ + const findModules = (fPath, foundModules) => { + /** + * @name dirList + * @desc A list of all directories in the given path + * @type {Array} + */ + const dirList = fs + .readdirSync(fPath) + .filter(p => isDir(path.join(fPath, p))); + + /** + * @name m + * @desc For the current dir get all modules + * @type {Array} + */ + const m = foundModules.concat( + dirList.filter(filter).map(mod => { + return { + name: filter(mod), + modulePath: path.join(fPath, mod), + }; + }) + ); + + /** + * 1. Flatten all engines from inner recursions and current dir + * 2. Filter the dirList for scoped packages + * 3. Map over every scoped package and recurse into it to find scoped modules + */ + return [].concat( + ...m, + ...dirList + .filter(isScopedPackage) // 2 + .map(scope => findModules(path.join(fPath, scope), m)) // 3 + ); + }; + + return findModules(dir, []); +}; diff --git a/packages/core/src/lib/help.js b/packages/core/src/lib/help.js deleted file mode 100644 index 8dc6869e2..000000000 --- a/packages/core/src/lib/help.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -/** - * @function help - * @desc A small helper function returning the man page string - * @param {string} version - The version to include in the string literal - * @return {string} - The man string - */ -const help = version => ` - Pattern Lab Node v${version} - - Usage: patternlab.() - - Functions: - - build Builds patterns, copies assets, and constructs ui into config.paths.public - patternsonly Builds patterns only, leaving existing public files intact - liststarterkits Fetches starterkit repos from pattern-lab github org - loadstarterkit Loads starterkit already available via node_modules/ into config.paths.source/* - NOTE: In most cases, npm install starterkit-name will precede this call. - Parameters: - kit The name of the starter kit to load (string) - clean Whether or not to remove all files from config.paths.source/ prior to load (bool) - NOTE: Overwrites existing content. Prunes existing directory if --clean=true argument is passed. - version Logs current version to stdout - v Return current version as a string - - =============================== - - More info about Pattern Lab: http://patternlab.io/ - - Open an issue: https://github.com/pattern-lab/patternlab-node/issues - - View the changelog, roadmap, and other info: https://github.com/pattern-lab/patternlab-node/wiki - ===============================`; -module.exports = help; diff --git a/packages/core/src/lib/isScopedPackage.js b/packages/core/src/lib/isScopedPackage.js new file mode 100644 index 000000000..cffd1d811 --- /dev/null +++ b/packages/core/src/lib/isScopedPackage.js @@ -0,0 +1,16 @@ +'use strict'; + +const path = require('path'); + +const scopeMatch = /^@(.*)$/; + +/** + * @name isScopedPackage + * @desc Checks whether a path in modules belongs to a scoped package + * @param {string} filePath - The pathname to check + * @return {Boolean} - Returns a bool when found, false othersie + */ +module.exports = filePath => { + const baseName = path.basename(filePath); + return scopeMatch.test(baseName); +}; diff --git a/packages/core/src/lib/lineage_hunter.js b/packages/core/src/lib/lineage_hunter.js index c90e6cdd6..657897d21 100644 --- a/packages/core/src/lib/lineage_hunter.js +++ b/packages/core/src/lib/lineage_hunter.js @@ -1,5 +1,4 @@ 'use strict'; -const extend = require('util')._extend; const getPartial = require('./get'); const logger = require('./log'); @@ -57,7 +56,7 @@ const lineage_hunter = function() { } ancestorPattern.lineageR.push(lr); - extend(patternlab.graph.node(ancestorPattern), lr); + Object.assign(patternlab.graph.node(ancestorPattern), lr); } } }); @@ -132,13 +131,7 @@ const lineage_hunter = function() { ? '<>' : lineageRPattern.patternState; logger.info( - `Found a lower common denominator pattern state: ${ - pattern.patternState - } on ${ - pattern.patternPartial - }. Setting reverse lineage pattern ${ - lineageRPattern.patternPartial - } from ${oldState}` + `Found a lower common denominator pattern state: ${pattern.patternState} on ${pattern.patternPartial}. Setting reverse lineage pattern ${lineageRPattern.patternPartial} from ${oldState}` ); lineageRPattern.patternState = pattern.patternState; diff --git a/packages/core/src/lib/list_item_hunter.js b/packages/core/src/lib/list_item_hunter.js index 167c8e55c..e6fd3818b 100644 --- a/packages/core/src/lib/list_item_hunter.js +++ b/packages/core/src/lib/list_item_hunter.js @@ -11,9 +11,7 @@ const list_item_hunter = function() { return matches.reduce((previousMatchPromise, liMatchStart) => { return previousMatchPromise.then(() => { logger.debug( - `found listItem of size ${liMatchStart} inside ${ - pattern.patternPartial - }` + `found listItem of size ${liMatchStart} inside ${pattern.patternPartial}` ); //we found a listitem match diff --git a/packages/core/src/lib/loadPattern.js b/packages/core/src/lib/loadPattern.js index 6eae3843e..c0fb1d6a5 100644 --- a/packages/core/src/lib/loadPattern.js +++ b/packages/core/src/lib/loadPattern.js @@ -23,13 +23,13 @@ let fs = require('fs-extra'); //eslint-disable-line prefer-const // all its associated files, and records it in patternlab.patterns[] module.exports = function(relPath, patternlab) { const relativeDepth = (relPath.match(/\w(?=\\)|\w(?=\/)/g) || []).length; - if (relativeDepth > 2) { + if (relativeDepth > 3) { logger.warning(''); logger.warning('Warning:'); logger.warning( 'A pattern file: ' + relPath + - ' was found greater than 2 levels deep from ' + + ' was found greater than 3 levels deep from ' + patternlab.config.paths.source.patterns + '.' ); @@ -39,6 +39,10 @@ module.exports = function(relPath, patternlab) { logger.warning( '[patternType]/[patternSubtype]/[patternName].[patternExtension]' ); + logger.warning('or'); + logger.warning( + '[patternType]/[patternSubtype]/[patternName]/[patternName].[patternExtension]' + ); logger.warning(''); logger.warning( 'While Pattern Lab may still function, assets may 404 and frontend links may break. Consider yourself warned. ' @@ -148,18 +152,14 @@ module.exports = function(relPath, patternlab) { if (listItemsData) { logger.debug( - `found pattern-specific listitems data for ${ - currentPattern.patternPartial - }` + `found pattern-specific listitems data for ${currentPattern.patternPartial}` ); currentPattern.listitems = listItemsData; buildListItems(currentPattern); } } catch (err) { logger.warning( - `There was an error parsing sibling listitem JSON for ${ - currentPattern.relPath - }` + `There was an error parsing sibling listitem JSON for ${currentPattern.relPath}` ); logger.warning(err); } diff --git a/packages/core/src/lib/loadPatternGraph.js b/packages/core/src/lib/loadPatternGraph.js new file mode 100644 index 000000000..c1f4ab851 --- /dev/null +++ b/packages/core/src/lib/loadPatternGraph.js @@ -0,0 +1,21 @@ +'use strict'; + +const PatternGraph = require('./pattern_graph').PatternGraph; + +/** + * If a graph was serialized and then {@code deletePatternDir == true}, there is a mismatch in the + * pattern metadata and not all patterns might be recompiled. + * For that reason an empty graph is returned in this case, so every pattern will be flagged as + * "needs recompile". Otherwise the pattern graph is loaded from the meta data. + * + * @param patternlab + * @param {boolean} deletePatternDir When {@code true}, an empty graph is returned + * @return {PatternGraph} + */ +module.exports = (patternlab, deletePatternDir) => { + // Sanity check to prevent problems when code is refactored + if (deletePatternDir) { + return PatternGraph.empty(); + } + return PatternGraph.loadFromFile(); +}; diff --git a/packages/core/src/lib/loaduikits.js b/packages/core/src/lib/loaduikits.js new file mode 100644 index 000000000..dc152ae3d --- /dev/null +++ b/packages/core/src/lib/loaduikits.js @@ -0,0 +1,99 @@ +'use strict'; + +const path = require('path'); +const _ = require('lodash'); + +const logger = require('./log'); + +let findModules = require('./findModules'); //eslint-disable-line prefer-const +let fs = require('fs-extra'); // eslint-disable-line + +const uiKitMatcher = /^uikit-(.*)$/; +const nodeModulesPath = path.join(process.cwd(), 'node_modules'); + +/** + * Given a path: return the uikit name if the path points to a valid uikit + * module directory, or false if it doesn't. + * @param filePath + * @returns UIKit name if exists or FALSE + */ +const isUIKitModule = filePath => { + const baseName = path.basename(filePath); + const engineMatch = baseName.match(uiKitMatcher); + + if (engineMatch) { + return engineMatch[1]; + } + return false; +}; + +const readModuleFile = (kit, subPath) => { + return fs.readFileSync( + path.resolve(path.join(kit.modulePath, subPath)), + 'utf8' + ); +}; + +/** + * Loads uikits, connecting configuration and installed modules + * [1] Looks in node_modules for uikits. + * [2] Filter out our uikit-polyfills package. + * [3] Only continue if uikit is enabled in patternlab-config.json + * [4] Reads files from uikit that apply to every template + * @param {object} patternlab + */ +module.exports = patternlab => { + const paths = patternlab.config.paths; + + const uikits = findModules(nodeModulesPath, isUIKitModule) // [1] + .filter(kit => kit.name !== 'polyfills'); // [2] + uikits.forEach(kit => { + const configEntry = _.find(_.filter(patternlab.config.uikits, 'enabled'), { + name: `uikit-${kit.name}`, + }); // [3] + + if (!configEntry) { + logger.warning( + `Could not find uikit with name uikit-${kit.name} defined within patternlab-config.json, or it is not enabled.` + ); + return; + } + + try { + patternlab.uikits[`uikit-${kit.name}`] = { + name: `uikit-${kit.name}`, + modulePath: kit.modulePath, + enabled: true, + outputDir: configEntry.outputDir, + excludedPatternStates: configEntry.excludedPatternStates, + excludedTags: configEntry.excludedTags, + header: readModuleFile( + kit, + paths.source.patternlabFiles['general-header'] + ), + footer: readModuleFile( + kit, + paths.source.patternlabFiles['general-footer'] + ), + patternSection: readModuleFile( + kit, + paths.source.patternlabFiles.patternSection + ), + patternSectionSubType: readModuleFile( + kit, + paths.source.patternlabFiles.patternSectionSubtype + ), + viewAll: readModuleFile(kit, paths.source.patternlabFiles.viewall), + }; // [4] + } catch (ex) { + logger.error(ex); + logger.error( + '\nERROR: missing an essential file from ' + + kit.modulePath + + paths.source.patternlabFiles + + ". Pattern Lab won't work without this file.\n" + ); + } + }); + return Promise.resolve(); +}; diff --git a/packages/core/src/lib/markModifiedPatterns.js b/packages/core/src/lib/markModifiedPatterns.js index f48094bc6..aa80b25bb 100644 --- a/packages/core/src/lib/markModifiedPatterns.js +++ b/packages/core/src/lib/markModifiedPatterns.js @@ -28,21 +28,23 @@ module.exports = function(lastModified, patternlab) { array.forEach(func); } }; - const modifiedOrNot = _.groupBy( - patternlab.patterns, - p => - changes_hunter.needsRebuild(lastModified, p) ? 'modified' : 'notModified' + const modifiedOrNot = _.groupBy(patternlab.patterns, p => + changes_hunter.needsRebuild(lastModified, p) ? 'modified' : 'notModified' ); // For all unmodified patterns load their rendered template output forEachExisting(modifiedOrNot.notModified, cleanPattern => { - const xp = path.join( - patternlab.config.paths.public.patterns, - cleanPattern.getPatternLink(patternlab, 'markupOnly') - ); + _.each(patternlab.uikits, uikit => { + const xp = path.join( + process.cwd(), + uikit.outputDir, + patternlab.config.paths.public.patterns, + cleanPattern.getPatternLink(patternlab, 'markupOnly') + ); - // Pattern with non-existing markupOnly files were already marked for rebuild and thus are not "CLEAN" - cleanPattern.patternPartialCode = fs.readFileSync(xp, 'utf8'); + // Pattern with non-existing markupOnly files were already marked for rebuild and thus are not "CLEAN" + cleanPattern.patternPartialCode = fs.readFileSync(xp, 'utf8'); + }); }); // For all patterns that were modified, schedule them for rebuild diff --git a/packages/core/src/lib/object_factory.js b/packages/core/src/lib/object_factory.js index 0c3ffe5d2..83524a9c7 100644 --- a/packages/core/src/lib/object_factory.js +++ b/packages/core/src/lib/object_factory.js @@ -1,7 +1,6 @@ 'use strict'; const patternEngines = require('./pattern_engines'); const path = require('path'); -const extend = require('util')._extend; // patternPrefixMatcher is intended to match the leading maybe-underscore, // zero or more digits, and maybe-dash at the beginning of a pattern file name we can hack them @@ -22,14 +21,40 @@ const Pattern = function(relPath, data, patternlab) { * @param {patternlab} rendered html files for the pattern */ const pathObj = path.parse(path.normalize(relPath)); + const info = {}; + // 00-colors(.mustache) is subbed in 00-atoms-/00-global/00-colors + info.hasDir = + path.basename(pathObj.dir).replace(patternPrefixMatcher, '') === + pathObj.name.replace(patternPrefixMatcher, '') || + path.basename(pathObj.dir).replace(patternPrefixMatcher, '') === + pathObj.name.split('~')[0].replace(patternPrefixMatcher, ''); + + info.dir = info.hasDir ? pathObj.dir.split(path.sep).pop() : ''; + info.dirLevel = pathObj.dir.split(path.sep).length; + this.relPath = path.normalize(relPath); // '00-atoms/00-global/00-colors.mustache' this.fileName = pathObj.name; // '00-colors' this.subdir = pathObj.dir; // '00-atoms/00-global' + if ((this.subdir.match(/\w(?=\\)|\w(?=\/)/g) || []).length > 1) { + this.subdir = this.subdir.split(/\/|\\/, 2).join(path.sep); // '00-atoms/03-controls/00-button' -> '00-atoms/03-controls' + } this.fileExtension = pathObj.ext; // '.mustache' // this is the unique name, subDir + fileName (sans extension) - this.name = - this.subdir.replace(path.sep, '-') + '-' + this.fileName.replace('~', '-'); // '00-atoms-00-global-00-colors' + this.name = ''; + if (info.hasDir && info.dirLevel > 2) { + let variant = ''; + + if (this.fileName.indexOf('~') !== -1) { + variant = '-' + this.fileName.split('~')[1]; + } + this.name = this.subdir.replace(/[\/\\]/g, '-') + variant; + } else { + this.name = + this.subdir.replace(/[\/\\]/g, '-') + + '-' + + this.fileName.replace('~', '-'); // '00-atoms-00-global-00-colors' + } // the JSON used to render values in the pattern this.jsonFileData = data || {}; @@ -53,30 +78,33 @@ const Pattern = function(relPath, data, patternlab) { }, '') .trim(); //this is the display name for the ui. strip numeric + hyphen prefixes - // the top-level pattern group this pattern belongs to. 'atoms' - this.patternGroup = this.subdir - .split(path.sep)[0] - .replace(patternPrefixMatcher, ''); - //00-atoms if needed - this.patternType = this.subdir.split(path.sep)[0]; + this.patternType = this.getDirLevel(0); - // the sub-group this pattern belongs to. - this.patternSubGroup = path - .basename(this.subdir) - .replace(patternPrefixMatcher, ''); // 'global' + // the top-level pattern group this pattern belongs to. 'atoms' + this.patternGroup = this.patternType.replace(patternPrefixMatcher, ''); //00-colors if needed - this.patternSubType = path.basename(this.subdir); + this.patternSubType = this.getDirLevel(1); + + // the sub-group this pattern belongs to. + this.patternSubGroup = this.patternSubType.replace(patternPrefixMatcher, ''); // 'global' // the joined pattern group and subgroup directory - this.flatPatternPath = this.subdir.replace(/[\/\\]/g, '-'); // '00-atoms-00-global' + this.flatPatternPath = + info.hasDir && info.dirLevel > 2 + ? this.subdir + .replace(/[/\\]/g, '-') + .replace(new RegExp('-' + info.dir + '$'), '') + : this.subdir.replace(/[\/\\]/g, '-'); // '00-atoms-00-global' // calculated path from the root of the public directory to the generated // (rendered!) html file for this pattern, to be shown in the iframe this.patternLink = this.patternSectionSubtype ? `$${this.name}/index.html` - : patternlab ? this.getPatternLink(patternlab, 'rendered') : null; + : patternlab + ? this.getPatternLink(patternlab, 'rendered') + : null; // The canonical "key" by which this pattern is known. This is the callable // name of the pattern. UPDATE: this.key is now known as this.patternPartial @@ -189,6 +217,18 @@ Pattern.prototype = { findPartial: function(partialString) { return this.engine.findPartial(partialString); }, + + getDirLevel: function(level) { + const items = this.subdir.split(path.sep); + + if (items[level]) { + return items[level]; + } else if (items[level - 1]) { + return items[level - 1]; + } else { + return ''; + } + }, }; // Pattern static methods @@ -206,7 +246,7 @@ Pattern.createEmpty = function(customProps, patternlab) { } const pattern = new Pattern(relPath, null, patternlab); - return extend(pattern, customProps); + return Object.assign(pattern, customProps); }; // factory: creates an Pattern object on-demand from a hash; the hash accepts @@ -214,7 +254,7 @@ Pattern.createEmpty = function(customProps, patternlab) { // constructor takes. Pattern.create = function(relPath, data, customProps, patternlab) { const newPattern = new Pattern(relPath || '', data || null, patternlab); - return extend(newPattern, customProps); + return Object.assign(newPattern, customProps); }; const CompileState = { diff --git a/packages/core/src/lib/pattern_engines.js b/packages/core/src/lib/pattern_engines.js index 6181b8bba..cde010125 100644 --- a/packages/core/src/lib/pattern_engines.js +++ b/packages/core/src/lib/pattern_engines.js @@ -1,13 +1,12 @@ // special shoutout to Geoffrey Pursell for single-handedly making Pattern Lab Node Pattern Engines possible! aww thanks :) 'use strict'; -const { existsSync, lstatSync, readdirSync } = require('fs'); +const { existsSync } = require('fs'); const path = require('path'); + +const findModules = require('./findModules'); + const engineMatcher = /^engine-(.*)$/; -const scopeMatch = /^@(.*)$/; -const isDir = fPath => { - const stats = lstatSync(fPath); - return stats.isDirectory() || stats.isSymbolicLink(); -}; + const logger = require('./log'); const enginesDirectories = [ @@ -37,17 +36,6 @@ function isEngineModule(filePath) { return false; } -/** - * @name isScopedPackage - * @desc Checks whether a path in modules belongs to a scoped package - * @param {string} filePath - The pathname to check - * @return {Boolean} - Returns a bool when found, false othersie - */ -function isScopedPackage(filePath) { - const baseName = path.basename(filePath); - return scopeMatch.test(baseName); -} - /** * @name resolveEngines * @desc Creates an array of all available patternlab engines @@ -60,49 +48,7 @@ function resolveEngines(dir) { return []; // Silence is golden … } - /** - * @name walk - * @desc Traverse the given path and gather possible engines - * @param {string} fPath - The file path to traverse - * @param {Array} engines - An array of engines from the inner most matches - * @return {Array} - The final array of engines - */ - const walk = (fPath, engines) => { - /** - * @name dirList - * @desc A list of all directories in the given path - * @type {Array} - */ - const dirList = readdirSync(fPath).filter(p => isDir(path.join(fPath, p))); - - /** - * @name e - * @desc For the current dir get all engines - * @type {Array} - */ - const e = engines.concat( - dirList.filter(isEngineModule).map(engine => { - return { - name: isEngineModule(engine), - modulePath: path.join(fPath, engine), - }; - }) - ); - - /** - * 1. Flatten all engines from inner recursions and current dir - * 2. Filter the dirList for scoped packages - * 3. Map over every scoped package and recurse into it to find scoped engines - */ - return [].concat( - ...e, - ...dirList - .filter(isScopedPackage) // 2 - .map(scope => walk(path.join(fPath, scope), e)) // 3 - ); - }; - - return walk(dir, []); + return findModules(dir, isEngineModule); } function findEngineModulesInDirectory(dir) { diff --git a/packages/core/src/lib/pattern_exporter.js b/packages/core/src/lib/pattern_exporter.js index 9bfc85ce3..8eb4e1a88 100644 --- a/packages/core/src/lib/pattern_exporter.js +++ b/packages/core/src/lib/pattern_exporter.js @@ -1,6 +1,35 @@ 'use strict'; const fs = require('fs-extra'); +const path = require('path'); + +function exportSinglePattern(patternlab, pattern) { + const preserveDirStructure = + patternlab.config.patternExportPreserveDirectoryStructure; + let patternName = pattern.patternPartial; + let patternDir = patternlab.config.patternExportDirectory; + let patternCode = pattern.patternPartialCode; + let patternFileExtension = '.html'; + if (preserveDirStructure) { + // Extract the first part of the pattern partial as the directory in which + // it should go. + patternDir = path.join(patternDir, pattern.patternPartial.split('-')[0]); + patternName = pattern.patternPartial + .split('-') + .slice(1) + .join('-'); + } + + if (patternlab.config.patternExportRaw) { + patternCode = pattern.extendedTemplate; + patternFileExtension = `.${patternlab.config.patternExtension}`; + } + + fs.outputFileSync( + path.join(patternDir, patternName) + patternFileExtension, + patternCode + ); +} const pattern_exporter = function() { /** @@ -13,18 +42,24 @@ const pattern_exporter = function() { function exportPatterns(patternlab) { //read the config export options const exportPartials = patternlab.config.patternExportPatternPartials; + const exportAll = patternlab.config.patternExportAll; + + if (exportAll) { + for (let i = 0; i < patternlab.patterns.length; i++) { + if (!patternlab.patterns[i].patternPartial.startsWith('-')) { + exportSinglePattern(patternlab, patternlab.patterns[i]); + } + } + + return; + } //find the chosen patterns to export for (let i = 0; i < exportPartials.length; i++) { for (let j = 0; j < patternlab.patterns.length; j++) { if (exportPartials[i] === patternlab.patterns[j].patternPartial) { //write matches to the desired location - fs.outputFileSync( - patternlab.config.patternExportDirectory + - patternlab.patterns[j].patternPartial + - '.html', - patternlab.patterns[j].patternPartialCode - ); + exportSinglePattern(patternlab, patternlab.patterns[j]); } } } diff --git a/packages/core/src/lib/pattern_graph.js b/packages/core/src/lib/pattern_graph.js index ad24c0ee1..6ad17d012 100644 --- a/packages/core/src/lib/pattern_graph.js +++ b/packages/core/src/lib/pattern_graph.js @@ -356,29 +356,29 @@ PatternGraph.fromJson = function(o) { /** * Resolve the path to the file containing the serialized graph - * @param {object} patternlab - * @param {string} [file='dependencyGraph.json'] Path to the graph file + * @param {string} [filePath='process.cwd()'] Path to the graph file + * @param {string} [fileName='dependencyGraph.json'] Name of the graph file * @return {string} */ -PatternGraph.resolveJsonGraphFile = function(patternlab, file) { - return path.resolve( - patternlab.config.paths.public.root, - file || 'dependencyGraph.json' - ); +PatternGraph.resolveJsonGraphFile = function( + filePath = process.cwd(), + fileName = 'dependencyGraph.json' +) { + return path.resolve(filePath, fileName); }; /** * Loads a graph from the file. Does not add any patterns from the patternlab object, * i.e. graph.patterns will be still empty until all patterns have been processed. * - * @param {object} patternlab - * @param {string} [file] Optional path to the graph json file + * @param {string} [filePath] path to the graph json file + * @param {string} [fileName] optional name of the graph json file * * @see {@link PatternGraph.fromJson} * @see {@link PatternGraph.resolveJsonGraphFile} */ -PatternGraph.loadFromFile = function(patternlab, file) { - const jsonGraphFile = this.resolveJsonGraphFile(patternlab, file); +PatternGraph.loadFromFile = function(filePath, fileName) { + const jsonGraphFile = this.resolveJsonGraphFile(filePath, fileName); // File is fresh, so simply construct an empty graph in memory if (!fs.existsSync(jsonGraphFile)) { @@ -399,8 +399,11 @@ PatternGraph.loadFromFile = function(patternlab, file) { * * @see {@link PatternGraph.resolveJsonGraphFile} */ -PatternGraph.storeToFile = function(patternlab, file) { - const jsonGraphFile = this.resolveJsonGraphFile(patternlab, file); +PatternGraph.storeToFile = function(patternlab) { + if (process.env.PATTERNLAB_ENV === 'CI') { + return; + } + const jsonGraphFile = this.resolveJsonGraphFile(); patternlab.graph.timestamp = new Date().getTime(); fs.writeJSONSync(jsonGraphFile, patternlab.graph.toJson()); }; @@ -408,10 +411,10 @@ PatternGraph.storeToFile = function(patternlab, file) { /** * Exports this graph to a GraphViz file. * @param patternlab - @ @param {string} file Output file + @ @param {string} fileName Output filename */ -PatternGraph.exportToDot = function(patternlab, file) { - const dotFile = this.resolveJsonGraphFile(patternlab, file); +PatternGraph.exportToDot = function(patternlab, fileName) { + const dotFile = this.resolveJsonGraphFile(undefined, fileName); const g = PatternGraphDot.generate(patternlab.graph); fs.outputFileSync(dotFile, g); }; diff --git a/packages/core/src/lib/patternlab.js b/packages/core/src/lib/patternlab.js index 0b28a8baf..cd89c64c4 100644 --- a/packages/core/src/lib/patternlab.js +++ b/packages/core/src/lib/patternlab.js @@ -7,20 +7,19 @@ const cleanHtml = require('js-beautify').html; const inherits = require('util').inherits; const pm = require('./plugin_manager'); +const plugin_manager = new pm(); const packageInfo = require('../../package.json'); const events = require('./events'); const buildListItems = require('./buildListItems'); const dataLoader = require('./data_loader')(); +const loaduikits = require('./loaduikits'); const logger = require('./log'); -const parseLink = require('./parseLink'); const processIterative = require('./processIterative'); const processRecursive = require('./processRecursive'); -const jsonCopy = require('./json_copy'); -const render = require('./render'); + const loadPattern = require('./loadPattern'); const sm = require('./starterkit_manager'); -const Pattern = require('./object_factory').Pattern; -const CompileState = require('./object_factory').CompileState; + const patternEngines = require('./pattern_engines'); //these are mocked in unit tests, so let them be overridden @@ -48,6 +47,7 @@ module.exports = class PatternLab { // Load up engines please this.engines = patternEngines; this.engines.loadAllEngines(config); + this.isBusy = false; // // INITIALIZE EMPTY GLOBAL DATA STRUCTURES @@ -65,16 +65,22 @@ module.exports = class PatternLab { // Make ye olde event emitter this.events = new PatternLabEventEmitter(); + this.hooks = {}; + this.hooks[events.PATTERNLAB_PATTERN_WRITE_END] = []; + // Make a place for the pattern graph to sit this.graph = null; // Make a place to attach known watchers so we can manage them better during serve and watch this.watchers = {}; + // make a place to register any uikits + this.uikits = {}; + loaduikits(this); + // Verify correctness of configuration (?) this.checkConfiguration(this); - // TODO: determine if this is the best place to wire up plugins this.initializePlugins(this); } @@ -105,9 +111,7 @@ module.exports = class PatternLab { if (typeof patternlab.config.paths.source.patternlabFiles === 'string') { logger.warning(''); logger.warning( - `Configuration key [paths.source.patternlabFiles] inside patternlab-config.json was found as the string '${ - patternlab.config.paths.source.patternlabFiles - }'` + `Configuration key [paths.source.patternlabFiles] inside patternlab-config.json was found as the string '${patternlab.config.paths.source.patternlabFiles}'` ); logger.warning( 'Since Pattern Lab Node Core 3.0.0 this key is an object. Suggest you update this key following this issue: https://github.com/pattern-lab/patternlab-node/issues/683.' @@ -131,29 +135,11 @@ module.exports = class PatternLab { * Finds and calls the main method of any found plugins. * @param patternlab - global data store */ - //todo, move this to plugin_manager initializePlugins(patternlab) { if (!patternlab.config.plugins) { return; } - - const plugin_manager = new pm( - patternlab.config, - path.resolve(__dirname, '../../patternlab-config.json') - ); - const foundPlugins = plugin_manager.detect_plugins(); - - if (foundPlugins && foundPlugins.length > 0) { - for (let i = 0; i < foundPlugins.length; i++) { - const pluginKey = foundPlugins[i]; - - logger.info(`Found plugin: ${pluginKey}`); - logger.info(`Attempting to load and initialize plugin.`); - - const plugin = plugin_manager.load_plugin(pluginKey); - plugin(patternlab); - } - } + plugin_manager.intialize_plugins(patternlab); } buildGlobalData(additionalData) { @@ -190,37 +176,6 @@ module.exports = class PatternLab { this.listitems = {}; } - // load up all the necessary files from pattern lab that apply to every template - try { - this.header = fs.readFileSync( - path.resolve(paths.source.patternlabFiles['general-header']), - 'utf8' - ); - this.footer = fs.readFileSync( - path.resolve(paths.source.patternlabFiles['general-footer']), - 'utf8' - ); - this.patternSection = fs.readFileSync( - path.resolve(paths.source.patternlabFiles.patternSection), - 'utf8' - ); - this.patternSectionSubType = fs.readFileSync( - path.resolve(paths.source.patternlabFiles.patternSectionSubtype), - 'utf8' - ); - this.viewAll = fs.readFileSync( - path.resolve(paths.source.patternlabFiles.viewall), - 'utf8' - ); - } catch (ex) { - logger.error(ex); - logger.error( - '\nERROR: missing an essential file from ' + - paths.source.patternlabFiles + - ". Pattern Lab won't work without this file.\n" - ); - } - this.data = Object.assign({}, this.data, additionalData); this.setCacheBust(); @@ -255,14 +210,11 @@ module.exports = class PatternLab { getVersion() { return this.package.version; } - logVersion() { - logger.info(this.package.version); - } getSupportedTemplateExtensions() { return this.engines.getSupportedFileExtensions(); } - writePatternFiles(headHTML, pattern, footerHTML) { + writePatternFiles(headHTML, pattern, footerHTML, outputBasePath) { const nullFormatter = str => str; const defaultFormatter = codeString => cleanHtml(codeString, { indent_size: 2 }); @@ -307,7 +259,10 @@ module.exports = class PatternLab { //write the compiled template to the public patterns directory outputFiles.forEach(outFile => - fs.outputFileSync(outFile.path, outFile.content) + fs.outputFileSync( + path.join(process.cwd(), outputBasePath, outFile.path), + outFile.content + ) ); } @@ -339,189 +294,6 @@ module.exports = class PatternLab { } } - renderSinglePattern(pattern) { - // Pattern does not need to be built and recompiled more than once - if (!pattern.isPattern || pattern.compileState === CompileState.CLEAN) { - return Promise.resolve(false); - } - - // Allows serializing the compile state - this.graph.node(pattern).compileState = pattern.compileState = - CompileState.BUILDING; - - //todo move this into lineage_hunter - pattern.patternLineages = pattern.lineage; - pattern.patternLineageExists = pattern.lineage.length > 0; - pattern.patternLineagesR = pattern.lineageR; - pattern.patternLineageRExists = pattern.lineageR.length > 0; - pattern.patternLineageEExists = - pattern.patternLineageExists || pattern.patternLineageRExists; - - this.events.emit( - events.PATTERNLAB_PATTERN_BEFORE_DATA_MERGE, - this, - pattern - ); - - //render the pattern, but first consolidate any data we may have - let allData; - - let allListItems = _.merge({}, this.listitems, pattern.listitems); - allListItems = parseLink( - this, - allListItems, - 'listitems.json + any pattern listitems.json' - ); - - allData = _.merge({}, this.data, pattern.jsonFileData); - allData = _.merge({}, allData, allListItems); - allData.cacheBuster = this.cacheBuster; - allData.patternPartial = pattern.patternPartial; - - /////////////// - // HEADER - /////////////// - - //re-rendering the headHTML each time allows pattern-specific data to influence the head of the pattern - let headPromise; - if (this.userHead) { - headPromise = render(this.userHead, allData); - } else { - headPromise = render( - Pattern.createEmpty({ extendedTemplate: this.header }), - allData - ); - } - - /////////////// - // PATTERN - /////////////// - - //render the extendedTemplate with all data - const patternPartialPromise = render(pattern, allData, this.partials); - - /////////////// - // FOOTER - /////////////// - - // stringify this data for individual pattern rendering and use on the styleguide - // see if patternData really needs these other duped values - - // construct our extraOutput dump - const extraOutput = Object.assign( - {}, - pattern.extraOutput, - pattern.allMarkdown - ); - delete extraOutput.title; - delete extraOutput.state; - delete extraOutput.markdown; - - pattern.patternData = JSON.stringify({ - cssEnabled: false, - patternLineageExists: pattern.patternLineageExists, - patternLineages: pattern.patternLineages, - lineage: pattern.patternLineages, - patternLineageRExists: pattern.patternLineageRExists, - patternLineagesR: pattern.patternLineagesR, - lineageR: pattern.patternLineagesR, - patternLineageEExists: - pattern.patternLineageExists || pattern.patternLineageRExists, - patternDesc: pattern.patternDescExists ? pattern.patternDesc : '', - patternBreadcrumb: - pattern.patternGroup === pattern.patternSubGroup - ? { - patternType: pattern.patternGroup, - } - : { - patternType: pattern.patternGroup, - patternSubtype: pattern.patternSubGroup, - }, - patternExtension: pattern.fileExtension.substr(1), //remove the dot because styleguide asset default adds it for us - patternName: pattern.patternName, - patternPartial: pattern.patternPartial, - patternState: pattern.patternState, - patternEngineName: pattern.engine.engineName, - extraOutput: extraOutput, - }); - - //set the pattern-specific footer by compiling the general-footer with data, and then adding it to the meta footer - const footerPartialPromise = render( - Pattern.createEmpty({ extendedTemplate: this.footer }), - { - isPattern: pattern.isPattern, - patternData: pattern.patternData, - cacheBuster: this.cacheBuster, - } - ); - - const self = this; - - return Promise.all([ - headPromise, - patternPartialPromise, - footerPartialPromise, - ]) - .then(intermediateResults => { - // retrieve results of promises - const headHTML = intermediateResults[0]; //headPromise - pattern.patternPartialCode = intermediateResults[1]; //patternPartialPromise - const footerPartial = intermediateResults[2]; //footerPartialPromise - - //finish up our footer data - let allFooterData; - try { - allFooterData = jsonCopy( - self.data, - 'config.paths.source.data global data' - ); - } catch (err) { - logger.info('There was an error parsing JSON for ' + pattern.relPath); - logger.info(err); - } - allFooterData = _.merge(allFooterData, pattern.jsonFileData); - allFooterData.patternLabFoot = footerPartial; - - return render(self.userFoot, allFooterData).then(footerHTML => { - /////////////// - // WRITE FILES - /////////////// - - self.events.emit( - events.PATTERNLAB_PATTERN_WRITE_BEGIN, - self, - pattern - ); - - //write the compiled template to the public patterns directory - self.writePatternFiles(headHTML, pattern, footerHTML); - - self.events.emit(events.PATTERNLAB_PATTERN_WRITE_END, self, pattern); - - // Allows serializing the compile state - self.graph.node(pattern).compileState = pattern.compileState = - CompileState.CLEAN; - logger.info('Built pattern: ' + pattern.patternPartial); - }); - }) - .catch(reason => { - console.log(reason); - }); - } - - /** - * Installs a given plugin. Assumes it has already been pulled down via npm - * @param pluginName - the name of the plugin - */ - installPlugin(pluginName) { - //get the config - const configPath = path.resolve(process.cwd(), 'patternlab-config.json'); - const config = fs.readJSONSync(path.resolve(configPath), 'utf8'); - const plugin_manager = new pm(config, configPath); - - plugin_manager.install_plugin(pluginName); - } - /** * Given a path, load info from the folder to compile into a single config object. * @param dataFilesPath @@ -564,7 +336,12 @@ module.exports = class PatternLab { this.patterns.map(pattern => { return processIterative(pattern, self); }) - ); + ).then(() => { + // patterns sorted by name so the patterntype and patternsubtype is adhered to for menu building + this.patterns.sort((pattern1, pattern2) => + pattern1.name.localeCompare(pattern2.name) + ); + }); }); } diff --git a/packages/core/src/lib/plugin_manager.js b/packages/core/src/lib/plugin_manager.js index 6a5103b82..9816ff99d 100644 --- a/packages/core/src/lib/plugin_manager.js +++ b/packages/core/src/lib/plugin_manager.js @@ -1,133 +1,74 @@ 'use strict'; -const plugin_manager = function(config, configPath) { +const plugin_manager = function() { const path = require('path'); - const fs = require('fs-extra'); const logger = require('./log'); + const pluginMatcher = /^plugin-(.*)$/; + /** * Loads a plugin * - * @param pluginName {string} the name of the plugin + * @param modulePath {string} the path to the plugin * @return {object} the loaded plugin */ - function loadPlugin(pluginName) { - return require(path.join(process.cwd(), 'node_modules', pluginName)); + function loadPlugin(modulePath) { + return require(modulePath); } /** - * Installs a plugin - * - * @param pluginName {string} the name of the plugin + * Given a path: return the plugin name if the path points to a valid plugin + * module directory, or false if it doesn't. + * @param filePath + * @returns Plugin name if exists or FALSE */ - function installPlugin(pluginName) { - try { - const pluginPath = path.resolve( - path.join(process.cwd(), 'node_modules', pluginName) - ); - logger.debug(`Attempting to load plugin from ${pluginPath}`); - let pluginDirStats; - try { - pluginDirStats = fs.statSync(pluginPath); - } catch (ex) { - logger.warning(`${pluginName} not found, use npm to install it first.`); - logger.warning(`${pluginName} not loaded.`); - return; - } - const pluginPathDirExists = pluginDirStats.isDirectory(); - if (pluginPathDirExists) { - const diskConfig = fs.readJSONSync(path.resolve(configPath), 'utf8'); - - //add the plugin entry to patternlab-config.json - if (!diskConfig.plugins) { - diskConfig.plugins = {}; - } - - if (!diskConfig.plugins[pluginName]) { - diskConfig.plugins[pluginName] = { - enabled: true, - initialized: false, - }; - } + function isPlugin(filePath) { + const baseName = path.basename(filePath); + const pluginMatch = baseName.match(pluginMatcher); - const pluginPathConfig = path.resolve(pluginPath, 'config.json'); - try { - const pluginConfigJSON = require(pluginPathConfig); - if (!diskConfig.plugins[pluginName].options) { - diskConfig.plugins[pluginName].options = pluginConfigJSON; - } - } catch (ex) { - //a config.json file is not required at this time - } - - //write config entry back - fs.outputFileSync( - path.resolve(configPath), - JSON.stringify(diskConfig, null, 2) - ); - - logger.info('Plugin ' + pluginName + ' installed.'); - logger.info('Plugin configration added to patternlab-config.json.'); - } - } catch (ex) { - logger.warning( - `An error occurred during plugin installation for plugin ${pluginName}` - ); - logger.warning(ex); + if (pluginMatch) { + return pluginMatch[1]; } + return false; } /** - * Detect installed plugins - * - * @return {array} list of installed plugins + * Looks for installed plugins, loads them, and invokes them + * @param {object} patternlab */ - function detectPlugins() { - const node_modules_path = path.join(process.cwd(), 'node_modules'); - return fs.readdirSync(node_modules_path).filter(function(dir) { - const module_path = path.join(process.cwd(), 'node_modules', dir); - return ( - fs.statSync(module_path).isDirectory() && - dir.indexOf('plugin-node-') === 0 - ); + function initializePlugins(patternlab) { + const foundPlugins = Object.keys(patternlab.config.plugins || {}); + foundPlugins.forEach(plugin => { + logger.info(`Found plugin: ${plugin}`); + logger.info(`Attempting to load and initialize plugin.`); + const pluginModule = loadPlugin(plugin); + pluginModule(patternlab); }); } - /** - * Disables an installed plugin - * Not implemented yet - */ - function disablePlugin(pluginName) { - logger.warning( - `disablePlugin() not implemented yet. No change made to state of plugin ${pluginName}` - ); - } + async function raiseEvent(patternlab, eventName, args) { + patternlab.events.emit(eventName, args); + await (async function() { + const hookHandlers = (patternlab.hooks[eventName] || []).map(h => + h(args) + ); - /** - * Enables an installed plugin - * Not implemented yet - */ - function enablePlugin(pluginName) { - logger.warning( - `enablePlugin() not implemented yet. No change made to state of plugin ${pluginName}` - ); + await Promise.all(hookHandlers); + })(); } return { - install_plugin: function(pluginName) { - installPlugin(pluginName); - }, - load_plugin: function(pluginName) { - return loadPlugin(pluginName); + intialize_plugins: patternlab => { + initializePlugins(patternlab); }, - detect_plugins: function() { - return detectPlugins(); + load_plugin: modulePath => { + return loadPlugin(modulePath); }, - disable_plugin: function(pluginName) { - disablePlugin(pluginName); + is_plugin: filePath => { + return isPlugin(filePath); }, - enable_plugin: function(pluginName) { - enablePlugin(pluginName); + raiseEvent: async (patternlab, eventName, ...args) => { + await raiseEvent(patternlab, eventName, args); }, }; }; diff --git a/packages/core/src/lib/processMetaPattern.js b/packages/core/src/lib/processMetaPattern.js index 66ca99586..f793a103a 100644 --- a/packages/core/src/lib/processMetaPattern.js +++ b/packages/core/src/lib/processMetaPattern.js @@ -21,9 +21,7 @@ module.exports = function(fileName, metaType, patternlab) { }) .catch(reason => { logger.warning( - `Could not find the user-editable template ${fileName}, currently configured to be at ${ - patternlab.config.paths.source.meta - }. Your configured path may be incorrect (check paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.` + `Could not find the user-editable template ${fileName}, currently configured to be at ${patternlab.config.paths.source.meta}. Your configured path may be incorrect (check paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.` ); logger.warning(reason); }); diff --git a/packages/core/src/lib/pseudopattern_hunter.js b/packages/core/src/lib/pseudopattern_hunter.js index 33c7d2ee2..b95dd37f1 100644 --- a/packages/core/src/lib/pseudopattern_hunter.js +++ b/packages/core/src/lib/pseudopattern_hunter.js @@ -12,6 +12,7 @@ const logger = require('./log'); const readDocumentation = require('./readDocumentation'); const lineage_hunter = new lh(); const changes_hunter = new ch(); +const yaml = require('js-yaml'); const pseudopattern_hunter = function() {}; @@ -22,9 +23,12 @@ pseudopattern_hunter.prototype.find_pseudopatterns = function( const paths = patternlab.config.paths; //look for a pseudo pattern by checking if there is a file containing same - //name, with ~ in it, ending in .json + //name, with ~ in it, ending in .json, .yml or .yaml const needle = - currentPattern.subdir + '/' + currentPattern.fileName + '~*.json'; + currentPattern.subdir + + '/' + + currentPattern.fileName + + '~*.{json,yml,yaml}'; const pseudoPatterns = glob.sync(needle, { cwd: paths.source.patterns, debug: false, @@ -45,12 +49,12 @@ pseudopattern_hunter.prototype.find_pseudopatterns = function( paths.source.patterns, pseudoPatterns[i] ); - variantFileData = fs.readJSONSync(variantFileFullPath); + variantFileData = yaml.safeLoad( + fs.readFileSync(variantFileFullPath, 'utf8') + ); } catch (err) { logger.warning( - `There was an error parsing pseudopattern JSON for ${ - currentPattern.relPath - }` + `There was an error parsing pseudopattern JSON for ${currentPattern.relPath}` ); logger.warning(err); } @@ -65,9 +69,13 @@ pseudopattern_hunter.prototype.find_pseudopatterns = function( const variantName = pseudoPatterns[i] .substring(pseudoPatterns[i].indexOf('~') + 1) .split('.')[0]; + const variantExtension = pseudoPatterns[i] + .split('.') + .slice(-1) + .pop(); const variantFilePath = path.join( currentPattern.subdir, - currentPattern.fileName + '~' + variantName + '.json' + currentPattern.fileName + '~' + variantName + '.' + variantExtension ); const lm = fs.statSync(variantFileFullPath); const patternVariant = Pattern.create( diff --git a/packages/core/src/lib/readDocumentation.js b/packages/core/src/lib/readDocumentation.js index d22c6fa88..2670bb307 100644 --- a/packages/core/src/lib/readDocumentation.js +++ b/packages/core/src/lib/readDocumentation.js @@ -64,9 +64,7 @@ module.exports = function(pattern, patternlab) { // do nothing when file not found if (err.code !== 'ENOENT') { logger.warning( - `'there was an error setting pattern keys after markdown parsing of the companion file for pattern ${ - pattern.patternPartial - }` + `'there was an error setting pattern keys after markdown parsing of the companion file for pattern ${pattern.patternPartial}` ); logger.warning(err); } diff --git a/packages/core/src/lib/serve.js b/packages/core/src/lib/serve.js deleted file mode 100644 index 998e0a796..000000000 --- a/packages/core/src/lib/serve.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -const path = require('path'); -const liveServer = require('@pattern-lab/live-server'); - -const events = require('./events'); -const logger = require('./log'); - -const serve = patternlab => { - let serverReady = false; - - // our default liveserver config - const defaults = { - root: patternlab.config.paths.public.root, - open: true, - ignore: path.join(path.resolve(patternlab.config.paths.public.root)), - file: 'index.html', - logLevel: 0, // errors only - wait: 1000, - port: 3000, - }; - - // allow for overrides should they exist inside patternlab-config.json - const liveServerConfig = Object.assign( - {}, - defaults, - patternlab.config.serverOptions - ); - - // watch for asset changes, and reload appropriately - patternlab.events.on(events.PATTERNLAB_PATTERN_ASSET_CHANGE, data => { - if (serverReady) { - if (data.file.indexOf('css') > -1) { - liveServer.refreshCSS(); - } else { - liveServer.reload(); - } - } - }); - - //watch for pattern changes, and reload - patternlab.events.on(events.PATTERNLAB_PATTERN_CHANGE, () => { - if (serverReady) { - liveServer.reload(); - } - }); - - //start! - setTimeout(() => { - liveServer.start(liveServerConfig); - logger.info( - `Pattern Lab is being served from http://127.0.0.1:${ - liveServerConfig.port - }` - ); - serverReady = true; - }, liveServerConfig.wait); -}; - -module.exports = serve; diff --git a/packages/core/src/lib/server.js b/packages/core/src/lib/server.js new file mode 100644 index 000000000..c55e2c4ab --- /dev/null +++ b/packages/core/src/lib/server.js @@ -0,0 +1,140 @@ +'use strict'; + +const path = require('path'); +const liveServer = require('@pattern-lab/live-server'); + +const events = require('./events'); +const logger = require('./log'); + +const server = patternlab => { + const _module = { + serve: () => { + let serverReady = false; + + // our default liveserver config + const defaults = { + open: true, + file: 'index.html', + logLevel: 0, // errors only + wait: 1000, + port: 3000, + }; + + const servers = Object.keys(patternlab.uikits).map(kit => { + const uikit = patternlab.uikits[kit]; + defaults.root = path.resolve( + path.join( + process.cwd(), + uikit.outputDir, + patternlab.config.paths.public.root + ) + ); + defaults.ignore = path.resolve( + path.join( + process.cwd(), + uikit.outputDir, + patternlab.config.paths.public.root + ) + ); + defaults.assets = [ + path.resolve( + path.join( + process.cwd(), + patternlab.config.paths.source.js, + '**', + '*.js' // prevent preprocessors like typescript from reloading + ) + ), + path.resolve( + path.join(process.cwd(), patternlab.config.paths.source.images) + ), + path.resolve( + path.join(process.cwd(), patternlab.config.paths.source.fonts) + ), + path.resolve( + path.join( + process.cwd(), + patternlab.config.paths.source.css, + '**', + '*.css' // prevent preprocessors from reloading + ) + ), + ]; + + // allow for overrides should they exist inside patternlab-config.json + const liveServerConfig = Object.assign( + {}, + defaults, + patternlab.config.serverOptions + ); + + const setupEventWatchers = () => { + //watch for builds to complete + patternlab.events.on(events.PATTERNLAB_BUILD_END, () => { + if (serverReady) { + _module.reload({ + file: '', + action: 'reload', + }); + } + }); + }; + + //start! + //There is a new server instance for each uikit + const serveKit = new Promise((resolve, reject) => { + let resolveMsg = ''; + setTimeout(() => { + try { + liveServer.start(liveServerConfig); + resolveMsg = `Pattern Lab is being served from http://127.0.0.1:${liveServerConfig.port}`; + logger.info(resolveMsg); + } catch (e) { + const err = `Pattern Lab serve failed to start: ${e}`; + logger.error(`Pattern Lab serve failed to start: ${e}`); + reject(err); + } + setupEventWatchers(); + serverReady = true; + resolve(resolveMsg); + }, liveServerConfig.wait); + }); + return serveKit; + }); + + return Promise.all(servers); + }, + reload: data => { + const _data = data || { + file: '', + action: '', + }; + return new Promise((resolve, reject) => { + let action; + try { + if (!patternlab.isBusy) { + if (_data.file.indexOf('css') > -1 || _data.action === 'refresh') { + action = 'refreshed CSS'; + liveServer.refreshCSS(); + } else { + action = 'reloaded'; + liveServer.reload(); + } + resolve(`Server ${action} successfully`); + } + } catch (e) { + reject(`Server reload or refresh failed: ${e}`); + } + }); + }, + refreshCSS: () => { + return _module.reload({ + file: '', + action: 'refresh', + }); + }, + }; + return _module; +}; + +module.exports = server; diff --git a/packages/core/src/lib/starterkit_manager.js b/packages/core/src/lib/starterkit_manager.js index 7ebd38501..d11e5f2a4 100644 --- a/packages/core/src/lib/starterkit_manager.js +++ b/packages/core/src/lib/starterkit_manager.js @@ -38,16 +38,12 @@ const starterkit_manager = function(config) { if (kitPathDirExists) { if (clean) { logger.info( - `Deleting contents of ${ - paths.source.root - } prior to starterkit load.` + `Deleting contents of ${paths.source.root} prior to starterkit load.` ); fs.emptyDirSync(paths.source.root); } else { logger.info( - `Overwriting contents of ${ - paths.source.root - } during starterkit load.` + `Overwriting contents of ${paths.source.root} during starterkit load.` ); } @@ -112,6 +108,7 @@ const starterkit_manager = function(config) { * * @return {array} List of starter kits installed */ + //TODO review for deletion or convert callers to use findModules() function detectStarterKits() { const node_modules_path = path.join(process.cwd(), 'node_modules'); const npm_modules = fs.readdirSync(node_modules_path).filter(function(dir) { diff --git a/packages/core/src/lib/ui_builder.js b/packages/core/src/lib/ui_builder.js index 4f780e92d..5dcb36986 100644 --- a/packages/core/src/lib/ui_builder.js +++ b/packages/core/src/lib/ui_builder.js @@ -6,6 +6,7 @@ const _ = require('lodash'); const of = require('./object_factory'); const Pattern = of.Pattern; const logger = require('./log'); +const uikitExcludePattern = require('./uikitExcludePattern'); //these are mocked in unit tests, so let them be overridden let render = require('./render'); //eslint-disable-line prefer-const @@ -64,18 +65,26 @@ const ui_builder = function() { * Returns whether or not the pattern should be excluded from direct rendering or navigation on the front end * @param pattern - the pattern to test for inclusion/exclusion * @param patternlab - global data store + * @param uikit - the current uikit being built * @returns boolean - whether or not the pattern is excluded */ - function isPatternExcluded(pattern, patternlab) { + function isPatternExcluded(pattern, patternlab, uikit) { let isOmitted; + // skip patterns that the uikit does not want to render + isOmitted = uikitExcludePattern(pattern, uikit); + if (isOmitted) { + logger.info( + `Omitting ${pattern.patternPartial} from styleguide patterns because its pattern state or tag is excluded within ${uikit.name}.` + ); + return true; + } + // skip underscore-prefixed files isOmitted = pattern.isPattern && pattern.fileName.charAt(0) === '_'; if (isOmitted) { - logger.debug( - `Omitting ${ - pattern.patternPartial - } from styleguide patterns because it has an underscore suffix.` + logger.info( + `Omitting ${pattern.patternPartial} from styleguide patterns because it has an underscore prefix.` ); return true; } @@ -83,10 +92,8 @@ const ui_builder = function() { //this is meant to be a homepage that is not present anywhere else isOmitted = pattern.patternPartial === patternlab.config.defaultPattern; if (isOmitted) { - logger.debug( - `Omitting ${ - pattern.patternPartial - } from styleguide patterns because it is defined as a defaultPattern.` + logger.info( + `Omitting ${pattern.patternPartial} from styleguide patterns because it is defined as a defaultPattern.` ); patternlab.defaultPattern = pattern; return true; @@ -97,10 +104,8 @@ const ui_builder = function() { pattern.relPath.charAt(0) === '_' || pattern.relPath.indexOf(path.sep + '_') > -1; if (isOmitted) { - logger.debug( - `Omitting ${ - pattern.patternPartial - } from styleguide patterns because its contained within an underscored directory.` + logger.info( + `Omitting ${pattern.patternPartial} from styleguide patterns because its contained within an underscored directory.` ); return true; } @@ -108,10 +113,8 @@ const ui_builder = function() { //this pattern is a head or foot pattern isOmitted = pattern.isMetaPattern; if (isOmitted) { - logger.debug( - `Omitting ${ - pattern.patternPartial - } from styleguide patterns because its a meta pattern.` + logger.info( + `Omitting ${pattern.patternPartial} from styleguide patterns because its a meta pattern.` ); return true; } @@ -197,9 +200,7 @@ const ui_builder = function() { if (!patternType) { logger.error( - `Could not find patternType ${ - pattern.patternType - }. This is a critical error.` + `Could not find patternType ${pattern.patternType}. This is a critical error.` ); } @@ -221,9 +222,7 @@ const ui_builder = function() { if (!patternSubType) { logger.error( - `Could not find patternType ${pattern.patternType}-${ - pattern.patternType - }. This is a critical error.` + `Could not find patternType ${pattern.patternType}-${pattern.patternType}. This is a critical error.` ); } @@ -333,9 +332,7 @@ const ui_builder = function() { const patternType = getPatternType(patternlab, pattern); if (!patternType) { logger.error( - `Could not find patternType ${ - pattern.patternType - }. This is a critical error.` + `Could not find patternType ${pattern.patternType}. This is a critical error.` ); } @@ -427,16 +424,21 @@ const ui_builder = function() { /** * Returns an object representing how the front end styleguide and navigation is structured * @param patternlab - global data store + * @param uikit - the current uikit being built * @returns ptterns grouped by type -> subtype like atoms -> global -> pattern, pattern, pattern */ - function groupPatterns(patternlab) { + function groupPatterns(patternlab, uikit) { const groupedPatterns = { patternGroups: {}, }; _.forEach(patternlab.patterns, function(pattern) { //ignore patterns we can omit from rendering directly - pattern.omitFromStyleguide = isPatternExcluded(pattern, patternlab); + pattern.omitFromStyleguide = isPatternExcluded( + pattern, + patternlab, + uikit + ); if (pattern.omitFromStyleguide) { return; } @@ -497,9 +499,9 @@ const ui_builder = function() { * @param patternPartial - a key used to identify the viewall page * @returns A promise which resolves with the HTML */ - function buildViewAllHTML(patternlab, patterns, patternPartial) { + function buildViewAllHTML(patternlab, patterns, patternPartial, uikit) { return render( - Pattern.createEmpty({ extendedTemplate: patternlab.viewAll }), + Pattern.createEmpty({ extendedTemplate: uikit.viewAll }), { //data partials: patterns, @@ -508,8 +510,8 @@ const ui_builder = function() { }, { //templates - patternSection: patternlab.patternSection, - patternSectionSubtype: patternlab.patternSectionSubType, + patternSection: uikit.patternSection, + patternSectionSubtype: uikit.patternSectionSubType, } ).catch(reason => { console.log(reason); @@ -524,7 +526,12 @@ const ui_builder = function() { * @param styleguidePatterns - the grouped set of patterns * @returns every built pattern and set of viewall patterns, so the styleguide can use it */ - function buildViewAllPages(mainPageHeadHtml, patternlab, styleguidePatterns) { + function buildViewAllPages( + mainPageHeadHtml, + patternlab, + styleguidePatterns, + uikit + ) { const paths = patternlab.config.paths; let patterns = []; let writeViewAllFile = true; @@ -533,20 +540,26 @@ const ui_builder = function() { const allPatternTypePromises = _.map( styleguidePatterns.patternGroups, (patternGroup, patternType) => { - let p; let typePatterns = []; let styleguideTypePatterns = []; const styleGuideExcludes = patternlab.config.styleGuideExcludes || patternlab.config.styleguideExcludes; - const subTypePromises = _.map( _.values(patternGroup), - (patternSubtypes, patternSubtype) => { - const patternPartial = patternType + '-' + patternSubtype; + (patternSubtypes, patternSubtype, originalPatternGroup) => { + let p; + const samplePattern = _.find(patternSubtypes, st => { + return !st.patternPartial.startsWith('viewall-'); + }); + const patternName = Object.keys( + _.values(originalPatternGroup)[patternSubtype] + )[1]; + const patternPartial = + patternType + '-' + samplePattern.patternSubType; //do not create a viewall page for flat patterns - if (patternType === patternSubtype) { + if (patternType === patternName) { writeViewAllFile = false; logger.debug( `skipping ${patternType} as flat patterns do not have view all pages` @@ -555,7 +568,7 @@ const ui_builder = function() { } //render the footer needed for the viewall template - return buildFooter(patternlab, 'viewall-' + patternPartial) + return buildFooter(patternlab, `viewall-${patternPartial}`, uikit) .then(footerHTML => { //render the viewall template by finding these smallest subtype-grouped patterns const subtypePatterns = sortPatterns(_.values(patternSubtypes)); @@ -570,11 +583,11 @@ const ui_builder = function() { styleGuideExcludes && styleGuideExcludes.length && _.some(styleGuideExcludes, function(exclude) { - return exclude === patternType + '/' + patternSubtype; + return exclude === patternType + '/' + patternName; }); if (omitPatternType) { logger.debug( - `Omitting ${patternType}/${patternSubtype} from building a viewall page because its patternSubGroup is specified in styleguideExcludes.` + `Omitting ${patternType}/${patternName} from building a viewall page because its patternSubGroup is specified in styleguideExcludes.` ); } else { styleguideTypePatterns = styleguideTypePatterns.concat( @@ -588,11 +601,18 @@ const ui_builder = function() { return buildViewAllHTML( patternlab, subtypePatterns, - patternPartial + patternPartial, + uikit ) .then(viewAllHTML => { - fs.outputFileSync( - paths.public.patterns + p.flatPatternPath + '/index.html', + return fs.outputFile( + path.join( + process.cwd(), + uikit.outputDir, + paths.public.patterns + + p.flatPatternPath + + '/index.html' + ), mainPageHeadHtml + viewAllHTML + footerHTML ); }) @@ -613,7 +633,8 @@ const ui_builder = function() { //render the footer needed for the viewall template return buildFooter( patternlab, - 'viewall-' + patternType + '-all' + 'viewall-' + patternType + '-all', + uikit ) .then(footerHTML => { //add any flat patterns @@ -638,13 +659,18 @@ const ui_builder = function() { return buildViewAllHTML( patternlab, typePatterns, - patternType + patternType, + uikit ) .then(viewAllHTML => { fs.outputFileSync( - paths.public.patterns + - anyPatternOfType.patternType + - '/index.html', + path.join( + process.cwd(), + uikit.outputDir, + paths.public.patterns + + anyPatternOfType.patternType + + '/index.html' + ), mainPageHeadHtml + viewAllHTML + footerHTML ); @@ -713,132 +739,160 @@ const ui_builder = function() { const paths = patternlab.config.paths; - //determine which patterns should be included in the front-end rendering - const styleguidePatterns = groupPatterns(patternlab); - - //set the pattern-specific header by compiling the general-header with data, and then adding it to the meta header - const headerPromise = render( - Pattern.createEmpty({ extendedTemplate: patternlab.header }), - { - cacheBuster: patternlab.cacheBuster, - } - ) - .then(headerPartial => { - const headFootData = patternlab.data; - headFootData.patternLabHead = headerPartial; - headFootData.cacheBuster = patternlab.cacheBuster; - return render(patternlab.userHead, headFootData); - }) - .catch(reason => { - console.log(reason); - logger.error('error during header render()'); - }); + const uikitPromises = _.map(patternlab.uikits, uikit => { + //determine which patterns should be included in the front-end rendering + const styleguidePatterns = groupPatterns(patternlab, uikit); - //set the pattern-specific footer by compiling the general-footer with data, and then adding it to the meta footer - const footerPromise = render( - Pattern.createEmpty({ extendedTemplate: patternlab.footer }), - { - patternData: '{}', - cacheBuster: patternlab.cacheBuster, - } - ) - .then(footerPartial => { - const headFootData = patternlab.data; - headFootData.patternLabFoot = footerPartial; - return render(patternlab.userFoot, headFootData); - }) - .catch(reason => { - console.log(reason); - logger.error('error during footer render()'); - }); + return new Promise(resolve => { + //set the pattern-specific header by compiling the general-header with data, and then adding it to the meta header + const headerPromise = render( + Pattern.createEmpty({ extendedTemplate: uikit.header }), + { + cacheBuster: patternlab.cacheBuster, + } + ) + .then(headerPartial => { + const headFootData = patternlab.data; + headFootData.patternLabHead = headerPartial; + headFootData.cacheBuster = patternlab.cacheBuster; + return render(patternlab.userHead, headFootData); + }) + .catch(reason => { + console.log(reason); + logger.error('error during header render()'); + }); - return Promise.all([headerPromise, footerPromise]).then( - headFootPromiseResults => { - //build the viewall pages - return buildViewAllPages( - headFootPromiseResults[0], - patternlab, - styleguidePatterns + //set the pattern-specific footer by compiling the general-footer with data, and then adding it to the meta footer + const footerPromise = render( + Pattern.createEmpty({ extendedTemplate: uikit.footer }), + { + patternData: '{}', + cacheBuster: patternlab.cacheBuster, + } ) - .then(allPatterns => { - //todo track down why we need to make this unique in the first place - const uniquePatterns = _.uniq( - _.flatMapDeep(allPatterns, pattern => { - return pattern; - }) - ); + .then(footerPartial => { + const headFootData = patternlab.data; + headFootData.patternLabFoot = footerPartial; + return render(patternlab.userFoot, headFootData); + }) + .catch(reason => { + console.log(reason); + logger.error('error during footer render()'); + }); - //add the defaultPattern if we found one - if (patternlab.defaultPattern) { - uniquePatterns.push(patternlab.defaultPattern); - addToPatternPaths(patternlab, patternlab.defaultPattern); - } + return Promise.all([headerPromise, footerPromise]).then( + headFootPromiseResults => { + //build the viewall pages - //build the main styleguide page - return render( - Pattern.createEmpty({ extendedTemplate: patternlab.viewAll }), - { - partials: uniquePatterns, - }, - { - patternSection: patternlab.patternSection, - patternSectionSubtype: patternlab.patternSectionSubType, - } + return buildViewAllPages( + headFootPromiseResults[0], + patternlab, + styleguidePatterns, + uikit ) - .then(styleguideHtml => { - fs.outputFileSync( - path.resolve(paths.public.styleguide, 'html/styleguide.html'), - headFootPromiseResults[0] + - styleguideHtml + - headFootPromiseResults[1] + .then(allPatterns => { + //todo track down why we need to make this unique in the first place + const uniquePatterns = _.uniq( + _.flatMapDeep(allPatterns, pattern => { + return pattern; + }) ); - logger.info('Built Pattern Lab front end'); - - //move the index file from its asset location into public root - let patternlabSiteHtml; - try { - patternlabSiteHtml = fs.readFileSync( - path.resolve(paths.source.styleguide, 'index.html'), - 'utf8' - ); - } catch (err) { - logger.error( - `Could not load one or more styleguidekit assets from ${ - paths.source.styleguide - }` - ); + //add the defaultPattern if we found one + if (patternlab.defaultPattern) { + uniquePatterns.push(patternlab.defaultPattern); + addToPatternPaths(patternlab, patternlab.defaultPattern); } - fs.outputFileSync( - path.resolve(paths.public.root, 'index.html'), - patternlabSiteHtml - ); - //write out patternlab.data object to be read by the client - exportData(patternlab); + //build the main styleguide page + return render( + Pattern.createEmpty({ + extendedTemplate: uikit.viewAll, + }), + { + partials: uniquePatterns, + }, + { + patternSection: uikit.patternSection, + patternSectionSubtype: uikit.patternSectionSubType, + } + ) + .then(styleguideHtml => { + fs.outputFileSync( + path.resolve( + path.join( + process.cwd(), + uikit.outputDir, + paths.public.styleguide, + 'html/styleguide.html' + ) + ), + headFootPromiseResults[0] + + styleguideHtml + + headFootPromiseResults[1] + ); + + logger.info('Built Pattern Lab front end'); + + //move the index file from its asset location into public root + let patternlabSiteHtml; + try { + patternlabSiteHtml = fs.readFileSync( + path.resolve( + path.join( + uikit.modulePath, + paths.source.styleguide, + 'index.html' + ) + ), + 'utf8' + ); + } catch (err) { + logger.error( + `Could not load one or more styleguidekit assets from ${paths.source.styleguide}` + ); + } + fs.outputFileSync( + path.resolve( + path.join( + process.cwd(), + uikit.outputDir, + paths.public.root, + 'index.html' + ) + ), + patternlabSiteHtml + ); + + //write out patternlab.data object to be read by the client + exportData(patternlab); + resolve(); + }) + .catch(reason => { + console.log(reason); + logger.error('error during buildFrontend()'); + }); }) .catch(reason => { console.log(reason); - logger.error('error during buildFrontend()'); + logger.error('error during buildViewAllPages()'); }); - }) - .catch(reason => { - console.log(reason); - logger.error('error during buildViewAllPages()'); - }); - } - ); + } + ); + }); + }); + return Promise.all(uikitPromises); } return { buildFrontend: function(patternlab) { return buildFrontend(patternlab); }, - isPatternExcluded: function(pattern, patternlab) { - return isPatternExcluded(pattern, patternlab); + isPatternExcluded: function(pattern, patternlab, uikit) { + return isPatternExcluded(pattern, patternlab, uikit); }, - groupPatterns: function(patternlab) { - return groupPatterns(patternlab); + groupPatterns: function(patternlab, uikit) { + return groupPatterns(patternlab, uikit); }, resetUIBuilderState: function(patternlab) { resetUIBuilderState(patternlab); @@ -846,12 +900,14 @@ const ui_builder = function() { buildViewAllPages: function( mainPageHeadHtml, patternlab, - styleguidePatterns + styleguidePatterns, + uikit ) { return buildViewAllPages( mainPageHeadHtml, patternlab, - styleguidePatterns + styleguidePatterns, + uikit ); }, }; diff --git a/packages/core/src/lib/uikitExcludePattern.js b/packages/core/src/lib/uikitExcludePattern.js new file mode 100644 index 000000000..61cddcb57 --- /dev/null +++ b/packages/core/src/lib/uikitExcludePattern.js @@ -0,0 +1,7 @@ +'use strict'; + +const uikitExcludePattern = (pattern, uikit) => { + const state = pattern.patternState; + return uikit.excludedPatternStates.includes(state); +}; +module.exports = uikitExcludePattern; diff --git a/packages/core/src/lib/watchAssets.js b/packages/core/src/lib/watchAssets.js index e0585edf5..f087b8a28 100644 --- a/packages/core/src/lib/watchAssets.js +++ b/packages/core/src/lib/watchAssets.js @@ -1,16 +1,23 @@ 'use strict'; const path = require('path'); +const _ = require('lodash'); const chokidar = require('chokidar'); const logger = require('./log'); let copyFile = require('./copyFile'); // eslint-disable-line prefer-const -function onWatchTripped(p, assetBase, basePath, dir, copyOptions) { +function onWatchTripped(patternlab, p, assetBase, basePath, dir, copyOptions) { const subPath = p.replace(assetBase, ''); - const destination = path.resolve(basePath, dir.public + '/' + subPath); - copyFile(p, destination, copyOptions); + _.each(patternlab.uikits, uikit => { + const destination = path.resolve( + basePath, + uikit.outputDir, + dir.public + '/' + subPath + ); + copyFile(p, destination, copyOptions); + }); } const watchAssets = ( @@ -22,13 +29,24 @@ const watchAssets = ( watchOnce ) => { const assetBase = path.resolve(basePath, dir.source); + const assetsToIgnore = patternlab.config.transformedAssetTypes + ? patternlab.config.transformedAssetTypes.join('|') + : ''; logger.debug(`Pattern Lab is watching ${assetBase} for changes`); if (patternlab.watchers[key]) { patternlab.watchers[key].close(); } const assetWatcher = chokidar.watch(assetBase, { - ignored: /(^|[\/\\])\../, + // *ignored* combines file types that the wrapper is watching, passed to pl config + // regex string escapes backslashes for JS + // second part of regex is holdover from existing ignore regex for '/index.html' and other + // files meant to be ignored, not based on file type + ignored: new RegExp( + `(?:(?:.*\\.(?:${assetsToIgnore})$)|(?:(^|[\\/\\\\])\\..))`, + 'i' + ), + // ignored: /(^|[\/\\])\../, //old version ignoreInitial: false, awaitWriteFinish: { stabilityThreshold: 200, @@ -40,10 +58,10 @@ const watchAssets = ( //watch for changes and copy assetWatcher .on('add', p => { - onWatchTripped(p, assetBase, basePath, dir, copyOptions); + onWatchTripped(patternlab, p, assetBase, basePath, dir, copyOptions); }) .on('change', p => { - onWatchTripped(p, assetBase, basePath, dir, copyOptions); + onWatchTripped(patternlab, p, assetBase, basePath, dir, copyOptions); }); patternlab.watchers[key] = assetWatcher; diff --git a/packages/core/src/lib/watchPatternLabFiles.js b/packages/core/src/lib/watchPatternLabFiles.js index 7a1c390c2..f5ab0c1aa 100644 --- a/packages/core/src/lib/watchPatternLabFiles.js +++ b/packages/core/src/lib/watchPatternLabFiles.js @@ -4,6 +4,8 @@ const path = require('path'); const logger = require('./log'); const events = require('./events'); +const pm = require('./plugin_manager'); +const pluginMananger = new pm(); let chokidar = require('chokidar'); // eslint-disable-line prefer-const @@ -19,11 +21,11 @@ const watchPatternLabFiles = ( assetDirectories.source.meta, ]; const globalPaths = globalSources.map(globalSource => - path.join(basePath, globalSource, '*') + path.join(path.resolve(basePath, globalSource), '*') ); _.each(globalPaths, globalPath => { - logger.debug(`Pattern Lab is watching ${globalPath} for changes`); + logger.debug(`Pattern Lab is watching ${globalPath} for changes!`); if (patternlab.watchers[globalPath]) { patternlab.watchers[globalPath].close(); @@ -41,20 +43,32 @@ const watchPatternLabFiles = ( //watch for changes and rebuild globalWatcher - .on('addDir', p => { - patternlab.events.emit(events.PATTERNLAB_GLOBAL_CHANGE, { - file: p, - }); + .on('addDir', async p => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_GLOBAL_CHANGE, + { + file: p, + } + ); }) - .on('add', p => { - patternlab.events.emit(events.PATTERNLAB_GLOBAL_CHANGE, { - file: p, - }); + .on('add', async p => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_GLOBAL_CHANGE, + { + file: p, + } + ); }) - .on('change', p => { - patternlab.events.emit(events.PATTERNLAB_GLOBAL_CHANGE, { - file: p, - }); + .on('change', async p => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_GLOBAL_CHANGE, + { + file: p, + } + ); }); patternlab.watchers[globalPath] = globalWatcher; @@ -66,13 +80,14 @@ const watchPatternLabFiles = ( .concat(patternlab.engines.getSupportedFileExtensions()) .map(dotExtension => path.join( - basePath, - assetDirectories.source.patterns, + path.resolve(basePath, assetDirectories.source.patterns), `/**/*${dotExtension}` ) ); _.each(patternWatches, patternWatchPath => { - logger.debug(`Pattern Lab is watching ${patternWatchPath} for changes`); + logger.debug( + `Pattern Lab is watching ${patternWatchPath} for changes - local!` + ); if (patternlab.watchers[patternWatchPath]) { patternlab.watchers[patternWatchPath].close(); @@ -90,29 +105,39 @@ const watchPatternLabFiles = ( //watch for changes and rebuild patternWatcher - .on('addDir', p => { - patternlab.events.emit(events.PATTERNLAB_PATTERN_CHANGE, { - file: p, - }); + .on('addDir', async p => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_PATTERN_CHANGE, + { + file: p, + } + ); }) - .on('add', p => { - patternlab.events.emit(events.PATTERNLAB_PATTERN_CHANGE, { - file: p, - }); + .on('add', async p => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_PATTERN_CHANGE, + { + file: p, + } + ); }) - .on('change', p => { - patternlab.events.emit(events.PATTERNLAB_PATTERN_CHANGE, { - file: p, - }); + .on('change', async p => { + await pluginMananger.raiseEvent( + patternlab, + events.PATTERNLAB_PATTERN_CHANGE, + { + file: p, + } + ); }); patternlab.watchers[patternWatchPath] = patternWatcher; }); logger.info( - `Pattern Lab is watching for changes to files under ${ - assetDirectories.source.root - }` + `Pattern Lab is watching for changes to files under ${assetDirectories.source.root}` ); return Promise.resolve(); }; diff --git a/packages/core/test/help_tests.js b/packages/core/test/help_tests.js deleted file mode 100644 index 847c77a52..000000000 --- a/packages/core/test/help_tests.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -const tap = require('tap'); -const help = require('../src/lib/help'); - -tap.test('help - includes passed in version number', function(test) { - //arrange - const version = '⚡'; - - //act - const result = help(version).trim(); - - //assert - test.ok(result.startsWith(`Pattern Lab Node v${version}`)); - test.end(); -}); diff --git a/packages/core/test/index_tests.js b/packages/core/test/index_tests.js index 496a99a90..d2e98895e 100644 --- a/packages/core/test/index_tests.js +++ b/packages/core/test/index_tests.js @@ -3,11 +3,15 @@ const rewire = require('rewire'); const _ = require('lodash'); const fs = require('fs-extra'); const get = require('../src/lib/get'); +const events = require('../src/lib/events'); const util = require('./util/test_utils.js'); const entry = rewire('../src/index'); const defaultConfig = require('../patternlab-config.json'); -var testConfig = require('./util/patternlab-config.json'); +const testConfig = require('./util/patternlab-config.json'); +const packageInfo = require('./../package'); + +process.env.PATTERNLAB_ENV = 'CI'; //set up a global mocks - we don't want to be writing/rendering any files right now @@ -42,6 +46,10 @@ const fsMock = { }, }; +const buildPatternsMock = () => { + return Promise.resolve(); +}; + //set our mocks in place of usual require() entry.__set__({ ui_builder: uiBuilderMock, @@ -49,19 +57,102 @@ entry.__set__({ copier: copierMock, }); -tap.test('getDefaultConfig - should return the default config object', function( - test -) { - const requestedConfig = entry.getDefaultConfig(); - test.type(requestedConfig, 'object'); - test.equals(requestedConfig, defaultConfig); +tap.test('version - should call patternlab.getVersion', test => { + //arrange + const pl = new entry(testConfig); + + //act + //assert + test.equals(pl.version(), packageInfo.version); test.end(); }); -tap.test('buildPatterns', function() { +tap.test( + 'getDefaultConfig - static method should return the default config object', + test => { + const requestedConfig = entry.getDefaultConfig(); + test.type(requestedConfig, 'object'); + test.equals(requestedConfig, defaultConfig); + test.end(); + } +); + +tap.test( + 'getDefaultConfig - instance method should return the default config object', + test => { + //arrange + const pl = new entry(testConfig); + + //act + //assert + const requestedConfig = pl.getDefaultConfig(); + test.type(requestedConfig, 'object'); + test.equals(requestedConfig, defaultConfig); + test.end(); + } +); + +tap.test('patternsonly a promise', test => { + //arrange + const revert = entry.__set__('buildPatterns', buildPatternsMock); + const pl = new entry(testConfig); + + //act + test.resolves(pl.patternsonly({})).then(() => { + revert(); + test.end(); + }); +}); + +tap.test('patternsonly calls buildPatterns', test => { + //arrange + const revert = entry.__set__( + 'buildPatterns', + (cleanPublic, patternlab, data) => { + test.type(cleanPublic, 'boolean'); + test.ok(cleanPublic); + test.type(patternlab, 'object'); + test.type(data, 'object'); + test.equals(data.foo, 'bar'); + return Promise.resolve(); + } + ); + const pl = new entry(testConfig); + + //act + test + .resolves(pl.patternsonly({ cleanPublic: true, data: { foo: 'bar' } })) + .then(() => { + revert(); + test.end(); + }); +}); + +tap.test('serve calls serve', test => { + //arrange + const revert = entry.__set__('serverModule', patternlab => { + return { + serve: () => { + test.ok(1); + test.type(patternlab, 'object'); + }, + reload: () => {}, + }; + }); + + const pl = new entry(testConfig); + + //act + test.resolves(pl.server.serve({})).then(() => { + revert(); + test.end(); + }); +}); + +tap.test('buildPatterns suite', test => { //arrange - var patternExporterMock = { + const patternExporterMock = { /* In this suite, we actually take advantage of the pattern export functionality post-build to inspect what the contents of the patterns look like. This, coupled with a mocking of fs and the ui_builder, allow us to focus @@ -130,7 +221,6 @@ tap.test('buildPatterns', function() { tap.test('uses global listItem property', test => { var pattern = get('test-listWithPartial', patternlab); - console.log(pattern.patternPartialCode); let assertionCount = 0; ['dA', 'dB', 'dC'].forEach(d => { if (pattern.patternPartialCode.indexOf(d) > -1) { @@ -212,6 +302,8 @@ tap.test('buildPatterns', function() { // test.equals(util.sanitized(pattern.patternPartialCode), util.sanitized(`

Single-quoted

Double-quoted

With attributes

`)); // test.end(); // }); + + process.env.PATTERNLAB_ENV = ''; }, }; @@ -220,14 +312,26 @@ tap.test('buildPatterns', function() { }); testConfig.patternExportPatternPartials = ['test-paramParent']; - var pl = new entry(testConfig); + const pl = new entry(testConfig); + + test.equals(pl.events.eventNames().length, 0); //act - return pl.build({ - cleanPublic: true, - data: { - foo: 'Bar', - description: 'Baz', - }, - }); + return pl + .build({ + cleanPublic: true, + data: { + foo: 'Bar', + description: 'Baz', + }, + }) + .then(() => { + test.equals( + pl.events.eventNames().length, + 2, + 'should register two events' + ); + test.equals(pl.events.listenerCount(events.PATTERNLAB_PATTERN_CHANGE), 1); + test.equals(pl.events.listenerCount(events.PATTERNLAB_GLOBAL_CHANGE), 1); + }); }); diff --git a/packages/core/test/loaduitkits_tests.js b/packages/core/test/loaduitkits_tests.js new file mode 100644 index 000000000..23bdcd656 --- /dev/null +++ b/packages/core/test/loaduitkits_tests.js @@ -0,0 +1,150 @@ +'use strict'; + +const tap = require('tap'); +const rewire = require('rewire'); + +const logger = require('../src/lib/log'); +const loaduikits = rewire('../src/lib/loaduikits'); + +const testConfig = require('./util/patternlab-config.json'); + +const findModulesMock = function() { + return [ + { + name: 'foo', + modulePath: 'node_modules/@pattern-lab/uikit-foo', + }, + { + name: 'bar', + modulePath: 'node_modules/@pattern-lab/uikit-bar', + }, + { + name: 'baz', + modulePath: 'node_modules/@pattern-lab/uikit-baz', + }, + { + name: 'polyfills', + modulePath: 'node_modules/@pattern-lab/uikit-polyfills', + }, + ]; +}; + +const fsMock = { + readFileSync: function(path, encoding) { + return 'file'; + }, +}; + +loaduikits.__set__({ + findModules: findModulesMock, + fs: fsMock, +}); + +logger; + +tap.test('loaduitkits - does not warn on uikit-polyfills', test => { + //arrange + const patternlab = { + config: testConfig, + uikits: {}, + }; + + patternlab.config.logLevel = 'warning'; + logger.log.on('warning', msg => test.notOk(msg.includes('uikit-polyfills'))); + + const uikitFoo = { + name: 'uikit-foo', + enabled: true, + outputDir: 'foo', + excludedPatternStates: ['legacy'], + excludedTags: ['baz'], + }; + + patternlab.config.uikits = [uikitFoo]; + + //act + loaduikits(patternlab).then(() => { + logger.warning = () => {}; + test.done(); + }); +}); + +tap.test('loaduikits - maps fields correctly', function(test) { + //arrange + const patternlab = { + config: testConfig, + uikits: {}, + }; + + const uikitFoo = { + name: 'uikit-foo', + enabled: true, + outputDir: 'foo', + excludedPatternStates: ['legacy'], + excludedTags: ['baz'], + }; + + patternlab.config.uikits = [uikitFoo]; + + //act + loaduikits(patternlab).then(() => { + //assert + test.equals(patternlab.uikits['uikit-foo'].name, uikitFoo.name); + test.equals( + patternlab.uikits['uikit-foo'].modulePath, + 'node_modules/@pattern-lab/uikit-foo' + ); + test.ok(patternlab.uikits['uikit-foo'].enabled); + test.equals(patternlab.uikits['uikit-foo'].outputDir, uikitFoo.outputDir); + test.equals( + patternlab.uikits['uikit-foo'].excludedPatternStates, + uikitFoo.excludedPatternStates + ); + test.equals( + patternlab.uikits['uikit-foo'].excludedTags, + uikitFoo.excludedTags + ); + test.end(); + }); +}); + +tap.test('loaduikits - only adds files for enabled uikits', function(test) { + //arrange + const patternlab = { + config: testConfig, + uikits: {}, + }; + + patternlab.config.uikits = [ + { + name: 'uikit-foo', + enabled: true, + outputDir: 'foo', + excludedPatternStates: ['legacy'], + excludedTags: ['baz'], + }, + { + name: 'uikit-bar', + enabled: true, + outputDir: 'bar', + excludedPatternStates: ['development'], + excludedTags: ['baz', 'foo'], + }, + { + name: 'uikit-baz', + enabled: false, + outputDir: 'baz', + excludedPatternStates: [''], + excludedTags: [], + }, + ]; + + //act + loaduikits(patternlab).then(() => { + //assert + test.ok(patternlab.uikits['uikit-foo']); + test.ok(patternlab.uikits['uikit-bar']); + test.notOk(patternlab.uikits['uikit-baz']); + test.end(); + }); +}); diff --git a/packages/core/test/object_factory_tests.js b/packages/core/test/object_factory_tests.js index 463dce978..910c02d89 100644 --- a/packages/core/test/object_factory_tests.js +++ b/packages/core/test/object_factory_tests.js @@ -63,6 +63,60 @@ tap.test('test Pattern initializes correctly', function(test) { test.end(); }); +tap.test( + 'test Pattern initializes correctly with pattern in sepatated directory', + function(test) { + var p = new Pattern('00-atoms/00-global/00-colors/colors.mustache', { + d: 123, + }); + test.equals( + p.relPath, + '00-atoms' + + path.sep + + '00-global' + + path.sep + + '00-colors' + + path.sep + + 'colors.mustache' + ); + test.equals(p.name, '00-atoms-00-global'); + test.equals(p.subdir, '00-atoms' + path.sep + '00-global'); + test.equals(p.fileName, 'colors'); + test.equals(p.fileExtension, '.mustache'); + test.equals(p.jsonFileData.d, 123); + test.equals(p.patternBaseName, 'colors'); + test.equals(p.patternName, 'Colors'); + test.equals( + p.getPatternLink(pl), + '00-atoms-00-global' + path.sep + '00-atoms-00-global.rendered.html' + ); + test.equals(p.patternGroup, 'atoms'); + test.equals(p.patternSubGroup, 'global'); //because of p.info.hasDir + test.equals(p.flatPatternPath, '00-atoms-00-global'); + test.equals(p.patternPartial, 'atoms-colors'); + test.equals(p.template, ''); + test.equals(p.patternPartialCode, ''); + test.equals(p.lineage.length, 0); + test.equals(p.lineageIndex.length, 0); + test.equals(p.lineageR.length, 0); + test.equals(p.lineageRIndex.length, 0); + test.equals(p.patternState, ''); + test.end(); + } +); + +tap.test('test Pattern name for variants correctly initialzed', function(test) { + var p1 = new Pattern('00-atoms/00-global/colors~variant.mustache', { + d: 123, + }); + var p2 = new Pattern('00-atoms/00-global/colors~variant-minus.json', { + d: 123, + }); + test.equals(p1.name, '00-atoms-00-global-colors-variant'); + test.equals(p2.name, '00-atoms-00-global-colors-variant-minus'); + test.end(); +}); + tap.test('test Pattern with one-directory subdir works as expected', function( test ) { @@ -118,6 +172,58 @@ tap.test('test Pattern capitalizes patternDisplayName correctly', function( test.end(); }); +tap.test('test Pattern get dir level no separated pattern directory', function( + test +) { + var p = new Pattern('00-atoms/00-global/00-colors-alt.mustache', { d: 123 }); + console.log(p); + test.equals(p.getDirLevel(0, { hasDir: false, dirLevel: 2 }), '00-atoms'); + test.equals(p.getDirLevel(1, { hasDir: false, dirLevel: 2 }), '00-global'); + test.equals(p.getDirLevel(3, { hasDir: false, dirLevel: 2 }), ''); + var p = new Pattern('00-atoms/00-colors-alt.mustache', { d: 123 }); + test.equals(p.getDirLevel(0, { hasDir: false, dirLevel: 1 }), '00-atoms'); + test.equals(p.getDirLevel(1, { hasDir: false, dirLevel: 1 }), '00-atoms'); + test.equals(p.getDirLevel(3, { hasDir: false, dirLevel: 1 }), ''); + var p = new Pattern('00-colors-alt.mustache', { d: 123 }); + test.equals(p.getDirLevel(0, { hasDir: false, dirLevel: 0 }), ''); + test.equals(p.getDirLevel(1, { hasDir: false, dirLevel: 0 }), ''); + test.equals(p.getDirLevel(3, { hasDir: false, dirLevel: 0 }), ''); + test.end(); +}); + +tap.test( + 'test Pattern get dir level with separated pattern directory', + function(test) { + var p = new Pattern( + '00-atoms/00-global/00-colors-alt/colors-alt.mustache', + { d: 123 } + ); + test.equals(p.getDirLevel(0, { hasDir: true, dirLevel: 3 }), '00-atoms'); + test.equals(p.getDirLevel(1, { hasDir: true, dirLevel: 3 }), '00-global'); + test.equals(p.getDirLevel(3, { hasDir: true, dirLevel: 3 }), ''); + var p = new Pattern('00-atoms/00-colors-alt/colors-alt.mustache', { + d: 123, + }); + test.equals(p.getDirLevel(0, { hasDir: true, dirLevel: 2 }), '00-atoms'); + test.equals( + p.getDirLevel(1, { hasDir: true, dirLevel: 2 }), + '00-colors-alt' + ); + test.equals(p.getDirLevel(3, { hasDir: true, dirLevel: 2 }), ''); + var p = new Pattern('00-colors-alt/colors-alt.mustache', { d: 123 }); + test.equals( + p.getDirLevel(0, { hasDir: true, dirLevel: 1 }), + '00-colors-alt' + ); + test.equals( + p.getDirLevel(1, { hasDir: true, dirLevel: 1 }), + '00-colors-alt' + ); + test.equals(p.getDirLevel(3, { hasDir: true, dirLevel: 1 }), ''); + test.end(); + } +); + tap.test('The forms of Pattern.getPatternLink() work as expected', function( test ) { @@ -146,5 +252,11 @@ tap.test('The forms of Pattern.getPatternLink() work as expected', function( path.sep + '00-atoms-00-global-00-colors.markup-only.html' ); + test.equals( + p.getPatternLink(pl, 'custom', '.custom-extension'), + '00-atoms-00-global-00-colors' + + path.sep + + '00-atoms-00-global-00-colors.custom-extension' + ); test.end(); }); diff --git a/packages/core/test/parseAllLinks_tests.js b/packages/core/test/parseAllLinks_tests.js index 450229b94..271b3ee5b 100644 --- a/packages/core/test/parseAllLinks_tests.js +++ b/packages/core/test/parseAllLinks_tests.js @@ -1,22 +1,25 @@ 'use strict'; +const path = require('path'); const tap = require('tap'); +const fs = require('fs-extra'); -var loadPattern = require('../src/lib/loadPattern'); const addPattern = require('../src/lib/addPattern'); const parseAllLinks = require('../src/lib/parseAllLinks'); -var Pattern = require('../src/lib/object_factory').Pattern; -var PatternGraph = require('../src/lib/pattern_graph').PatternGraph; +const Pattern = require('../src/lib/object_factory').Pattern; +const PatternGraph = require('../src/lib/pattern_graph').PatternGraph; +const da = require('../src/lib/data_loader'); +const dataLoader = new da(); -var plMain = require('../src/lib/patternlab'); -var config = require('./util/patternlab-config.json'); +const util = require('./util/test_utils.js'); +const patterns_dir = './test/files/_patterns'; tap.test( 'parseDataLinks - replaces found link.* data for their expanded links', function(test) { //arrange - var patternlab = new plMain(config); + const patternlab = util.fakePatternLab(patterns_dir); patternlab.graph = PatternGraph.empty(); patternlab.patterns = [ @@ -26,7 +29,18 @@ tap.test( ]; patternlab.data.link = {}; - var navPattern = loadPattern('00-test/nav.mustache', patternlab); + // copies essential logic from loadPattern + const navPattern = new Pattern('00-test/nav.mustache'); + const patternData = dataLoader.loadDataFromFile( + path.resolve( + __dirname, + 'files/_patterns', + navPattern.subdir, + navPattern.fileName + ), + fs + ); + navPattern.jsonFileData = patternData; addPattern(navPattern, patternlab); //for the sake of the test, also imagining I have the following pages... @@ -38,8 +52,8 @@ tap.test( patternlab.data.dave = { url: 'link.twitter-dave' }; patternlab.data.brian = { url: 'link.twitter-brian' }; - var pattern; - for (var i = 0; i < patternlab.patterns.length; i++) { + let pattern; + for (let i = 0; i < patternlab.patterns.length; i++) { if (patternlab.patterns[i].patternPartial === 'test-nav') { pattern = patternlab.patterns[i]; } diff --git a/packages/core/test/pattern_graph_tests.js b/packages/core/test/pattern_graph_tests.js index f0e066da8..a2618031c 100644 --- a/packages/core/test/pattern_graph_tests.js +++ b/packages/core/test/pattern_graph_tests.js @@ -1,10 +1,12 @@ 'use strict'; +var path = require('path'); +var tap = require('tap'); + var PatternGraph = require('../src/lib/pattern_graph').PatternGraph; var VERSION = require('../src/lib/pattern_graph').PATTERN_GRAPH_VERSION; var Pattern = require('../src/lib/object_factory').Pattern; var CompileState = require('../src/lib/object_factory').CompileState; -var tap = require('tap'); const posixPath = require('./util/test_utils.js').posixPath; var config = require('./util/patternlab-config.json'); var engineLoader = require('../src/lib/pattern_engines'); @@ -35,13 +37,19 @@ tap.test('checkVersion - Older version returns false', test => { }); tap.test('Loading an empty graph works', test => { - var g = PatternGraph.loadFromFile(patternlab, 'does not exist'); + var g = PatternGraph.loadFromFile( + path.resolve(__dirname, 'public'), + 'does not exist' + ); tap.equal(g.graph.nodes().length, 0, 'foo'); test.end(); }); tap.test('PatternGraph.fromJson() - Loading a graph from JSON', test => { - var graph = PatternGraph.loadFromFile(patternlab, 'testDependencyGraph.json'); + var graph = PatternGraph.loadFromFile( + path.resolve(__dirname, 'public'), + 'testDependencyGraph.json' + ); test.same(graph.timestamp, 1337); test.same(graph.graph.nodes(), ['atom-foo', 'molecule-foo']); test.same(graph.graph.edges(), [{ v: 'molecule-foo', w: 'atom-foo' }]); diff --git a/packages/core/test/ui_builder_tests.js b/packages/core/test/ui_builder_tests.js index cbf2dc86d..607d9fd95 100644 --- a/packages/core/test/ui_builder_tests.js +++ b/packages/core/test/ui_builder_tests.js @@ -16,6 +16,7 @@ engineLoader.loadAllEngines(config); //set up a global mocks - we don't want to be writing/rendering any files right now var fsMock = { outputFileSync: function(path, data, cb) {}, + outputFile: function(path, data, cb) {}, }; var renderMock = function(template, data, partials) { @@ -32,6 +33,13 @@ uiModule.__set__({ buildFooter: buildFooterMock, }); +const uikit = { + name: 'uikit-workshop', + modulePath: '', + outputDir: 'test/output', + excludedPatternStates: [], +}; + var ui = uiModule(); function createFakePatternLab(customProps) { @@ -42,7 +50,7 @@ function createFakePatternLab(customProps) { patterns: './test/files/_patterns', }, public: { - patterns: './test/output', + patterns: '', }, }, styleGuideExcludes: ['templates'], @@ -54,6 +62,7 @@ function createFakePatternLab(customProps) { }, }, data: {}, + uikits: [uikit], }; return extend(pl, customProps); } @@ -66,7 +75,7 @@ tap.test( var pattern = new Pattern('00-test/_ignored-pattern.mustache'); //act - var result = ui.isPatternExcluded(pattern, patternlab); + var result = ui.isPatternExcluded(pattern, patternlab, uikit); //assert test.equals(result, true); @@ -83,7 +92,7 @@ tap.test( patternlab.config.defaultPattern = 'test-foo'; //act - var result = ui.isPatternExcluded(pattern, patternlab); + var result = ui.isPatternExcluded(pattern, patternlab, uikit); //assert test.equals(result, true); @@ -110,7 +119,7 @@ tap.test( }); //act - var result = ui.isPatternExcluded(pattern, patternlab); + var result = ui.isPatternExcluded(pattern, patternlab, uikit); //assert test.equals(result, true); @@ -132,7 +141,32 @@ tap.test( }); //act - var result = ui.isPatternExcluded(pattern, patternlab); + var result = ui.isPatternExcluded(pattern, patternlab, uikit); + + //assert + test.equals(result, true); + test.end(); + } +); + +tap.test( + 'isPatternExcluded - returns true when pattern state found withing uikit exclusions', + function(test) { + //arrange + var patternlab = createFakePatternLab({}); + var pattern = Pattern.createEmpty({ + relPath: + 'shown' + path.sep + '_patternsubtype' + path.sep + 'foo.mustache', + isPattern: true, + fileName: 'foo.mustache', + patternPartial: 'shown-foo', + patternState: 'complete', + }); + + //act + var result = ui.isPatternExcluded(pattern, patternlab, { + excludedPatternStates: 'complete', + }); //assert test.equals(result, true); @@ -161,7 +195,7 @@ tap.test('groupPatterns - creates pattern groups correctly', function(test) { ui.resetUIBuilderState(patternlab); //act - var result = ui.groupPatterns(patternlab); + var result = ui.groupPatterns(patternlab, uikit); test.equals( result.patternGroups.patternType1.patternSubType1.blue.patternPartial, @@ -224,7 +258,7 @@ tap.test('groupPatterns - orders patterns when provided from md', function( patternlab.patterns[1].order = 1; //act - ui.groupPatterns(patternlab); + ui.groupPatterns(patternlab, uikit); let patternType = _.find(patternlab.patternTypes, [ 'patternType', @@ -264,7 +298,7 @@ tap.test( patternlab.patterns[1].order = 'notanumber!'; //act - ui.groupPatterns(patternlab); + ui.groupPatterns(patternlab, uikit); let patternType = _.find(patternlab.patternTypes, [ 'patternType', @@ -307,7 +341,7 @@ tap.test( patternlab.patterns[2].order = 2; //act - ui.groupPatterns(patternlab); + ui.groupPatterns(patternlab, uikit); let patternType = _.find(patternlab.patternTypes, [ 'patternType', @@ -355,7 +389,7 @@ tap.test( ui.resetUIBuilderState(patternlab); //act - var result = ui.groupPatterns(patternlab); + var result = ui.groupPatterns(patternlab, uikit); //assert test.equals( @@ -398,7 +432,7 @@ tap.test( ui.resetUIBuilderState(patternlab); //act - var result = ui.groupPatterns(patternlab); + var result = ui.groupPatterns(patternlab, uikit); //assert test.equals(patternlab.patternPaths['test']['foo'], '00-test-foo'); @@ -455,7 +489,7 @@ tap.test( ui.resetUIBuilderState(patternlab); //act - var result = ui.groupPatterns(patternlab); + var result = ui.groupPatterns(patternlab, uikit); //assert test.equals('todo', 'todo'); @@ -509,11 +543,16 @@ tap.test( ); ui.resetUIBuilderState(patternlab); - const styleguidePatterns = ui.groupPatterns(patternlab); + const styleguidePatterns = ui.groupPatterns(patternlab, uikit); //act ui - .buildViewAllPages(mainPageHeadHtml, patternlab, styleguidePatterns) + .buildViewAllPages( + mainPageHeadHtml, + patternlab, + styleguidePatterns, + uikit + ) .then(allPatterns => { //assert //this was a nuanced one. buildViewAllPages() had return false; statements diff --git a/packages/core/test/uikitExcludePattern_tests.js b/packages/core/test/uikitExcludePattern_tests.js new file mode 100644 index 000000000..a31f4c3f3 --- /dev/null +++ b/packages/core/test/uikitExcludePattern_tests.js @@ -0,0 +1,53 @@ +'use strict'; + +const tap = require('tap'); + +const uikitExcludePattern = require('../src/lib/uikitExcludePattern'); + +tap.test( + 'uikitExcludePattern - returns false when uikit has no excluded states', + test => { + //arrange + const uikit = { excludedPatternStates: [] }; + const pattern = { patternState: 'complete' }; + + //act + const result = uikitExcludePattern(pattern, uikit); + + //assert + test.false(result); + test.end(); + } +); + +tap.test( + 'uikitExcludePattern - returns false pattern does not have same state as uikit exclusions', + test => { + //arrange + const uikit = { excludedPatternStates: ['complete'] }; + const pattern = { patternState: 'inprogress' }; + + //act + const result = uikitExcludePattern(pattern, uikit); + + //assert + test.false(result); + test.end(); + } +); + +tap.test( + 'uikitExcludePattern - returns true when uikit has same state as pattern', + test => { + //arrange + const uikit = { excludedPatternStates: ['inreview', 'complete'] }; + const pattern = { patternState: 'complete' }; + + //act + const result = uikitExcludePattern(pattern, uikit); + + //assert + test.true(result); + test.end(); + } +); diff --git a/packages/core/test/util/patternlab-config.json b/packages/core/test/util/patternlab-config.json index e6b5fed4d..c2edf9561 100644 --- a/packages/core/test/util/patternlab-config.json +++ b/packages/core/test/util/patternlab-config.json @@ -1,33 +1,33 @@ { "paths": { "source": { - "root": "./packages/core/test/files/", - "patterns": "./packages/core/test/files/_patterns/", - "data": "./packages/core/test/files/_data/", - "meta": "./packages/core/test/files/_meta/", - "styleguide": "./packages/core/test/files/styleguide/", + "root": "test/files/", + "patterns": "./test/files/_patterns/", + "data": "./test/files/_data/", + "meta": "./test/files/_meta/", + "styleguide": "./test/files/styleguide/", "patternlabFiles": { - "general-header": "./packages/core/test/files/partials/general-header.mustache", - "general-footer": "./packages/core/test/files/partials/general-footer.mustache", - "patternSection": "./packages/core/test/files/partials/patternSection.mustache", + "general-header": "./test/files/partials/general-header.mustache", + "general-footer": "./test/files/partials/general-footer.mustache", + "patternSection": "./test/files/partials/patternSection.mustache", "patternSectionSubtype": - "./packages/core/test/files/partials/patternSectionSubtype.mustache", - "viewall": "./packages/core/test/files/viewall.mustache" + "./test/files/partials/patternSectionSubtype.mustache", + "viewall": "./test/files/viewall.mustache" }, - "js": "./packages/core/test/files/js", - "images": "./packages/core/test/files/images", - "fonts": "./packages/core/test/files/fonts", - "css": "./packages/core/test/files/css/" + "js": "./test/files/js", + "images": "./test/files/images", + "fonts": "./test/files/fonts", + "css": "./test/files/css/" }, "public": { - "root": "./packages/core/test/public/", - "patterns": "./packages/core/test/public/patterns/", - "data": "./packages/core/test/public/data/", - "styleguide": "./packages/core/test/public/styleguide/", - "js": "./packages/core/test/public/js", - "images": "./packages/core/test/public/images", - "fonts": "./packages/core/test/public/fonts", - "css": "./packages/core/test/public/css" + "root": "public/", + "patterns": "public/patterns/", + "data": "public/data/", + "styleguide": "public/styleguide/", + "js": "public/js", + "images": "public/images", + "fonts": "public/fonts", + "css": "public/css" } }, "styleGuideExcludes": ["templates", "pages"], @@ -70,5 +70,14 @@ "color": "dark", "density": "compact", "layout": "horizontal" - } + }, + "uikits": [ + { + "name": "uikit-workshop", + "outputDir": "packages/core/test/", + "enabled": true, + "excludedPatternStates": [], + "excludedTags": [] + } + ] } diff --git a/packages/create/CHANGELOG.md b/packages/create/CHANGELOG.md new file mode 100644 index 000000000..f964faba6 --- /dev/null +++ b/packages/create/CHANGELOG.md @@ -0,0 +1,100 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [5.9.3](https://github.com/pattern-lab/patternlab-node/compare/v5.9.2...v5.9.3) (2020-05-01) + +**Note:** Version bump only for package create-pattern-lab + + + + + +## [5.9.1](https://github.com/pattern-lab/patternlab-node/compare/v5.9.0...v5.9.1) (2020-04-24) + +**Note:** Version bump only for package create-pattern-lab + + + + + +# [5.9.0](https://github.com/pattern-lab/patternlab-node/compare/v5.8.0...v5.9.0) (2020-04-24) + +**Note:** Version bump only for package create-pattern-lab + + + + + +# [5.7.0](https://github.com/pattern-lab/patternlab-node/compare/v5.6.0...v5.7.0) (2020-02-17) + +**Note:** Version bump only for package create-pattern-lab + + + + + + +# [5.4.0](https://github.com/pattern-lab/patternlab-node/compare/v5.3.3...v5.4.0) (2019-11-26) + +**Note:** Version bump only for package create-pattern-lab + + + + + +# [5.3.0](https://github.com/pattern-lab/patternlab-node/compare/v5.2.0...v5.3.0) (2019-11-13) + +**Note:** Version bump only for package create-pattern-lab + + + + + +# [5.1.0](https://github.com/pattern-lab/patternlab-node/compare/v5.0.2...v5.1.0) (2019-10-29) + +**Note:** Version bump only for package create-pattern-lab + + + + + +# [5.0.0](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-beta.3...v5.0.0) (2019-10-25) + +**Note:** Version bump only for package create-pattern-lab + + + + + + +## [1.0.11](https://github.com/pattern-lab/patternlab-node/compare/create-pattern-lab@1.0.10...create-pattern-lab@1.0.11) (2019-10-14) + +**Note:** Version bump only for package create-pattern-lab + + + + + + +## [1.0.8](https://github.com/pattern-lab/patternlab-node/compare/create-pattern-lab@1.0.7...create-pattern-lab@1.0.8) (2019-08-23) + +**Note:** Version bump only for package create-pattern-lab + + + + + +## [1.0.7](https://github.com/pattern-lab/patternlab-node/compare/create-pattern-lab@1.0.6...create-pattern-lab@1.0.7) (2019-08-23) + +**Note:** Version bump only for package create-pattern-lab + + + + + + +## [1.0.6](https://github.com/sghoweri/patternlab-node/compare/create-pattern-lab@1.0.5...create-pattern-lab@1.0.6) (2019-05-16) + +**Note:** Version bump only for package create-pattern-lab diff --git a/packages/create/README.md b/packages/create/README.md new file mode 100644 index 000000000..53e6f5770 --- /dev/null +++ b/packages/create/README.md @@ -0,0 +1,16 @@ +# Create Pattern Lab + +To get started, simply run: + +```bash +npm create pattern-lab +``` + +Then follow the prompts. + +This is the same as using the main Pattern Lab CLI's `init` command: + +```bash +npm i -g @pattern-lab/cli +pattern-lab init +``` diff --git a/packages/create/index.js b/packages/create/index.js new file mode 100755 index 000000000..ac811a7ba --- /dev/null +++ b/packages/create/index.js @@ -0,0 +1,4 @@ +#! /usr/bin/env node +const init = require('@pattern-lab/cli/bin/cli-actions/init'); + +init({}); diff --git a/packages/create/package.json b/packages/create/package.json new file mode 100644 index 000000000..e09874fee --- /dev/null +++ b/packages/create/package.json @@ -0,0 +1,16 @@ +{ + "name": "create-pattern-lab", + "version": "5.9.3", + "description": "", + "bin": "index.js", + "main": "index.js", + "scripts": {}, + "dependencies": { + "@pattern-lab/cli": "^5.9.3" + }, + "author": "", + "license": "MIT", + "publishConfig": { + "access": "public" + } +} diff --git a/packages/development-edition-engine-handlebars/.gitignore b/packages/development-edition-engine-handlebars/.gitignore new file mode 100644 index 000000000..0679bd2b5 --- /dev/null +++ b/packages/development-edition-engine-handlebars/.gitignore @@ -0,0 +1,9 @@ +node_modules/ +.DS_Store +patternlab.json +.sass-cache/* +/sass-cache +Thumbs.db +.idea/ +public +dependencyGraph.json diff --git a/packages/development-edition-engine-handlebars/.npmrc b/packages/development-edition-engine-handlebars/.npmrc new file mode 100644 index 000000000..ce73f58bf --- /dev/null +++ b/packages/development-edition-engine-handlebars/.npmrc @@ -0,0 +1,2 @@ +package-lock=false +save-exact=true diff --git a/packages/development-edition-engine-handlebars/.nvmrc b/packages/development-edition-engine-handlebars/.nvmrc new file mode 100644 index 000000000..7f976a5ae --- /dev/null +++ b/packages/development-edition-engine-handlebars/.nvmrc @@ -0,0 +1 @@ +12.12.0 diff --git a/packages/development-edition-engine-handlebars/CHANGELOG.md b/packages/development-edition-engine-handlebars/CHANGELOG.md new file mode 100644 index 000000000..2aba60593 --- /dev/null +++ b/packages/development-edition-engine-handlebars/CHANGELOG.md @@ -0,0 +1,256 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [5.9.3](https://github.com/pattern-lab/patternlab-node/compare/v5.9.2...v5.9.3) (2020-05-01) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.9.2](https://github.com/pattern-lab/patternlab-node/compare/v5.9.1...v5.9.2) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.9.1](https://github.com/pattern-lab/patternlab-node/compare/v5.9.0...v5.9.1) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [5.9.0](https://github.com/pattern-lab/patternlab-node/compare/v5.8.0...v5.9.0) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.7.2](https://github.com/pattern-lab/patternlab-node/compare/v5.7.1...v5.7.2) (2020-03-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.7.1](https://github.com/pattern-lab/patternlab-node/compare/v5.7.0...v5.7.1) (2020-02-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [5.7.0](https://github.com/pattern-lab/patternlab-node/compare/v5.6.0...v5.7.0) (2020-02-17) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [5.6.0](https://github.com/pattern-lab/patternlab-node/compare/v5.5.0...v5.6.0) (2020-01-18) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + + +# [5.5.0](https://github.com/pattern-lab/patternlab-node/compare/v5.4.2...v5.5.0) (2019-12-19) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.4.2](https://github.com/pattern-lab/patternlab-node/compare/v5.4.1...v5.4.2) (2019-11-27) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.4.1](https://github.com/pattern-lab/patternlab-node/compare/v5.4.0...v5.4.1) (2019-11-26) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [5.4.0](https://github.com/pattern-lab/patternlab-node/compare/v5.3.3...v5.4.0) (2019-11-26) + + +### Features + +* major improvements to local UIKit workflow ([4dc9173](https://github.com/pattern-lab/patternlab-node/commit/4dc9173a5a44b422e9677824de3728048b7c4f05)) + + + + + +## [5.3.3](https://github.com/pattern-lab/patternlab-node/compare/v5.3.2...v5.3.3) (2019-11-22) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + + +## [5.3.2](https://github.com/pattern-lab/patternlab-node/compare/v5.3.1...v5.3.2) (2019-11-14) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.3.1](https://github.com/pattern-lab/patternlab-node/compare/v5.3.0...v5.3.1) (2019-11-13) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [5.3.0](https://github.com/pattern-lab/patternlab-node/compare/v5.2.0...v5.3.0) (2019-11-13) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [5.2.0](https://github.com/pattern-lab/patternlab-node/compare/v5.1.0...v5.2.0) (2019-11-12) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + + +# [5.1.0](https://github.com/pattern-lab/patternlab-node/compare/v5.0.2...v5.1.0) (2019-10-29) + + +### Features + +* **config:** add new default pattern export options ([a7487a0](https://github.com/pattern-lab/patternlab-node/commit/a7487a0681cb11e6f3c5c8eaefd62e5648ad5ea3)) + + + + + +## [5.0.2](https://github.com/pattern-lab/patternlab-node/compare/v5.0.1...v5.0.2) (2019-10-28) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## [5.0.1](https://github.com/pattern-lab/patternlab-node/compare/v5.0.0...v5.0.1) (2019-10-28) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [5.0.0](https://github.com/pattern-lab/patternlab-node/compare/v3.0.0-beta.3...v5.0.0) (2019-10-25) + + +### Bug Fixes + +* Rename Handlebars and Nunjucks extension setting to "extend" ([74e5af2](https://github.com/pattern-lab/patternlab-node/commit/74e5af28c4e714fdfc1db535b94c52f3dc14a3a4)) +* update the default pattern that displays in the Handlebars demo ([ff1d85f](https://github.com/pattern-lab/patternlab-node/commit/ff1d85f2852fc4f210841e8e0aaf14b55165ce58)) + + +### Features + +* **engine-handlebars:** Demonstration of custom Handlebars helper ([f330b5b](https://github.com/pattern-lab/patternlab-node/commit/f330b5bca72f2f34bfafe5c2c64e6b0b8823eb1c)) +* **plugin-tab, core:** initial plugin hook exploration ([2f3d39a](https://github.com/pattern-lab/patternlab-node/commit/2f3d39ac6b125ad4c6b872e27ee224ce2ea33a12)) +* introduce netlify preview ([6c5d332](https://github.com/pattern-lab/patternlab-node/commit/6c5d332479fb6836bd8bd5530a074d13440f8ae4)) + + + + + + +## [0.1.6](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/development-edition-engine-handlebars@0.1.5...@pattern-lab/development-edition-engine-handlebars@0.1.6) (2019-10-14) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + + +## [0.1.5](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/development-edition-engine-handlebars@0.1.4...@pattern-lab/development-edition-engine-handlebars@0.1.5) (2019-10-14) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + + +## [0.1.1](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/development-edition-engine-handlebars@0.1.0...@pattern-lab/development-edition-engine-handlebars@0.1.1) (2019-08-23) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +# [0.1.0](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/development-edition-engine-handlebars@0.0.3...@pattern-lab/development-edition-engine-handlebars@0.1.0) (2019-08-23) + + +### Bug Fixes + +* Rename Handlebars and Nunjucks extension setting to "extend" ([74e5af2](https://github.com/pattern-lab/patternlab-node/commit/74e5af2)) + + +### Features + +* **engine-handlebars:** Demonstration of custom Handlebars helper ([f330b5b](https://github.com/pattern-lab/patternlab-node/commit/f330b5b)) + + + + + + +## [0.0.3](https://github.com/pattern-lab/patternlab-node/compare/@pattern-lab/development-edition-engine-handlebars@0.0.3-alpha.0...@pattern-lab/development-edition-engine-handlebars@0.0.3) (2019-05-16) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-handlebars + + + + + +## 0.0.1-beta.0 (2019-02-09) + + +### Bug Fixes + +* manually bump package.json versions of packages published in September but with mismatched package.json versions ([98dfadf](https://github.com/pattern-lab/patternlab-node/commit/98dfadf)) + + +### Features + +* **package:** add handlebars development edition ([454095d](https://github.com/pattern-lab/patternlab-node/commit/454095d)) diff --git a/packages/development-edition-engine-handlebars/README.md b/packages/development-edition-engine-handlebars/README.md new file mode 100644 index 000000000..5bb88ff96 --- /dev/null +++ b/packages/development-edition-engine-handlebars/README.md @@ -0,0 +1,28 @@ +![Pattern Lab Logo](/patternlab.png "Pattern Lab Logo") + +# Pattern Lab Node - Development Edition Engine Handlebars + +_here be dragons_ + +This Development Edition is a variant of [Edition Node](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node) for convience purposes only, loaded with the Handlebars Engine. The goals of this Development Edition are two-fold: + +* Develop the [Handlebars Engine](https://github.com/pattern-lab/patternlab-node/tree/master/packages/engine-handlebars) +* Build and test against Handlebars pattern tree + +> Development Editions of Pattern Lab provide the ability to work on and commit changes to select packages within the overall Pattern Lab [ecosystem](http://patternlab.io/docs/advanced-ecosystem-overview.html). This Edition is NOT stable. + + +## Working on Pattern Lab's UI Locally + +### Step 1: Install Dependencies +Run the following in the root of the Pattern Lab repo: + +``` +yarn run setup +``` + +### Step 2 (Optional) +If you want to build using a fuller set of examples than what comes with this default Handlebars demo, run `yarn run preview:hbs`. Otherwise skip to step 3. + +### Step 3 +Finally, go back into this folder, `cd packages/development-edition-engine-handlebars`, and start up the local dev server which watches UIKit and the local Pattern Lab instance for changes, live reloads, etc by running `yarn dev` diff --git a/packages/development-edition-engine-handlebars/helpers/test.js b/packages/development-edition-engine-handlebars/helpers/test.js new file mode 100644 index 000000000..8b32ed799 --- /dev/null +++ b/packages/development-edition-engine-handlebars/helpers/test.js @@ -0,0 +1,5 @@ +module.exports = function(Handlebars) { + Handlebars.registerHelper('test', function() { + return 'This is a test helper'; + }); +}; diff --git a/packages/development-edition-engine-handlebars/package.json b/packages/development-edition-engine-handlebars/package.json new file mode 100644 index 000000000..6ede6103f --- /dev/null +++ b/packages/development-edition-engine-handlebars/package.json @@ -0,0 +1,39 @@ +{ + "name": "@pattern-lab/development-edition-engine-handlebars", + "private": true, + "version": "5.9.3", + "description": "The tree of components we use to test, develop and validate the Handlebars engine", + "scripts": { + "pl:build": "patternlab build --config ./patternlab-config.json", + "pl:help": "patternlab --help", + "pl:install": "patternlab install --config ./patternlab-config.json", + "pl:serve": "patternlab serve --config ./patternlab-config.json", + "pl:version": "patternlab --version", + "dev": "node ./node_modules/@pattern-lab/uikit-workshop/build-tools.js" + }, + "keywords": [ + "Pattern Lab", + "Atomic Web Design", + "Node", + "Handlebars", + "Edition" + ], + "author": "Brian Muenzenmeye", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/pattern-lab/patternlab-node.git" + }, + "engines": { + "node": ">=12.12.0" + }, + "dependencies": { + "@pattern-lab/cli": "^5.9.3", + "@pattern-lab/core": "^5.9.3", + "@pattern-lab/engine-handlebars": "^5.5.0", + "@pattern-lab/engine-mustache": "^5.0.0", + "@pattern-lab/plugin-tab": "^5.9.3", + "@pattern-lab/starterkit-mustache-demo": "^5.0.0", + "@pattern-lab/uikit-workshop": "^5.9.3" + } +} diff --git a/packages/development-edition-engine-handlebars/patternlab-config.json b/packages/development-edition-engine-handlebars/patternlab-config.json new file mode 100644 index 000000000..5b9e9a0c2 --- /dev/null +++ b/packages/development-edition-engine-handlebars/patternlab-config.json @@ -0,0 +1,107 @@ +{ + "cacheBust": true, + "cleanPublic": true, + "defaultPattern": "all", + "defaultShowPatternInfo": false, + "ishControlsHide": { + "s": false, + "m": false, + "l": false, + "full": false, + "random": true, + "disco": true, + "hay": true, + "mqs": true, + "find": true, + "views-all": false, + "views-annotations": false, + "views-code": false, + "views-new": false, + "tools-all": false, + "tools-docs": false + }, + "ishViewportRange": { + "s": [240, 500], + "m": [500, 800], + "l": [800, 2600] + }, + "logLevel": "info", + "outputFileSuffixes": { + "rendered": ".rendered", + "rawTemplate": "", + "markupOnly": ".markup-only" + }, + "paths": { + "source": { + "root": "source/", + "patterns": "source/_patterns/", + "data": "source/_data/", + "meta": "source/_meta/", + "annotations": "source/_annotations/", + "styleguide": "dist/", + "patternlabFiles": { + "general-header": "views/partials/general-header.mustache", + "general-footer": "views/partials/general-footer.mustache", + "patternSection": "views/partials/patternSection.mustache", + "patternSectionSubtype": "views/partials/patternSectionSubtype.mustache", + "viewall": "views/viewall.mustache" + }, + "js": "source/js", + "images": "source/images", + "fonts": "source/fonts", + "css": "source/css" + }, + "public": { + "root": "public/", + "patterns": "public/patterns/", + "data": "public/styleguide/data/", + "annotations": "public/annotations/", + "styleguide": "public/styleguide/", + "js": "public/js", + "images": "public/images", + "fonts": "public/fonts", + "css": "public/css" + } + }, + "patternExtension": "hbs", + "patternStateCascade": ["inprogress", "inreview", "complete"], + "patternExportAll": false, + "patternExportDirectory": "pattern_exports", + "patternExportPatternPartials": [], + "patternExportPreserveDirectoryStructure": true, + "patternExportRaw": false, + "serverOptions": { + "wait": 1000 + }, + "starterkitSubDir": "dist", + "styleGuideExcludes": [], + "theme": { + "color": "dark", + "density": "compact", + "layout": "horizontal", + "noViewAll": false + }, + "uikits": [ + { + "name": "uikit-workshop", + "outputDir": "", + "enabled": true, + "excludedPatternStates": [], + "excludedTags": [] + } + ], + "engines": { + "handlebars": { + "extend": "helpers/*.js" + } + }, + "plugins": { + "@pattern-lab/plugin-tab": { + "enabled": true, + "initialized": false, + "options": { + "tabsToAdd": ["scss"] + } + } + } +} diff --git a/packages/development-edition-engine-handlebars/source/_annotations/annotations.json b/packages/development-edition-engine-handlebars/source/_annotations/annotations.json new file mode 100644 index 000000000..a0d0268f8 --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_annotations/annotations.json @@ -0,0 +1,3 @@ +{ + "comments": [] +} diff --git a/packages/development-edition-engine-handlebars/source/_data/data.json b/packages/development-edition-engine-handlebars/source/_data/data.json new file mode 100644 index 000000000..250376db0 --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_data/data.json @@ -0,0 +1,34 @@ +{ + "version": "2", + "swatches": [ + { + "color": { + "hex": "#031636", + "cmyk": "94 59 0 79" + }, + "label": "dark blue" + }, + { + "color": { + "hex": "#0D80F0", + "cmyk": "95 47 0 6" + }, + "label": "light blue" + }, + { + "color": { + "hex": "#4c4c4c", + "cmyk": "0 0 0 70" + }, + "label": "dark grey" + }, + { + "color": { + "hex": "#b2b2b2", + "cmyk": "0 0 0 30" + }, + "label": "light grey", + "inverted": true + } + ] +} diff --git a/packages/development-edition-engine-handlebars/source/_data/listitems.json b/packages/development-edition-engine-handlebars/source/_data/listitems.json new file mode 100644 index 000000000..c35d1076d --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_data/listitems.json @@ -0,0 +1,6 @@ +{ + "1": {}, + "2": {}, + "3": {}, + "4": {} +} diff --git a/packages/development-edition-engine-handlebars/source/_meta/README.md b/packages/development-edition-engine-handlebars/source/_meta/README.md new file mode 100644 index 000000000..c6c8c3b8e --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_meta/README.md @@ -0,0 +1,5 @@ +This is the default location to place meta files, otherwise known a pattern's header and footer. + +Pattern Lab builds each pattern while prepending and appending the header and footer. Read more about [pattern headers and footers](http://patternlab.io/docs/pattern-header-footer.html). + +If you wish to rename this directory, make sure you update the `paths.source.meta` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-handlebars/source/_meta/_00-head.hbs b/packages/development-edition-engine-handlebars/source/_meta/_00-head.hbs new file mode 100644 index 000000000..9058b6521 --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_meta/_00-head.hbs @@ -0,0 +1,19 @@ + + + + + {{ title }} + + + + + + + + + {{{ patternLabHead }}} + + + + + diff --git a/packages/development-edition-engine-handlebars/source/_meta/_00-head.mustache b/packages/development-edition-engine-handlebars/source/_meta/_00-head.mustache new file mode 100644 index 000000000..45ce3bb7d --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_meta/_00-head.mustache @@ -0,0 +1,17 @@ + + + + {{ title }} + + + + + + + + {{{ patternLabHead }}} + + + + + diff --git a/packages/development-edition-engine-handlebars/source/_meta/_01-foot.hbs b/packages/development-edition-engine-handlebars/source/_meta/_01-foot.hbs new file mode 100644 index 000000000..797d9418d --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_meta/_01-foot.hbs @@ -0,0 +1,6 @@ + + +{{{ patternLabFoot }}} + + + diff --git a/packages/development-edition-engine-handlebars/source/_meta/_01-foot.mustache b/packages/development-edition-engine-handlebars/source/_meta/_01-foot.mustache new file mode 100644 index 000000000..797d9418d --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/_meta/_01-foot.mustache @@ -0,0 +1,6 @@ + + +{{{ patternLabFoot }}} + + + diff --git a/packages/development-edition-engine-handlebars/source/css/pattern-scaffolding.css b/packages/development-edition-engine-handlebars/source/css/pattern-scaffolding.css new file mode 100644 index 000000000..f6c2da29d --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/css/pattern-scaffolding.css @@ -0,0 +1,52 @@ +/** + * This stylesheet is for styles you want to include only when displaying demo + * styles for grids, animations, color swatches, etc. + * These styles will not be your production CSS. + */ + +#sg-patterns { + -webkit-box-sizing: border-box !important; + box-sizing: border-box !important; + max-width: 100%; + padding: 0 0.5em; +} + +.sg-colors { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + list-style: none !important; + padding: 0 !important; + margin: 0 !important; +} +.sg-colors li { + -webkit-box-flex: 1; + -ms-flex: auto; + flex: auto; + margin: 0 0 0.5em 0.5em; + width: 14em; +} + +.sg-swatch { + display: flex; + flex-direction: column; + height: 6em; + margin-bottom: 0.3em; + padding: 0.5rem; +} + +.sg-label { + font-size: 90%; + line-height: 1; + color: white; +} + +.sg-label__inverted { + color: black; +} + +.sg-label__top { + margin-bottom: auto; +} diff --git a/packages/development-edition-engine-handlebars/source/css/style.css b/packages/development-edition-engine-handlebars/source/css/style.css new file mode 100644 index 000000000..7f25a7fe6 --- /dev/null +++ b/packages/development-edition-engine-handlebars/source/css/style.css @@ -0,0 +1,3 @@ +.annotation { + color: #b2b2b2; +} diff --git a/packages/development-edition-engine-handlebars/source/favicon.ico b/packages/development-edition-engine-handlebars/source/favicon.ico new file mode 100644 index 000000000..eee4aa78f Binary files /dev/null and b/packages/development-edition-engine-handlebars/source/favicon.ico differ diff --git a/packages/development-edition-engine-handlebars/source/fonts/.gitkeep b/packages/development-edition-engine-handlebars/source/fonts/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/packages/cli/.editorconfig b/packages/development-edition-engine-react/.editorconfig similarity index 77% rename from packages/cli/.editorconfig rename to packages/development-edition-engine-react/.editorconfig index 98a761ddc..8951c3929 100644 --- a/packages/cli/.editorconfig +++ b/packages/development-edition-engine-react/.editorconfig @@ -1,12 +1,11 @@ +# editorconfig.org root = true [*] -indent_style = tab +indent_style = space +indent_size = 2 +tab_width = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true - -[{package.json,*.yml}] -indent_style = space -indent_size = 2 diff --git a/packages/development-edition-engine-react/.gitignore b/packages/development-edition-engine-react/.gitignore new file mode 100644 index 000000000..f5ffa0899 --- /dev/null +++ b/packages/development-edition-engine-react/.gitignore @@ -0,0 +1,8 @@ +node_modules/ +.DS_Store +patternlab.json +.sass-cache/* +/sass-cache +Thumbs.db +.idea/ +public diff --git a/packages/development-edition-engine-react/.npmrc b/packages/development-edition-engine-react/.npmrc new file mode 100644 index 000000000..ce73f58bf --- /dev/null +++ b/packages/development-edition-engine-react/.npmrc @@ -0,0 +1,2 @@ +package-lock=false +save-exact=true diff --git a/packages/development-edition-engine-react/.nvmrc b/packages/development-edition-engine-react/.nvmrc new file mode 100644 index 000000000..95c4e8d27 --- /dev/null +++ b/packages/development-edition-engine-react/.nvmrc @@ -0,0 +1 @@ +10.0.0 \ No newline at end of file diff --git a/packages/development-edition-engine-react/CHANGELOG.md b/packages/development-edition-engine-react/CHANGELOG.md new file mode 100644 index 000000000..611fa23a3 --- /dev/null +++ b/packages/development-edition-engine-react/CHANGELOG.md @@ -0,0 +1,266 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [5.9.3](https://github.com/pattern-lab/edition-node-gulp/compare/v5.9.2...v5.9.3) (2020-05-01) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.9.2](https://github.com/pattern-lab/edition-node-gulp/compare/v5.9.1...v5.9.2) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +# [5.9.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.8.0...v5.9.0) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.7.2](https://github.com/pattern-lab/edition-node-gulp/compare/v5.7.1...v5.7.2) (2020-03-24) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.7.1](https://github.com/pattern-lab/edition-node-gulp/compare/v5.7.0...v5.7.1) (2020-02-24) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +# [5.7.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.6.0...v5.7.0) (2020-02-17) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +# [5.6.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.5.0...v5.6.0) (2020-01-18) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + +# [5.5.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.4.2...v5.5.0) (2019-12-19) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.4.2](https://github.com/pattern-lab/edition-node-gulp/compare/v5.4.1...v5.4.2) (2019-11-27) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.4.1](https://github.com/pattern-lab/edition-node-gulp/compare/v5.4.0...v5.4.1) (2019-11-26) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +# [5.4.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.3.3...v5.4.0) (2019-11-26) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.3.3](https://github.com/pattern-lab/edition-node-gulp/compare/v5.3.2...v5.3.3) (2019-11-22) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + +## [5.3.2](https://github.com/pattern-lab/edition-node-gulp/compare/v5.3.1...v5.3.2) (2019-11-14) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.3.1](https://github.com/pattern-lab/edition-node-gulp/compare/v5.3.0...v5.3.1) (2019-11-13) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +# [5.3.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.2.0...v5.3.0) (2019-11-13) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +# [5.2.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.1.0...v5.2.0) (2019-11-12) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + +# [5.1.0](https://github.com/pattern-lab/edition-node-gulp/compare/v5.0.2...v5.1.0) (2019-10-29) + + +### Features + +* **core:** fix pattern export all conflicts ([b210d82](https://github.com/pattern-lab/edition-node-gulp/commit/b210d820ba8ac0b64c82c7ff0f18c9f8a900fce2)) + + + + + +## [5.0.2](https://github.com/pattern-lab/edition-node-gulp/compare/v5.0.1...v5.0.2) (2019-10-28) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [5.0.1](https://github.com/pattern-lab/edition-node-gulp/compare/v5.0.0...v5.0.1) (2019-10-28) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +# [5.0.0](https://github.com/pattern-lab/edition-node-gulp/compare/v3.0.0-beta.3...v5.0.0) (2019-10-25) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + +## [0.1.8](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.7...@pattern-lab/engine-react-testing-tree@0.1.8) (2019-10-14) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + +## [0.1.7](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.6...@pattern-lab/engine-react-testing-tree@0.1.7) (2019-10-14) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + +## [0.1.3](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.2...@pattern-lab/engine-react-testing-tree@0.1.3) (2019-08-23) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + +## [0.1.2](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.2-alpha.0...@pattern-lab/engine-react-testing-tree@0.1.2) (2019-05-16) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + +## [0.1.1-beta.1](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.4...@pattern-lab/engine-react-testing-tree@0.1.1-beta.1) (2019-02-09) + + +### Bug Fixes + +* manually bump package.json versions of packages published in September but with mismatched package.json versions ([98dfadf](https://github.com/pattern-lab/edition-node-gulp/commit/98dfadf)) + + + + + + +## [0.1.1-beta.0](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.4...@pattern-lab/engine-react-testing-tree@0.1.1-beta.0) (2018-09-07) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + + + + + +## [0.1.1-alpha.4](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.3...@pattern-lab/engine-react-testing-tree@0.1.1-alpha.4) (2018-07-06) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + +## [0.1.1-alpha.3](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.2...@pattern-lab/engine-react-testing-tree@0.1.1-alpha.3) (2018-07-06) + +### Bug Fixes + +* **package:** fix fat-fingered dependency ([e439f4e](https://github.com/pattern-lab/edition-node-gulp/commit/e439f4e)) + +### Features + +* **package:** add npmrc file ([55f5bc2](https://github.com/pattern-lab/edition-node-gulp/commit/55f5bc2)) +* **package:** pin all dependencies ([415698e](https://github.com/pattern-lab/edition-node-gulp/commit/415698e)) +* **package:** remove package-lock.json files ([5ab3995](https://github.com/pattern-lab/edition-node-gulp/commit/5ab3995)) + + + +## [0.1.1-alpha.2](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.1...@pattern-lab/engine-react-testing-tree@0.1.1-alpha.2) (2018-07-05) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + +## [0.1.1-alpha.1](https://github.com/pattern-lab/edition-node-gulp/compare/@pattern-lab/engine-react-testing-tree@0.1.1-alpha.0...@pattern-lab/engine-react-testing-tree@0.1.1-alpha.1) (2018-05-04) + +**Note:** Version bump only for package @pattern-lab/engine-react-testing-tree + + + +## 0.1.1-alpha.0 (2018-05-04) + +### Features + +* **README:** clarify purpose of development edition ([d90df0e](https://github.com/pattern-lab/edition-node-gulp/commit/d90df0e)) diff --git a/packages/development-edition-engine-react/LICENSE b/packages/development-edition-engine-react/LICENSE new file mode 100644 index 000000000..0e6363fb1 --- /dev/null +++ b/packages/development-edition-engine-react/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Pattern Lab + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/development-edition-engine-react/README.md b/packages/development-edition-engine-react/README.md new file mode 100644 index 000000000..bdb531d95 --- /dev/null +++ b/packages/development-edition-engine-react/README.md @@ -0,0 +1,14 @@ +![Pattern Lab Logo](/patternlab.png "Pattern Lab Logo") + +# Pattern Lab Node - Development Edition Engine React + +_here be dragons_ + +This Development Edition is a variant of [Edition Node Gulp](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node-gulp) for convience purposes only, loaded with the React Engine. The goals of this Development Edition are two-fold: + +* Develop the [React Engine](https://github.com/pattern-lab/patternlab-node/tree/master/packages/engine-react) +* Build and test against React pattern tree + +If you'd like to help with the React Engine, please reference the [contribution guidelines](https://github.com/pattern-lab/patternlab-node/blob/master/.github/CONTRIBUTING.md). + +> Development Editions of Pattern Lab provide the ability to work on and commit changes to select packages within the overall Pattern Lab [ecosystem](http://patternlab.io/docs/advanced-ecosystem-overview.html). This Edition is NOT stable. diff --git a/packages/development-edition-engine-react/gulpfile.js b/packages/development-edition-engine-react/gulpfile.js new file mode 100644 index 000000000..8d8653659 --- /dev/null +++ b/packages/development-edition-engine-react/gulpfile.js @@ -0,0 +1,72 @@ +/****************************************************** + * PATTERN LAB NODE + * EDITION-NODE-GULP + * The gulp wrapper around patternlab-node core, providing tasks to interact with the core library. + ******************************************************/ +const gulp = require('gulp'); +const argv = require('minimist')(process.argv.slice(2)); + +/****************************************************** + * PATTERN LAB NODE WRAPPER TASKS with core library + ******************************************************/ +const config = require('./patternlab-config.json'); +const patternlab = require('@pattern-lab/core')(config); + +function build() { + return patternlab + .build({ + watch: argv.watch, + cleanPublic: config.cleanPublic, + }) + .then(() => { + // do something else when this promise resolves + }); +} + +function serve() { + return patternlab + .serve({ + cleanPublic: config.cleanPublic, + }) + .then(() => { + // do something else when this promise resolves + }); +} + +gulp.task('patternlab:version', function() { + patternlab.version(); +}); + +gulp.task('patternlab:help', function() { + patternlab.help(); +}); + +gulp.task('patternlab:patternsonly', function() { + patternlab.patternsonly(config.cleanPublic); +}); + +gulp.task('patternlab:liststarterkits', function() { + patternlab.liststarterkits(); +}); + +gulp.task('patternlab:loadstarterkit', function() { + patternlab.loadstarterkit(argv.kit, argv.clean); +}); + +gulp.task('patternlab:build', function() { + build().then(() => { + // do something else when this promise resolves + }); +}); + +gulp.task('patternlab:serve', function() { + serve().then(() => { + // do something else when this promise resolves + }); +}); + +gulp.task('patternlab:installplugin', function() { + patternlab.installplugin(argv.plugin); +}); + +gulp.task('default', ['patternlab:help']); diff --git a/packages/development-edition-engine-react/package.json b/packages/development-edition-engine-react/package.json new file mode 100644 index 000000000..e17c489fd --- /dev/null +++ b/packages/development-edition-engine-react/package.json @@ -0,0 +1,36 @@ +{ + "name": "@pattern-lab/engine-react-testing-tree", + "description": "The tree of components we use to test, develop and validate the React engine", + "version": "5.9.3", + "private": true, + "main": "gulpfile.js", + "dependencies": { + "@pattern-lab/core": "^5.9.3", + "@pattern-lab/engine-mustache": "^5.0.0", + "@pattern-lab/engine-react": "^5.0.0", + "@pattern-lab/uikit-workshop": "^5.9.3", + "gulp": "3.9.1", + "minimist": "^1.2.0", + "react": "16.2.0" + }, + "keywords": [ + "Pattern Lab", + "Atomic Web Design", + "Node", + "Gulp", + "Javascript" + ], + "repository": { + "type": "git", + "url": "git://github.com/pattern-lab/edition-node-gulp.git" + }, + "bugs": "https://github.com/pattern-lab/edition-node-gulp/issues", + "author": "Brian Muenzenmeyer", + "scripts": { + "gulp": "gulp -- " + }, + "license": "MIT", + "engines": { + "node": ">=10.0" + } +} diff --git a/packages/development-edition-engine-react/patternlab-config.json b/packages/development-edition-engine-react/patternlab-config.json new file mode 100644 index 000000000..23b459f2d --- /dev/null +++ b/packages/development-edition-engine-react/patternlab-config.json @@ -0,0 +1,95 @@ +{ + "cacheBust": true, + "cleanPublic" : true, + "defaultPattern": "all", + "defaultShowPatternInfo": false, + "ishControlsHide": { + "s": false, + "m": false, + "l": false, + "full": false, + "random": false, + "disco": false, + "hay": true, + "mqs": false, + "find": false, + "views-all": false, + "views-annotations": false, + "views-code": false, + "views-new": false, + "tools-all": false, + "tools-docs": false + }, + "ishViewportRange": { + "s": [240, 500], + "m": [500, 800], + "l": [800, 2600] + }, +<<<<<<< HEAD:packages/development-edition-engine-react/patternlab-config.json + "logLevel": "info", +======= + "patternExportAll": false, + "patternExportPreserveDirectoryStructure": false, + "patternExportRaw": false, + "patternExportPatternPartials": [], + "patternExportDirectory": "./pattern_exports/", + "cacheBust": true, +>>>>>>> 436dd99e50d808cd14691593b927209f1ecb663e:patternlab-config.json + "outputFileSuffixes": { + "rendered": ".rendered", + "rawTemplate": "", + "markupOnly": ".markup-only" + }, + "paths" : { + "source" : { + "root": "./source/", + "patterns" : "./source/_patterns/", + "data" : "./source/_data/", + "meta": "./source/_meta/", + "annotations" : "./source/_annotations/", + "styleguide": "./node_modules/@pattern-lab/uikit-workshop/dist/", + "patternlabFiles": { + "general-header": + "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-header.mustache", + "general-footer": + "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-footer.mustache", + "patternSection": + "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSection.mustache", + "patternSectionSubtype": + "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSectionSubtype.mustache", + "viewall": + "./node_modules/@pattern-lab/uikit-workshop/views/viewall.mustache" + }, + "js" : "./source/js", + "images" : "./source/images", + "fonts" : "./source/fonts", + "css" : "./source/css/" + }, + "public" : { + "root" : "./public/", + "patterns" : "./public/patterns/", + "data" : "./public/styleguide/data/", + "annotations" : "./public/annotations/", + "styleguide" : "./public/styleguide/", + "js" : "./public/js", + "images" : "./public/images", + "fonts" : "./public/fonts", + "css" : "./public/css" + } + }, + "patternExtension": "mustache", + "patternStateCascade": ["inprogress", "inreview", "complete"], + "patternExportDirectory": "./pattern_exports/", + "patternExportPatternPartials": [], + "serverOptions": { + "wait": 1000 + }, + "starterkitSubDir": "dist", + "styleGuideExcludes": [ + ], + "theme": { + "color": "dark", + "density": "compact", + "layout": "horizontal" + } +} diff --git a/packages/development-edition-engine-react/source/_annotations/README.md b/packages/development-edition-engine-react/source/_annotations/README.md new file mode 100644 index 000000000..42592a09b --- /dev/null +++ b/packages/development-edition-engine-react/source/_annotations/README.md @@ -0,0 +1,5 @@ +This is the default location to place annotations. + +Pattern Lab uses annotations defined here to markup the UI. Read more about [annotations](http://patternlab.io/docs/pattern-adding-annotations.html). + +If you wish to rename this directory, make sure you update the `paths.source.annotations` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-react/source/_data/README.md b/packages/development-edition-engine-react/source/_data/README.md new file mode 100644 index 000000000..3b9ea1ea4 --- /dev/null +++ b/packages/development-edition-engine-react/source/_data/README.md @@ -0,0 +1,5 @@ +This is the default location to place global data files. + +Pattern Lab uses data defined here as the global fallback if a template does not provide its own data. Read more about [data](http://patternlab.io/docs/data-overview.html). + +If you wish to rename this directory, make sure you update the `paths.source.data` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-react/source/_meta/README.md b/packages/development-edition-engine-react/source/_meta/README.md new file mode 100644 index 000000000..c6c8c3b8e --- /dev/null +++ b/packages/development-edition-engine-react/source/_meta/README.md @@ -0,0 +1,5 @@ +This is the default location to place meta files, otherwise known a pattern's header and footer. + +Pattern Lab builds each pattern while prepending and appending the header and footer. Read more about [pattern headers and footers](http://patternlab.io/docs/pattern-header-footer.html). + +If you wish to rename this directory, make sure you update the `paths.source.meta` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-react/source/_meta/_00-head.hbs b/packages/development-edition-engine-react/source/_meta/_00-head.hbs new file mode 100644 index 000000000..cf826617a --- /dev/null +++ b/packages/development-edition-engine-react/source/_meta/_00-head.hbs @@ -0,0 +1,16 @@ + + + + {{ title }} + + + + + + + + {{{ patternLabHead }}} + + + + diff --git a/packages/development-edition-engine-react/source/_meta/_00-head.html b/packages/development-edition-engine-react/source/_meta/_00-head.html new file mode 100644 index 000000000..cf826617a --- /dev/null +++ b/packages/development-edition-engine-react/source/_meta/_00-head.html @@ -0,0 +1,16 @@ + + + + {{ title }} + + + + + + + + {{{ patternLabHead }}} + + + + diff --git a/packages/development-edition-engine-react/source/_meta/_00-head.mustache b/packages/development-edition-engine-react/source/_meta/_00-head.mustache new file mode 100644 index 000000000..069727248 --- /dev/null +++ b/packages/development-edition-engine-react/source/_meta/_00-head.mustache @@ -0,0 +1,17 @@ + + + + {{ title }} + + + + + + + + {{{ patternLabHead }}} + + + + + diff --git a/packages/development-edition-engine-react/source/_meta/_01-foot.hbs b/packages/development-edition-engine-react/source/_meta/_01-foot.hbs new file mode 100644 index 000000000..2feb91336 --- /dev/null +++ b/packages/development-edition-engine-react/source/_meta/_01-foot.hbs @@ -0,0 +1,6 @@ + + +{{{ patternLabFoot }}} + + + diff --git a/packages/development-edition-engine-react/source/_meta/_01-foot.html b/packages/development-edition-engine-react/source/_meta/_01-foot.html new file mode 100644 index 000000000..2feb91336 --- /dev/null +++ b/packages/development-edition-engine-react/source/_meta/_01-foot.html @@ -0,0 +1,6 @@ + + +{{{ patternLabFoot }}} + + + diff --git a/packages/development-edition-engine-react/source/_meta/_01-foot.mustache b/packages/development-edition-engine-react/source/_meta/_01-foot.mustache new file mode 100644 index 000000000..7c15d6a74 --- /dev/null +++ b/packages/development-edition-engine-react/source/_meta/_01-foot.mustache @@ -0,0 +1,6 @@ + + + {{{ patternLabFoot }}} + + + diff --git a/packages/development-edition-engine-react/source/_patterns/00-atoms/00-general/HelloWorld.jsx b/packages/development-edition-engine-react/source/_patterns/00-atoms/00-general/HelloWorld.jsx new file mode 100644 index 000000000..9790e5af0 --- /dev/null +++ b/packages/development-edition-engine-react/source/_patterns/00-atoms/00-general/HelloWorld.jsx @@ -0,0 +1,5 @@ +import React from 'react'; + +const HelloWorld = () =>
Hello world!
; + +export default HelloWorld; diff --git a/packages/development-edition-engine-react/source/_patterns/01-molecules/00-general/HelloIncluder.jsx b/packages/development-edition-engine-react/source/_patterns/01-molecules/00-general/HelloIncluder.jsx new file mode 100644 index 000000000..6b2f3c985 --- /dev/null +++ b/packages/development-edition-engine-react/source/_patterns/01-molecules/00-general/HelloIncluder.jsx @@ -0,0 +1,30 @@ +import React, { Component } from 'react'; + +import HelloWorld from '../../00-atoms/00-general/HelloWorld'; + +// const HelloWorld = () => ( +//
+// Hello world! +//
+// ); + +class HelloIncluder extends Component { + constructor() { + super(); + this.state = { + bgColor: 'transparent', + }; + setTimeout(() => this.setState({ bgColor: 'red' }), 2000); + } + + render() { + return ( +
+
Hey! Here's the Hello World component:
+ +
+ ); + } +} + +export default HelloIncluder; diff --git a/packages/development-edition-engine-react/source/_patterns/README.md b/packages/development-edition-engine-react/source/_patterns/README.md new file mode 100644 index 000000000..2f89266bf --- /dev/null +++ b/packages/development-edition-engine-react/source/_patterns/README.md @@ -0,0 +1,5 @@ +This is the default location to place pattern files. + +Pattern Lab builds patterns and the ui from the structure defined within. Read more about [pattern organization](http://patternlab.io/docs/pattern-organization.html). + +If you wish to rename this directory, make sure you update the `paths.source.patterns` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-react/source/css/README.md b/packages/development-edition-engine-react/source/css/README.md new file mode 100644 index 000000000..a6ce7bf27 --- /dev/null +++ b/packages/development-edition-engine-react/source/css/README.md @@ -0,0 +1,5 @@ +This is the default location to place global css files. + +The entire contents of this directory will be recursively copied to your configured `public/` directory. + +If you wish to rename this directory, make sure you update the `paths.source.css` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-react/source/css/pattern-scaffolding.css b/packages/development-edition-engine-react/source/css/pattern-scaffolding.css new file mode 100644 index 000000000..b09172fc8 --- /dev/null +++ b/packages/development-edition-engine-react/source/css/pattern-scaffolding.css @@ -0,0 +1,54 @@ +/** + * This stylesheet is for styles you want to include only when displaying demo + * styles for grids, animations, color swatches, etc. + * These styles will not be your production CSS. + */ +#sg-patterns { + -webkit-box-sizing: border-box !important; + box-sizing: border-box !important; + max-width: 100%; + padding: 0 0.5em; +} + +.demo-animate { + background: #ddd; + padding: 1em; + margin-bottom: 1em; + text-align: center; + border-radius: 8px; + cursor: pointer; +} + +.sg-colors { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + list-style: none !important; + padding: 0 !important; + margin: 0 !important; +} +.sg-colors li { + -webkit-box-flex: 1; + -ms-flex: auto; + flex: auto; + padding: 0.3em; + margin: 0 0.5em 0.5em 0; + min-width: 5em; + max-width: 14em; + border: 1px solid #ddd; + border-radius: 8px; +} + +.sg-swatch { + display: block; + height: 4em; + margin-bottom: 0.3em; + border-radius: 5px; +} + +.sg-label { + font-size: 90%; + line-height: 1; +} diff --git a/packages/development-edition-engine-react/source/css/style.css b/packages/development-edition-engine-react/source/css/style.css new file mode 100644 index 000000000..04f745349 --- /dev/null +++ b/packages/development-edition-engine-react/source/css/style.css @@ -0,0 +1,3 @@ +/* + * YOUR STYLES HERE + */ diff --git a/packages/development-edition-engine-react/source/favicon.ico b/packages/development-edition-engine-react/source/favicon.ico new file mode 100644 index 000000000..eee4aa78f Binary files /dev/null and b/packages/development-edition-engine-react/source/favicon.ico differ diff --git a/packages/development-edition-engine-react/source/fonts/README.md b/packages/development-edition-engine-react/source/fonts/README.md new file mode 100644 index 000000000..ff4d4dee0 --- /dev/null +++ b/packages/development-edition-engine-react/source/fonts/README.md @@ -0,0 +1,5 @@ +This is the default location to place global font files. + +The entire contents of this directory will be recursively copied to your configured `public/` directory. + +If you wish to rename this directory, make sure you update the `paths.source.fonts` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-react/source/images/README.md b/packages/development-edition-engine-react/source/images/README.md new file mode 100644 index 000000000..86c91d567 --- /dev/null +++ b/packages/development-edition-engine-react/source/images/README.md @@ -0,0 +1,5 @@ +This is the default location to place global image files. + +The entire contents of this directory will be recursively copied to your configured `public/` directory. + +If you wish to rename this directory, make sure you update the `paths.source.images` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-react/source/js/README.md b/packages/development-edition-engine-react/source/js/README.md new file mode 100644 index 000000000..857893854 --- /dev/null +++ b/packages/development-edition-engine-react/source/js/README.md @@ -0,0 +1,5 @@ +This is the default location to place global javascript files. + +The entire contents of this directory will be recursively copied to your configured `public/` directory. + +If you wish to rename this directory, make sure you update the `paths.source.js` property within `patternlab-config.json`. diff --git a/packages/development-edition-engine-twig/.gitignore b/packages/development-edition-engine-twig/.gitignore new file mode 100644 index 000000000..0679bd2b5 --- /dev/null +++ b/packages/development-edition-engine-twig/.gitignore @@ -0,0 +1,9 @@ +node_modules/ +.DS_Store +patternlab.json +.sass-cache/* +/sass-cache +Thumbs.db +.idea/ +public +dependencyGraph.json diff --git a/packages/development-edition-engine-twig/CHANGELOG.md b/packages/development-edition-engine-twig/CHANGELOG.md new file mode 100644 index 000000000..f1bda1063 --- /dev/null +++ b/packages/development-edition-engine-twig/CHANGELOG.md @@ -0,0 +1,40 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [5.9.3](https://github.com/pattern-lab/patternlab-node/compare/v5.9.2...v5.9.3) (2020-05-01) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-twig + + + + + +## [5.9.2](https://github.com/pattern-lab/patternlab-node/compare/v5.9.1...v5.9.2) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-twig + + + + + +## [5.9.1](https://github.com/pattern-lab/patternlab-node/compare/v5.9.0...v5.9.1) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-twig + + + + + +# [5.9.0](https://github.com/pattern-lab/patternlab-node/compare/v5.8.0...v5.9.0) (2020-04-24) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-twig + + + + + +# [5.8.0](https://github.com/pattern-lab/patternlab-node/compare/v5.7.2...v5.8.0) (2020-04-03) + +**Note:** Version bump only for package @pattern-lab/development-edition-engine-twig diff --git a/packages/development-edition-engine-twig/README.md b/packages/development-edition-engine-twig/README.md new file mode 100644 index 000000000..5ea6dce7b --- /dev/null +++ b/packages/development-edition-engine-twig/README.md @@ -0,0 +1,25 @@ +![Pattern Lab Logo](/patternlab.png "Pattern Lab Logo") + +# Pattern Lab Node - Development Edition Engine Twig + +_here be dragons_ + +This Development Edition is a variant of [Edition Node](https://github.com/pattern-lab/patternlab-node/tree/master/packages/edition-node) for convience purposes only, loaded with the Twig Engine. The goals of this Development Edition are two-fold: + +* Develop the [Twig Engine](https://github.com/pattern-lab/patternlab-node/tree/master/packages/engine-twig) +* Build and test against Twig pattern tree + +> Development Editions of Pattern Lab provide the ability to work on and commit changes to select packages within the overall Pattern Lab [ecosystem](http://patternlab.io/docs/advanced-ecosystem-overview.html). This Edition is NOT stable. + + +## Working on Pattern Lab's UI Locally + +### Step 1: Install Dependencies +Run the following in the root of the Pattern Lab repo: + +``` +yarn run setup +``` + +### Step 2 +Finally, go back into this folder, `cd packages/development-edition-engine-twig`, and start up the local dev server which watches UIKit and the local Pattern Lab instance for changes, live reloads, etc by running `yarn dev` diff --git a/packages/development-edition-engine-twig/package.json b/packages/development-edition-engine-twig/package.json new file mode 100644 index 000000000..949ac8f24 --- /dev/null +++ b/packages/development-edition-engine-twig/package.json @@ -0,0 +1,43 @@ +{ + "name": "@pattern-lab/development-edition-engine-twig", + "private": true, + "version": "5.9.3", + "description": "The tree of components we use to test, develop and validate the twig engine (not engine-twig-php)", + "scripts": { + "postbootstrap": "patternlab install --starterkits @pattern-lab/starterkit-twig-demo", + "pl:build": "patternlab build --config ./patternlab-config.json", + "pl:help": "patternlab --help", + "pl:install": "patternlab install --config ./patternlab-config.json", + "pl:serve": "patternlab serve --config ./patternlab-config.json", + "pl:version": "patternlab --version", + "dev": "node ./node_modules/@pattern-lab/uikit-workshop/build-tools.js" + }, + "keywords": [ + "Pattern Lab", + "Atomic Web Design", + "Node", + "Twig", + "Edition" + ], + "author": "Ringo De Smet", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/pattern-lab/patternlab-node.git" + }, + "engines": { + "node": ">=10.0" + }, + "dependencies": { + "@pattern-lab/cli": "^5.9.3", + "@pattern-lab/core": "^5.9.3", + "@pattern-lab/engine-twig": "^5.9.3", + "@pattern-lab/starterkit-twig-demo": "^5.8.0", + "@pattern-lab/uikit-workshop": "^5.9.3" + }, + "workspaces": { + "nohoist": [ + "**/@pattern-lab/starterkit-twig-demo" + ] + } +} diff --git a/packages/development-edition-engine-twig/patternlab-config.json b/packages/development-edition-engine-twig/patternlab-config.json new file mode 100644 index 000000000..3c18bd403 --- /dev/null +++ b/packages/development-edition-engine-twig/patternlab-config.json @@ -0,0 +1,114 @@ +{ + "cacheBust": true, + "cleanPublic": true, + "defaultPattern": "pages-homepage", + "defaultShowPatternInfo": false, + "ishControlsHide": { + "s": false, + "m": false, + "l": false, + "full": false, + "random": false, + "disco": false, + "hay": true, + "mqs": false, + "find": false, + "views-all": false, + "views-annotations": false, + "views-code": false, + "views-new": false, + "tools-all": false, + "tools-docs": false + }, + "ishViewportRange": { + "s": [ + 240, + 500 + ], + "m": [ + 500, + 800 + ], + "l": [ + 800, + 2600 + ] + }, + "logLevel": "info", + "outputFileSuffixes": { + "rendered": ".rendered", + "rawTemplate": "", + "markupOnly": ".markup-only" + }, + "paths": { + "source": { + "root": "source/", + "patterns": "source/_patterns/", + "data": "source/_data/", + "meta": "source/_meta/", + "annotations": "source/_annotations/", + "styleguide": "dist/", + "patternlabFiles": { + "general-header": "views/partials/general-header.mustache", + "general-footer": "views/partials/general-footer.mustache", + "patternSection": "views/partials/patternSection.mustache", + "patternSectionSubtype": "views/partials/patternSectionSubtype.mustache", + "viewall": "views/viewall.mustache" + }, + "js": "source/js", + "images": "source/images", + "fonts": "source/fonts", + "css": "source/css" + }, + "public": { + "root": "public/", + "patterns": "public/patterns/", + "data": "public/styleguide/data/", + "annotations": "public/annotations/", + "styleguide": "public/styleguide/", + "js": "public/js", + "images": "public/images", + "fonts": "public/fonts", + "css": "public/css" + } + }, + "patternExtension": "twig", + "patternStateCascade": [ + "inprogress", + "inreview", + "complete" + ], + "patternExportDirectory": "pattern_exports", + "patternExportPatternPartials": [], + "serverOptions": { + "wait": 1000 + }, + "starterkitSubDir": "dist", + "styleGuideExcludes": [], + "theme": { + "color": "dark", + "density": "compact", + "layout": "horizontal" + }, + "uikits": [ + { + "name": "uikit-workshop", + "outputDir": "", + "enabled": true, + "excludedPatternStates": [], + "excludedTags": [] + } + ], + "engines": { + "twig": { + "namespaces": { + "atoms": "source/_patterns/00-atoms/", + "molecules": "source/_patterns/01-molecules/", + "organisms": "source/_patterns/02-organisms/", + "templates": "source/_patterns/03-templates/", + "pages": "source/_patterns/04-pages/", + "macros": "source/_macros/" + } + } + } +} diff --git a/packages/development-edition-engine-twig/source/.gitignore b/packages/development-edition-engine-twig/source/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/packages/development-edition-engine-twig/source/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/packages/docs/.eleventy.js b/packages/docs/.eleventy.js new file mode 100644 index 000000000..9e8b8feaa --- /dev/null +++ b/packages/docs/.eleventy.js @@ -0,0 +1,96 @@ +const rssPlugin = require('@11ty/eleventy-plugin-rss'); +const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); +const eleventyNavigationPlugin = require('@11ty/eleventy-navigation'); +const fs = require('fs'); + +// Import filters +const dateFilter = require('./src/filters/date-filter.js'); +const markdownFilter = require('./src/filters/markdown-filter.js'); +const w3DateFilter = require('./src/filters/w3-date-filter.js'); + +// Import transforms +const htmlMinTransform = require('./src/transforms/html-min-transform.js'); +const parseTransform = require('./src/transforms/parse-transform.js'); + +// Import data files +const site = require('./src/_data/site.json'); + +module.exports = function(config) { + // Filters + config.addFilter('dateFilter', dateFilter); + config.addFilter('markdownFilter', markdownFilter); + config.addFilter('w3DateFilter', w3DateFilter); + + // Layout aliases + config.addLayoutAlias('home', 'layouts/home.njk'); + + // Transforms + config.addTransform('htmlmin', htmlMinTransform); + config.addTransform('parse', parseTransform); + + // Passthrough copy + config.addPassthroughCopy('src/images'); + config.addPassthroughCopy('src/js'); + config.addPassthroughCopy('src/admin/config.yml'); + config.addPassthroughCopy('src/admin/previews.js'); + config.addPassthroughCopy('node_modules/nunjucks/browser/nunjucks-slim.js'); + + const now = new Date(); + + // Custom collections + const livePosts = post => post.date <= now && !post.data.draft; + config.addCollection('posts', collection => { + return [ + ...collection.getFilteredByGlob('./src/posts/*.md').filter(livePosts) + ].reverse(); + }); + + config.addCollection('demos', collection => { + return [...collection.getFilteredByGlob('./src/demos/*.md')].reverse(); + }); + + config.addCollection('postFeed', collection => { + return [...collection.getFilteredByGlob('./src/posts/*.md').filter(livePosts)] + .reverse() + .slice(0, site.maxPostsPerPage); + }); + + config.addCollection('docs', collection => { + return [...collection.getFilteredByGlob('./src/docs/*.md')].reverse(); + }); + + config.addCollection('docsOrdered', collection => { + const docs = collection.getFilteredByGlob('src/docs/*.md').sort((a, b) => { + return Number(a.data.order) - Number(b.data.order); + }); + return docs; + }); + + // Plugins + config.addPlugin(rssPlugin); + config.addPlugin(syntaxHighlight); + config.addPlugin(eleventyNavigationPlugin); + + // 404 + config.setBrowserSyncConfig({ + callbacks: { + ready: function(err, browserSync) { + const content_404 = fs.readFileSync('dist/404.html'); + + browserSync.addMiddleware('*', (req, res) => { + // Provides the 404 content without redirect. + res.write(content_404); + res.end(); + }); + } + } + }); + + return { + dir: { + input: 'src', + output: 'dist' + }, + passthroughFileCopy: true + }; +}; diff --git a/packages/docs/.gitignore b/packages/docs/.gitignore new file mode 100644 index 000000000..a54bbf4b4 --- /dev/null +++ b/packages/docs/.gitignore @@ -0,0 +1,17 @@ +*.log +npm-debug.* +*.scssc +*.log +*.swp +.DS_Store +.sass-cache +node_modules +dist + +# Specifics + +# Hide design tokens +src/scss/_tokens.scss + +# Hide compiled CSS +src/_includes/assets/* diff --git a/packages/docs/.prettierrc b/packages/docs/.prettierrc new file mode 100644 index 000000000..a20fac227 --- /dev/null +++ b/packages/docs/.prettierrc @@ -0,0 +1,7 @@ +{ + "printWidth": 90, + "useTabs": true, + "tabWidth": 2, + "singleQuote": true, + "bracketSpacing": false +} diff --git a/packages/docs/.vscode/launch.json b/packages/docs/.vscode/launch.json new file mode 100644 index 000000000..2359da6e9 --- /dev/null +++ b/packages/docs/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "skipFiles": [ + "/**" + ], + "program": "${workspaceFolder}/index.js" + } + ] +} \ No newline at end of file diff --git a/packages/docs/CHANGELOG.md b/packages/docs/CHANGELOG.md new file mode 100644 index 000000000..3bf4e3f5c --- /dev/null +++ b/packages/docs/CHANGELOG.md @@ -0,0 +1,19 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [5.9.3](https://github.com/bradfrost/pl-website-eleventy/compare/v5.9.2...v5.9.3) (2020-05-01) + +**Note:** Version bump only for package patternlab-website + + + + + +# [5.9.0](https://github.com/bradfrost/pl-website-eleventy/compare/v5.8.0...v5.9.0) (2020-04-24) + + +### Features + +* **docs:** yarnify ([5a47dc7](https://github.com/bradfrost/pl-website-eleventy/commit/5a47dc7b90dc5c43c12a51143b41943dcbd8564c)) diff --git a/packages/docs/LICENSE.txt b/packages/docs/LICENSE.txt new file mode 100644 index 000000000..312f7109c --- /dev/null +++ b/packages/docs/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 andy-bell.design and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/docs/README.md b/packages/docs/README.md new file mode 100644 index 000000000..7b191158a --- /dev/null +++ b/packages/docs/README.md @@ -0,0 +1,32 @@ +# Pattern Lab Website + +This is the website for patternlab.io. This site was build using the [Hylia starter kit](https://hylia.website/), which is a lightweight [Eleventy](https://11ty.io) starter kit. + +--- + +## How to work with this project + +1. Clone this repository +2. `cd` into the project directory and run `yarn` +3. Once all the dependencies are installed run `yarn start` +4. Open your browser at `http://localhost:8080` + +## Terminal commands + +### Serve the site locally + +```bash +yarn start +``` + +### Build a production version of the site + +```bash +yarn production +``` + +### Compile Sass + +```bash +yarn sass:process +``` diff --git a/packages/docs/package.json b/packages/docs/package.json new file mode 100755 index 000000000..801697fa9 --- /dev/null +++ b/packages/docs/package.json @@ -0,0 +1,52 @@ +{ + "name": "patternlab-website", + "version": "5.9.3", + "description": "The website for patternlab.io", + "main": "index.js", + "dependencies": { + "@11ty/eleventy": "^0.8.3", + "@11ty/eleventy-plugin-rss": "^1.0.6", + "@11ty/eleventy-plugin-syntaxhighlight": "^2.0.3", + "@tbranyen/jsdom": "^13.0.0", + "concurrently": "^4.1.0", + "html-minifier": "^4.0.0", + "json-to-scss": "^1.3.1", + "sass": "^1.21.0", + "semver": "^6.3.0", + "slugify": "^1.3.4", + "stalfos": "github:hankchizljaw/stalfos#c8971d22726326cfc04089b2da4d51eeb1ebb0eb" + }, + "devDependencies": { + "@11ty/eleventy-navigation": "^0.1.5", + "@erquhart/rollup-plugin-node-builtins": "^2.1.5", + "bl": "^3.0.0", + "chokidar-cli": "^2.0.0", + "cross-env": "^5.2.0", + "make-dir-cli": "^2.0.0", + "prettier": "^1.18.2", + "rollup": "^1.16.1", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-json": "^4.0.0", + "rollup-plugin-node-resolve": "^5.0.3" + }, + "scripts": { + "sass:tokens": "npx json-to-scss src/_data/tokens.json src/scss/_tokens.scss", + "sass:process": "yarn sass:tokens && sass src/scss/style.scss dist/css/style.css --style=compressed", + "cms:precompile": "make-dir dist/admin && nunjucks-precompile src/_includes > dist/admin/templates.js -i \"\\.(njk|css|svg)$\"", + "cms:bundle": "rollup --config", + "start": "concurrently \"yarn sass:process -- --watch\" \"yarn cms:bundle -- --watch\" \"chokidar \\\"src/_includes/**\\\" -c \\\"yarn cms:precompile\\\"\" \"yarn serve\"", + "serve": "cross-env ELEVENTY_ENV=development npx eleventy --serve", + "production": "yarn sass:process && yarn cms:precompile && yarn cms:bundle && npx eleventy" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bradfrost/pl-website-eleventy.git" + }, + "keywords": [], + "author": "", + "license": "MIT", + "bugs": { + "url": "https://github.com/bradfrost/pl-website-eleventy/issues" + }, + "homepage": "https://github.com/bradfrost/pl-website-eleventy/#readme" +} diff --git a/packages/docs/php-docs/advanced-auto-regenerate.md b/packages/docs/php-docs/advanced-auto-regenerate.md new file mode 100644 index 000000000..fc6985825 --- /dev/null +++ b/packages/docs/php-docs/advanced-auto-regenerate.md @@ -0,0 +1,55 @@ +--- +title: Watching for Changes and Auto Regenerating Patterns +tags: + - docs +--- + +Pattern Lab can watch for changes to files in `./source/` and automatically rebuild the entire Pattern Lab website for you. Make your changes, save the file, and Pattern Lab takes care of the rest. + +## How to Start Watching for Changes + +To start watching for changes do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --watch` + +To stop watching files use `CTRL+C` in the same terminal window. + +### Only Watch for Changes to Pattern Lab Files + +If you use a task runner like Gulp or Grunt to compile Sass, JavaScript or images you may want Pattern Lab to only concern itself with its own files. To limit Pattern Lab to watch and move only its files do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --watch --patternsonly` + +Or, better yet, use this command within your Gulp or Grunt script. + +### Start the Web Server & Watch for Changes at the Same Time + +If you're relying on Pattern Lab's server to view your content you'll want to run the watch and server with the same command. Do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --server --with-watch` + +You can also start the server and watch only patterns: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --server --with-watch --patternsonly` + +To stop the server and watching files use `CTRL+C` in the same terminal window. + +### Start the Web Server, Watch for Changes, and Reload the Browser at the Same Time + +The ultimate solution for working with Pattern Lab if you're not using a task runner is Pattern Lab's [Auto-Reload Plugin](https://github.com/pattern-lab/plugin-php-reload). Do the following: + +1. In a terminal window navigate to the root of your project +2. Install the [Auto-Reload Plugin](https://github.com/pattern-lab/plugin-php-reload) using `composer require pattern-lab/plugin-reload` +3. Type `php core/console --server --with-watch` + +The Auto-Reload Plugin is automatically enabled when you install it. You can always [disable the plugin](https://github.com/pattern-lab/plugin-php-reload#disabling-the-plugin) if you need to. + +To stop the server, watching files, and auto-reload service use `CTRL+C` in the same terminal window. + +## What Pattern Lab Will Watch + +By default, the PHP version of Pattern Lab will watch all files in `./source` except those that match the "ignore" configuration options in `config/config.yml`. When using `--patternsonly` Pattern Lab will only watch those directories in `./source` that start with an underscore. For example, `_patterns`. To learn how to modify what is ignored check out "[Managing Assets for a Pattern](/docs/pattern-managing-assets.html)". diff --git a/packages/docs/php-docs/advanced-clean-public.md b/packages/docs/php-docs/advanced-clean-public.md new file mode 100644 index 000000000..408e3ed37 --- /dev/null +++ b/packages/docs/php-docs/advanced-clean-public.md @@ -0,0 +1,5 @@ +--- +title: Stopping public/ from Being "Cleaned" +tags: + - docs +--- diff --git a/packages/docs/php-docs/advanced-config-options.md b/packages/docs/php-docs/advanced-config-options.md new file mode 100644 index 000000000..e21791b71 --- /dev/null +++ b/packages/docs/php-docs/advanced-config-options.md @@ -0,0 +1,7 @@ +--- +title: Editing the Configuration Options +tags: + - docs +--- + +Pattern Lab comes with a simple configuration file that allows you to modify certain aspects of the system. The configuration file can be found in `./config/config.yml`. diff --git a/packages/docs/php-docs/advanced-exporting-patterns.md b/packages/docs/php-docs/advanced-exporting-patterns.md new file mode 100644 index 000000000..49f4857d1 --- /dev/null +++ b/packages/docs/php-docs/advanced-exporting-patterns.md @@ -0,0 +1,17 @@ +--- +title: Exporting Patterns +tags: + - docs +--- + +Pattern Lab can export all of your patterns for you sans Pattern Lab's CSS and JavaScript. To export your patterns do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --export` + +If you require your patterns to be exported without your global header and footer (_e.g. to export a clean molecule_) do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --export --clean` + +In both cases the patterns will be exported to `./export/patterns`. The export directory is one of the many directories that can be [configured and changed](/docs/editing-source-files.html). diff --git a/packages/docs/php-docs/advanced-page-follow.md b/packages/docs/php-docs/advanced-page-follow.md new file mode 100644 index 000000000..3e38bebfc --- /dev/null +++ b/packages/docs/php-docs/advanced-page-follow.md @@ -0,0 +1,7 @@ +--- +title: Multi browser & Multi device Testing with Page Follow +tags: + - docs +--- + +An auto-reload service was built into Pattern Lab 1. With Pattern Lab 2 this feature has been removed. This feature may return as a plugin in the same way that the [Auto-Reload service](/docs/advanced-reload-browser.html) did. diff --git a/packages/docs/php-docs/advanced-pattern-lab-nav.md b/packages/docs/php-docs/advanced-pattern-lab-nav.md new file mode 100644 index 000000000..2bd2c28c5 --- /dev/null +++ b/packages/docs/php-docs/advanced-pattern-lab-nav.md @@ -0,0 +1,29 @@ +--- +title: Modifying Pattern Lab's Navigation +tags: + - docs +--- + +When sharing Pattern Lab with a client it may be beneficial to turn-off certain elements in the default navigation. To turn-off navigation elements do the following: + +1. Open `./config/config.yml` +2. Add the keys for the elements you'd like to hide to the `ishControlsHide` configuration option +3. Re-generate your Pattern Lab site + +The following keys are supported and will hide their respective elements: + +``` +s +m +l +full +random +disco +hay +find +views-new +tools-all +tools-docs +``` + +`hay` is disabled by default. diff --git a/packages/docs/php-docs/advanced-reload-browser.md b/packages/docs/php-docs/advanced-reload-browser.md new file mode 100644 index 000000000..4da045d5f --- /dev/null +++ b/packages/docs/php-docs/advanced-reload-browser.md @@ -0,0 +1,14 @@ +--- +title: Auto Reloading the Browser Window When Changes Are Made +tags: + - docs +--- + +An auto-reload service was built into Pattern Lab 1. With Pattern Lab 2 this feature has been turned into the [Auto-Reload Plugin](https://github.com/pattern-lab/plugin-php-reload). To install this plugin do the following: + +1. In a terminal window navigate to the root of your project +2. Type `composer require pattern-lab/plugin-reload` + +The Auto-Reload Plugin is automatically enabled when you install it. You can always [disable the plugin](https://github.com/pattern-lab/plugin-php-reload#disabling-the-plugin) if you need to. + +This service is enabled when using the `--watch` or `--server --with-watch` commands. Learn more about [watching for changes](/docs/advanced-auto-regenerate.html). diff --git a/packages/docs/php-docs/advanced-starterkits.md b/packages/docs/php-docs/advanced-starterkits.md new file mode 100644 index 000000000..5a90e0bdf --- /dev/null +++ b/packages/docs/php-docs/advanced-starterkits.md @@ -0,0 +1,21 @@ +--- +title: Starterkits +tags: + - docs +--- + +StarterKits can be installed via the following commands: + +``` +php core/console --starterkit --install [starterkit-name] +``` + +where [starterkit-name] is the name of the Starterkit. + +so... a complete example: + +``` +php core/console --starterkit --install pattern-lab/starterkit-mustache-demo +``` + +It is recommended that you do not install this StarterKit as a dependency for your Pattern Lab project via Composer. diff --git a/packages/docs/php-docs/changes-1-to-2.md b/packages/docs/php-docs/changes-1-to-2.md new file mode 100644 index 000000000..38ec38bee --- /dev/null +++ b/packages/docs/php-docs/changes-1-to-2.md @@ -0,0 +1,46 @@ +--- +title: Pattern Lab 1 to Pattern Lab 2 Changes +tags: + - docs +--- + +With Pattern Lab 2 in development for almost two years many under-the-hood changes have been implemented. For the most part a Pattern Lab 1 project should work with minimal changes in Pattern Lab 2. Here is a non-exhaustive list of new features in Pattern Lab 2: + +* complete rebuilding of core +* support for Composer +* support for more template languages (_currently Mustache and Twig_) +* support for StarterKits allowing separation of a team's unique needs from Pattern Lab proper +* event notification system, getters, setters, and a clean install process to allow for plugins +* redesigned and rebuilt modal view +* redesigned and rebuilt styleguide view +* multi-source directory support +* support for YAML in global data, pattern-specific data, and pseudo-patterns +* can have multiple JSON/YAML files in `./_data/` +* support for JSON/YAML linting to find errors +* can set multiple classes using the style modifier +* can use link.[pattern-name] within data to link to other patterns +* pattern parameters support simple lists +* pattern parameters act more like mustache (_but not exactly!_) +* patternParameters can over listItem loop numbers +* global pattern header and footer is now in `./source/_meta` +* upgraded console utility +* patterns and pattern subtypes can be documented in the styleguide by using `[pattern-name].md` or `[pattern-subtype].md` +* view all pages for pattern sub-types +* annotations can be defined using Markdown +* patterns can be exported minus Pattern Lab mark-up +* can hide individual patterns from "view all" view still available via the nav +* can set a pattern to be the default pattern when loading Pattern Lab +* can turn on modal view by default +* implemented server +* sayings can now be defined in the config +* install process that makes it easier to install various components + +These are the features of Pattern Lab 1 that have become plugins: + +* Automatic Browser Reload + +These are the features of Pattern Lab 1 that have been removed in Pattern Lab 2: + +* QR Code Generator +* Page Follow +* MQs diff --git a/packages/docs/php-docs/command-line.md b/packages/docs/php-docs/command-line.md new file mode 100644 index 000000000..264d235c3 --- /dev/null +++ b/packages/docs/php-docs/command-line.md @@ -0,0 +1,22 @@ +--- +title: Using The Command Line Options +tags: + - docs +--- + +To use Pattern Lab you must use the command line interface. To view the available commands when using Pattern Lab do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --help` + +To get the options for a particular command, for example the `--generate` command, you can type: + + php core/console --help --generate + +## A Special Note About Windows + +To access the command prompt on Windows you can [follow the directions from Microsoft](http://windows.microsoft.com/en-us/windows-vista/open-a-command-prompt-window). After getting to the command prompt type the following to make sure you have PHP installed: + + php -v + +If you get an error and know that you've installed PHP you may need to [update your path variable so Windows can find PHP](http://willj.co/2012/10/run-wamp-php-windows-7-command-line/). diff --git a/packages/docs/php-docs/generating-pattern-lab.md b/packages/docs/php-docs/generating-pattern-lab.md new file mode 100644 index 000000000..b9831d371 --- /dev/null +++ b/packages/docs/php-docs/generating-pattern-lab.md @@ -0,0 +1,14 @@ +--- +title: Generating Pattern Lab +tags: + - docs +--- + +Pattern Lab consists of an empty shell when you first install it. To populate the public-facing side of Pattern Lab with your content and patterns do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --generate` + +Your Pattern Lab install should now be populated and [available for viewing](/docs/viewing-patterns.html). As you [make changes to your patterns](/docs/editing-source-files.html) you'll need re-generate your site using step 2 above. + +Manually re-generating your site after each change or collection of changes can be cumbersome. Pattern Lab can [watch files in the `./source/` directory for changes and re-generate the site automatically](/docs/advanced-auto-regenerate.html). The Pattern Lab website can also be [automatically reloaded](/docs/advanced-reload-browser.html). diff --git a/packages/docs/php-docs/installation.md b/packages/docs/php-docs/installation.md new file mode 100644 index 000000000..23b3ec3c4 --- /dev/null +++ b/packages/docs/php-docs/installation.md @@ -0,0 +1,5 @@ +--- +title: Installing Pattern Lab +tags: + - docs +--- diff --git a/packages/docs/php-docs/pattern-managing-assets.md b/packages/docs/php-docs/pattern-managing-assets.md new file mode 100644 index 000000000..1f6927cde --- /dev/null +++ b/packages/docs/php-docs/pattern-managing-assets.md @@ -0,0 +1,41 @@ +--- +title: Managing Pattern Assets +tags: + - docs +--- + +Assets for patterns - including JavaScript, CSS, and images - should be stored and edited in the `./source/` directory. Pattern Lab will move these assets to the `./public/` directory for you when you generate your site or when you watch the `./source/` directory for changes. **You can name and organize your assets however you like.** If you would like to use `./source/stylesheets/` to store your styles instead of `./source/css/` you can do that. There is nothing to configure. The structure will be maintained when they're moved to the `./public/` directory. + +## Ignoring and Not Moving Assets Based on File Extension + +By default, Pattern Lab will not move assets with the following file extensions: + +- `.less` +- `.scss` +- `.DS_Store` + +To ignore more file extensions edit the `ie` configuration option in `./config/config.yml`. For example, to ignore `*.png` files your `ie` configuration option would look like: + + ie: + - DS_Store + - less + - scss + - png + +## Ignoring and Not Moving Assets Based on Directory + +By default, the PHP version of Pattern Lab will ignore **all** assets in directories that exactly match: + +- `scss` + +To ignore more directories just edit the `id` configuration option in `./config/config.yml`. For example, to ignore directories named `test/` your `id` configuration option would look like: + + id: + - scss + - test + +**Important:** Pattern Lab will only ignore exact matches of ignored directories. For example, if you had a directory named `cool_scss/` it, and the assets underneath it, _would_ be moved to `./public/` even though `scss` was in the name of the directory. + +## Adding Assets to the Pattern Header & Footer + +Static assets like Javascript and CSS **are not** added automagically to your patterns. You need to add them manually to the [shared pattern header and footer](/docs/pattern-header-footer.html). diff --git a/packages/docs/php-docs/pattern-states.md b/packages/docs/php-docs/pattern-states.md new file mode 100644 index 000000000..cebea9de9 --- /dev/null +++ b/packages/docs/php-docs/pattern-states.md @@ -0,0 +1,45 @@ +--- +title: Using Pattern States +tags: + - docs +--- + +Pattern states provide your team and client a simple visual of the current state of patterns in Pattern Lab. Pattern states can track progress of a pattern from development, through client review, to completion or they can be used to give certain patterns specific classes. It's important to note that the state of a pattern can be influenced by its pattern partials. + +## The Default Pattern States + +Pattern Lab comes with the following default pattern states: + +- **inprogress**: pattern is in development or being worked upon. a red dot. +- **inreview**: pattern is ready for a client to look at and comment upon. a yellow dot. +- **complete**: pattern is ready to be moved to production. a green dot. + +Any pattern that includes a pattern partial that has a lower pattern state will inherit that state. For example, a pattern with the state of `inreview` that includes a pattern partial with the state of `inprogress` will have its state overridden and set to `inprogress`. It will not change to `inreview` until the pattern partial has a state of `inreview` or `complete`. + +## Giving Patterns a State + +Giving patterns a state is simply a matter of modifying the file name. If we wanted to give our `molecules-media-block` pattern a state of `inprogress` we'd change the file name from: + +``` +./source/_patterns/01-molecules/02-blocks/00-media-block.mustache +``` + +to: + +``` +./source/_patterns/01-molecules/02-blocks/00-media-block@inprogress.mustache +``` + +## Adding Customized States + +The three default states included with Pattern Lab might not be enough for everyone. To add customized states you should modify your own CSS files. **DO NOT** modify `states.css` in `public/styleguide/css/`. This is because `states.css` will be overwritten in future upgrades. + +You can use the following as your CSS template for new pattern states: + +```css +{% raw %}.newpatternstate:before { + color: #B10DC9 !important; +}{% endraw %} +``` + +Then add `@newpatternstate` to your patterns to have the new look show up. If you want to add it to the cascade of the default patterns you can modify `./config/config.yml`. Simply add your new pattern state to the `patternStates` list. diff --git a/packages/docs/php-docs/requirements.md b/packages/docs/php-docs/requirements.md new file mode 100644 index 000000000..7a741bb60 --- /dev/null +++ b/packages/docs/php-docs/requirements.md @@ -0,0 +1,22 @@ +--- +title: Requirements +tags: + - docs +--- + + + +The requirements for Pattern Lab 2 vary depending on what features you want to use. + +## Minimum Requirements + +To use the basic features of Pattern Lab to compile patterns, you must have **PHP 5.4+** installed. On Mac OS X Pattern Lab should work "out of the box." If you're on Windows you can [download PHP from PHP.net](http://windows.php.net/download/). Pattern Lab comes with its own built-in web server. + +Because Pattern Lab's output consists of HTML, CSS, and JavaScript there are **no requirements** for hosting your Pattern Lab site. Simply upload the `./public/` directory to your host and you should be good to go. + +## Highly Recommended: Composer + +Pattern Lab uses [Composer](https://getcomposer.org/) to manage project dependencies. While Pattern Lab can be downloaded as a Zip we highly recommend installing Composer so you can easily update your project in the future. Please follow the directions for [installing Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) on the Composer website. We recommend you [install it globally](https://getcomposer.org/doc/00-intro.md#globally). + + + diff --git a/packages/docs/php-docs/upgrading.md b/packages/docs/php-docs/upgrading.md new file mode 100644 index 000000000..8daf7ab1d --- /dev/null +++ b/packages/docs/php-docs/upgrading.md @@ -0,0 +1,52 @@ +--- +title: Upgrading Pattern Lab +tags: + - docs +--- + + + +Pattern Lab 2 uses [Composer](https://getcomposer.org) to manage project dependencies. To upgrade an edition based on Pattern Lab 2 do the following: + +1. In a terminal window navigate to the root of your project +2. Type `composer update` + +During the upgrade process Pattern Lab 2 will move or add any files that are required for the new version to work. It will also update your configuration as appropriate. If you don't have Composer installed please [follow the directions for installing Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) that are available on the Composer website. We recommend you [install it globally](https://getcomposer.org/doc/00-intro.md#globally). + +## Upgrading Pattern Lab 1 to Pattern Lab 2 + +Pattern Lab 2 was a complete rewrite and reorganization of Pattern Lab 1. [Learn about the changes](/docs/changes-1-to-2.html). To upgrade do the following: + +1. [Download](http://patternlab.io/download.html) the PHP edition that matches your needs + +If you chose a Mustache-based edition do the following: + +1. Copy `./source` from your old project to your new edition +2. Copy `./source/_patterns/00-atoms/00-meta/_00-head.mustache` to `./source/_meta/_00-head.mustache` +3. Copy `./source/_patterns/00-atoms/00-meta/_01-foot.mustache` to `./source/_meta/_00-foot.mustache` (you can then delete `source/_patterns/00-atoms/00-meta/` directory) +4. In `./source/_meta/_00-head.mustache`, replace `{% raw %}{% pattern-lab-head %}{% endraw %}` with `{% raw %}{{{ patternLabHead }}}{% endraw %}` +5. In `./source/_meta/_00-foot.mustache` replace `{% raw %}{% pattern-lab-foot %}{% endraw %}` with `{% raw %}{{{ patternLabFoot }}}{% endraw %}` +6. Copy `./source/_data/annotations.js` to `./source/_annotations/annotations.js` +7. Remove the underscore in front of the JSON files in `source/data` (i.e. `data.json` not `_data.json`). + + + +If you chose another version do the above and convert the templates as appropriate. + +## Learning About Upgrades + +New releases and upgrades are announced in Pattern Lab's [PHP room on Gitter](https://gitter.im/pattern-lab/php) and on Twitter at [@patternlabio](https://twitter.com/patternlabio). + +You can also determine if your version of Pattern Lab 2 can be upgraded yourself by doing the following: + +1. In a terminal window navigate to the root of your project +2. Type `composer outdated` + +Two components of Pattern Lab 2 maintain CHANGELOGs as part of their "Releases" page on GitHub: + +* [pattern-lab/core](https://github.com/pattern-lab/patternlab-php-core/releases) +* [pattern-lab/styleguidekit-assets-default](https://github.com/pattern-lab/styleguidekit-assets-default/releases) + + + + diff --git a/packages/docs/php-docs/viewing-patterns.html b/packages/docs/php-docs/viewing-patterns.html new file mode 100644 index 000000000..ebc7461d4 --- /dev/null +++ b/packages/docs/php-docs/viewing-patterns.html @@ -0,0 +1,17 @@ +--- +title: Viewing Patterns +tags: + - docs +--- + + + +Pattern Lab utilizes PHP's [built-in web server](http://php.net/manual/en/features.commandline.webserver.php) to let you browse your generated patterns. To start the server do the following: + +1. In a terminal window navigate to the root of your project +2. Type `php core/console --server` + +Your local Pattern Lab install should now be available for browsing at [http://localhost:8080](http://localhost:8080). + + + diff --git a/packages/docs/rollup.config.js b/packages/docs/rollup.config.js new file mode 100644 index 000000000..7f62e07f4 --- /dev/null +++ b/packages/docs/rollup.config.js @@ -0,0 +1,19 @@ +const builtins = require('@erquhart/rollup-plugin-node-builtins'); +const commonjs = require('rollup-plugin-commonjs'); +const nodeResolve = require('rollup-plugin-node-resolve'); +const json = require('rollup-plugin-json'); + +export default { + input: 'src/admin/util', + output: { + file: 'dist/admin/util.js', + format: 'iife', + name: 'previewUtil', + }, + plugins: [ + builtins(), + nodeResolve(), + commonjs(), + json(), + ] +}; diff --git a/packages/docs/src/404.md b/packages/docs/src/404.md new file mode 100644 index 000000000..eccd5a45c --- /dev/null +++ b/packages/docs/src/404.md @@ -0,0 +1,17 @@ +--- +title: '404 - not found' +layout: layouts/page.njk +permalink: 404.html +eleventyExcludeFromCollections: true +--- + +We’re sorry, but that content can’t be found. Please go [back to home](/). + +{% comment %} +Read more: https://www.11ty.io/docs/quicktips/not-found/ + +This will work for both GitHub pages and Netlify: + +- https://help.github.com/articles/creating-a-custom-404-page-for-your-github-pages-site/ +- https://www.netlify.com/docs/redirects/#custom-404 + {% endcomment %} diff --git a/packages/docs/src/_data/global.js b/packages/docs/src/_data/global.js new file mode 100644 index 000000000..683a0a332 --- /dev/null +++ b/packages/docs/src/_data/global.js @@ -0,0 +1,9 @@ +module.exports = { + random() { + const segment = () => { + return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); + }; + return `${segment()}-${segment()}-${segment()}`; + }, + now: Date.now() +}; diff --git a/packages/docs/src/_data/helpers.js b/packages/docs/src/_data/helpers.js new file mode 100644 index 000000000..9ae9b7883 --- /dev/null +++ b/packages/docs/src/_data/helpers.js @@ -0,0 +1,10 @@ +module.exports = { + getNextHeadingLevel(currentLevel) { + return parseInt(currentLevel, 10) + 1; + }, + getReadingTime(text) { + const wordsPerMinute = 200; + const numberOfWords = text.split(/\s/g).length; + return Math.ceil(numberOfWords / wordsPerMinute); + } +}; diff --git a/packages/docs/src/_data/navigation.json b/packages/docs/src/_data/navigation.json new file mode 100644 index 000000000..8838d1f0b --- /dev/null +++ b/packages/docs/src/_data/navigation.json @@ -0,0 +1,66 @@ +{ + "items": [ + { + "label": "Getting Started", + "url": "/docs/installing-pattern-lab/" + }, + { + "label": "Documentation", + "url": "/docs/", + "subnavIsClosed": true, + "subnav": [ + { + "label": "Getting Started", + "category": "getting-started" + }, + { + "label": "Working with Patterns", + "category": "patterns" + }, + { + "label": "Working with Data", + "category": "data" + }, + { + "label": "Advanced", + "category": "advanced" + } + ] + }, + { + "label": "Demos", + "url": "/demos/" + }, + { + "label": "Support", + "url": "/support/" + }, + { + "label": "Resources", + "url": "/resources/" + }, + { + "label": "On Github", + "url": "https://github.com/pattern-lab/patternlab-node", + "external": true + } + ], + "footerNav": [ + { + "label": "Resources", + "url": "/resources" + }, + { + "label": "Updates", + "url": "/updates" + }, + { + "label": "Demos", + "url": "/demos" + }, + { + "label": "On Github", + "url": "https://github.com/pattern-lab/patternlab-node" + } + ] +} diff --git a/packages/docs/src/_data/site.json b/packages/docs/src/_data/site.json new file mode 100644 index 000000000..8a5e4ce23 --- /dev/null +++ b/packages/docs/src/_data/site.json @@ -0,0 +1,13 @@ +{ + "showThemeCredit": true, + "name": "Pattern Lab", + "shortDesc": "Pattern Lab is a frontend workshop environment that helps you build, view, test, and showcase your design system's UI components.", + "url": "https://patternlab.io/", + "authorEmail": "brad@bradfrost.com", + "authorHandle": "@bradfrost", + "authorName": "Brad Frost", + "enableThirdPartyComments": false, + "maxPostsPerPage": 5, + "paymentPointer": "$coil.xrptipbot.com/c1f8f05d-8d8c-4f37-b1ad-25677ae129da", + "faviconPath": "/images/favicon.ico" +} diff --git a/packages/docs/src/_data/styleguide.js b/packages/docs/src/_data/styleguide.js new file mode 100644 index 000000000..4969bec39 --- /dev/null +++ b/packages/docs/src/_data/styleguide.js @@ -0,0 +1,28 @@ +const tokens = require('./tokens.json'); + +module.exports = { + colors() { + let response = []; + + Object.keys(tokens.colors).forEach(key => { + response.push({ + value: tokens.colors[key], + key + }); + }); + + return response; + }, + sizes() { + let response = []; + + Object.keys(tokens['size-scale']).forEach(key => { + response.push({ + value: tokens['size-scale'][key], + key + }); + }); + + return response; + } +}; diff --git a/packages/docs/src/_data/tokens.json b/packages/docs/src/_data/tokens.json new file mode 100644 index 000000000..b5bf4b3ae --- /dev/null +++ b/packages/docs/src/_data/tokens.json @@ -0,0 +1,26 @@ +{ + "size-scale": { + "base": "1rem", + "300": "0.8rem", + "500": "1.25rem", + "600": "1.56rem", + "700": "1.95rem", + "800": "2.44rem", + "900": "3.05rem", + "max": "4rem" + }, + "colors": { + "primary": "#173854", + "primary-shade": "#102538", + "primary-glare": "#22547c", + "highlight": "#fedb8b", + "light": "#ffffff", + "mid": "#cccccc", + "dark": "#333333", + "slate": "#404040" + }, + "fonts": { + "base": "\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'\"", + "serif": "\"'Lora', serif\"" + } +} diff --git a/packages/docs/src/_includes/components/footer-nav.njk b/packages/docs/src/_includes/components/footer-nav.njk new file mode 100644 index 000000000..54a448266 --- /dev/null +++ b/packages/docs/src/_includes/components/footer-nav.njk @@ -0,0 +1,10 @@ + diff --git a/packages/docs/src/_includes/components/footer.njk b/packages/docs/src/_includes/components/footer.njk new file mode 100644 index 000000000..7764312d2 --- /dev/null +++ b/packages/docs/src/_includes/components/footer.njk @@ -0,0 +1,10 @@ + diff --git a/packages/docs/src/_includes/components/header.njk b/packages/docs/src/_includes/components/header.njk new file mode 100644 index 000000000..5e9ebd5de --- /dev/null +++ b/packages/docs/src/_includes/components/header.njk @@ -0,0 +1,21 @@ +
+
+ {% include "components/logo.njk" %} + + + +
+ {% include "components/tree-nav.njk" %} + + + +
+
+ +
+ + diff --git a/packages/docs/src/_includes/components/hero.njk b/packages/docs/src/_includes/components/hero.njk new file mode 100644 index 000000000..7053c247c --- /dev/null +++ b/packages/docs/src/_includes/components/hero.njk @@ -0,0 +1,16 @@ +
+
+
+

Create atomic design systems with Pattern Lab

+ +

+ Pattern Lab is a frontend workshop environment that helps you build, view, test, and showcase your design system's UI components. +

+ +

+ Run the following command in your terminal and read the installation guide to get started: +

+
npm create pattern-lab
+
+
+
\ No newline at end of file diff --git a/packages/docs/src/_includes/components/icon-chevron-down.njk b/packages/docs/src/_includes/components/icon-chevron-down.njk new file mode 100644 index 000000000..37c8e757a --- /dev/null +++ b/packages/docs/src/_includes/components/icon-chevron-down.njk @@ -0,0 +1,4 @@ + +cheveron-down + + \ No newline at end of file diff --git a/packages/docs/src/_includes/components/logo.njk b/packages/docs/src/_includes/components/logo.njk new file mode 100644 index 000000000..b8b528064 --- /dev/null +++ b/packages/docs/src/_includes/components/logo.njk @@ -0,0 +1,11 @@ + + + diff --git a/packages/docs/src/_includes/components/meta-info.njk b/packages/docs/src/_includes/components/meta-info.njk new file mode 100644 index 000000000..c7d6a3aa0 --- /dev/null +++ b/packages/docs/src/_includes/components/meta-info.njk @@ -0,0 +1,41 @@ +{% set pageTitle = title + ' - ' + site.name %} +{% set pageDesc = '' %} +{% set siteTitle = site.name %} +{% set currentUrl = site.url + page.url %} + +{% if metaTitle %} + {% set pageTitle = metaTitle %} +{% endif %} + +{% if metaDesc %} + {% set pageDesc = metaDesc %} +{% endif %} + +{{ pageTitle }} + + + + + + + +{% if site.authorHandle %} + +{% endif %} + +{% if metaDesc %} + + + +{% endif %} + +{% if socialImage %} + + + + +{% endif %} + +{% if site.paymentPointer %} + +{% endif %} diff --git a/packages/docs/src/_includes/components/page-header.njk b/packages/docs/src/_includes/components/page-header.njk new file mode 100644 index 000000000..8fbae6236 --- /dev/null +++ b/packages/docs/src/_includes/components/page-header.njk @@ -0,0 +1,13 @@ +
+ + {% if introKicker %} +

{{ introKicker }}

+ {% endif %} + +

{{ introHeading }}

+ + {% if introDescription %} +

{{ introDescription }}

+ {% endif %} + +
diff --git a/packages/docs/src/_includes/components/stacked-block.njk b/packages/docs/src/_includes/components/stacked-block.njk new file mode 100644 index 000000000..24c79fb1f --- /dev/null +++ b/packages/docs/src/_includes/components/stacked-block.njk @@ -0,0 +1,6 @@ +
+

+ {{ title }} +

+

{{ description }}

+
\ No newline at end of file diff --git a/packages/docs/src/_includes/components/tile.njk b/packages/docs/src/_includes/components/tile.njk new file mode 100644 index 000000000..a2aeb04cf --- /dev/null +++ b/packages/docs/src/_includes/components/tile.njk @@ -0,0 +1,9 @@ +
+
+

+ {{ title }} +

+
{{ description | safe }}
+
+
+
\ No newline at end of file diff --git a/packages/docs/src/_includes/components/tree-nav.njk b/packages/docs/src/_includes/components/tree-nav.njk new file mode 100644 index 000000000..83492e7f0 --- /dev/null +++ b/packages/docs/src/_includes/components/tree-nav.njk @@ -0,0 +1,33 @@ + + + + diff --git a/packages/docs/src/_includes/components/tree-subnav.njk b/packages/docs/src/_includes/components/tree-subnav.njk new file mode 100644 index 000000000..9265520ab --- /dev/null +++ b/packages/docs/src/_includes/components/tree-subnav.njk @@ -0,0 +1,11 @@ +{% set navPages = collections.docs | eleventyNavigation %} + + diff --git a/packages/docs/src/_includes/icons/arrow.svg b/packages/docs/src/_includes/icons/arrow.svg new file mode 100644 index 000000000..153b9eed7 --- /dev/null +++ b/packages/docs/src/_includes/icons/arrow.svg @@ -0,0 +1,13 @@ + diff --git a/packages/docs/src/_includes/layouts/archive.njk b/packages/docs/src/_includes/layouts/archive.njk new file mode 100644 index 000000000..d1b328ed8 --- /dev/null +++ b/packages/docs/src/_includes/layouts/archive.njk @@ -0,0 +1,17 @@ +{% extends 'layouts/base.njk' %} +{% set pageType = 'Post Archive' %} + +{# Intro content #} +{% set introHeading = title %} +{% set introSummary %}{{ content | safe }}{% endset %} + +{# Post list content #} +{% set postListHeading = 'All posts' %} +{% set postListItems = collections.posts %} + +{% block content %} +
+ {% include "partials/components/intro.njk" %} + {% include "partials/components/post-list.njk" %} +
+{% endblock %} diff --git a/packages/docs/src/_includes/layouts/base.njk b/packages/docs/src/_includes/layouts/base.njk new file mode 100644 index 000000000..6d21c8837 --- /dev/null +++ b/packages/docs/src/_includes/layouts/base.njk @@ -0,0 +1,37 @@ + + + + + + + + + + {% include "components/meta-info.njk" %} + + + {% block head %} + {% endblock %} + + +
+
+ {% include "components/header.njk" %} +
+ + +
+
+ {% block content %} + {% endblock content %} +
+ + {% include "components/footer.njk" %} + {% block foot %} + {% endblock %} +
+ +
+ + + diff --git a/packages/docs/src/_includes/layouts/blog.njk b/packages/docs/src/_includes/layouts/blog.njk new file mode 100644 index 000000000..bc7b10eef --- /dev/null +++ b/packages/docs/src/_includes/layouts/blog.njk @@ -0,0 +1,17 @@ +{% extends 'layouts/base.njk' %} + +{# Intro content #} +{% set introHeading = title %} +{% set introDescription = description %} + +{# Post list content #} +{% set postListItems = collections.posts %} + +{% block content %} +
+
+ {% include "components/page-header.njk" %} + {% include "partials/components/post-list.njk" %} +
+
+{% endblock %} diff --git a/packages/docs/src/_includes/layouts/demos.njk b/packages/docs/src/_includes/layouts/demos.njk new file mode 100644 index 000000000..f16878645 --- /dev/null +++ b/packages/docs/src/_includes/layouts/demos.njk @@ -0,0 +1,25 @@ +{% extends 'layouts/base.njk' %} +{% set pageType = 'Post Archive' %} + +{# Intro content #} +{% set introHeading = title %} +{% set introSummary %}{{ content | safe }}{% endset %} + +{# Post list content #} +{% set demoListItems = collections.demos %} + +{% block content %} +
+
+ {% include "components/page-header.njk" %} + +

In the wild

+ {% set demoListCategory = 'example' %} + {% include "partials/components/demo-list.njk" %} + +

Starterkits

+ {% set demoListCategory = 'starterkit' %} + {% include "partials/components/demo-list.njk" %} +
+
+{% endblock %} \ No newline at end of file diff --git a/packages/docs/src/_includes/layouts/docs.njk b/packages/docs/src/_includes/layouts/docs.njk new file mode 100644 index 000000000..e29cc063e --- /dev/null +++ b/packages/docs/src/_includes/layouts/docs.njk @@ -0,0 +1,28 @@ +--- +permalink: docs/{{ title | slug }}/ +--- + +{% extends 'layouts/base.njk' %} +{% set pageType = 'Docs' %} + +{# Intro content #} +{% set introHeading = title %} +{% set introSummary %} + +{% endset %} + +{% block content %} +
+
+
+ {% include "components/page-header.njk" %} +
+ {{ content | safe }} +
+ +
+
+
+{% endblock %} + +{{ content | safe }} diff --git a/packages/docs/src/_includes/layouts/home.njk b/packages/docs/src/_includes/layouts/home.njk new file mode 100644 index 000000000..1172fcd55 --- /dev/null +++ b/packages/docs/src/_includes/layouts/home.njk @@ -0,0 +1,93 @@ +{% extends 'layouts/base.njk' %} +{% set pageType = 'Homepage' %} + +{% block content %} + + {% include "components/hero.njk" %} + +
+
    +
  • + {% set styleModifier = 'c-tile--green' %} + {% set title = 'Read the docs' %} + {% set link = '/docs/installing-pattern-lab' %} + {% set description = "Learn how to get up and running with Pattern Lab, work with patterns, design with dynamic data, and use Pattern Lab's advanced features." %} + {% include "components/tile.njk" %} +
  • +
  • + {% set styleModifier = 'c-tile--orange' %} + {% set title = 'Demos' %} + {% set link = '/demos' %} + {% set description = "Demos of pattern starterkits for your project as well as a gallery of Pattern Lab projects in the wild" %} + {% include "components/tile.njk" %} +
  • +
  • + {% set styleModifier = 'c-tile--purple' %} + {% set title = 'Resources' %} + {% set link = '/resources' %} + {% set description = "Links to articles and resources around Pattern Lab and design systems" %} + {% include "components/tile.njk" %} +
  • +
+
+ +
+

Pattern Lab features

+

At its core, Pattern Lab is a Node-powered static site generator that stitches together UI components. But there's a whole lot more to it than that!

+
    +
  • + {% set title="Nested Patterns" %} + {% set description="Include UI patterns inside each other like Russian nesting dolls. Make a change to a pattern and immediately see those changes reflected anywhere it is included." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Design With Dynamic Data" %} + {% set description="Create living UI prototypes using dynamic data to ensure your components can handle the dynamic nature of your content." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Tool Agnostic" %} + {% set description="Pattern Lab doesn't impose any tools or libraries on you, which means you have full control over how author your project." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Language Agnostic" %} + {% set description="Use atomic design language, or don't! it's totally up to you how you name, structure, and organize your Pattern Lab project." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Pattern Documentation" %} + {% set description="Define and describe your UI patterns so your entire team can start speaking the same language to collaborate more effectively." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Viewport Resizer Tools" %} + {% set description="Pattern Lab includes viewport resizing tools to ensure your design system's components and pages are fully responsive." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Pattern Lineage" %} + {% set description="X-ray vision! Quickly view where patterns where components are used, speeding up design, development, and QA time." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Pattern Starter Kits" %} + {% set description="Start your Pattern Lab project with a blank slate, a few sample components, or a full-on demo project." %} + {% include "components/stacked-block.njk" %} +
  • +
  • + {% set title="Flexible and Extensible" %} + {% set description="Pattern Lab supports Handlebars and Twig templating engines. Also you can or build a plugin to extend Pattern Lab's capabilities even further." %} + {% include "components/stacked-block.njk" %} +
  • +
+ + {% set styleModifier = 'c-tile--orange' %} + {% set title = 'Open source and community driven' %} + {% set link = '/support' %} + {% set description = "Pattern Lab is (and will always be) an open source project. Check out the project on
GitHub and join the Pattern Lab Gitter community for conversation and support." %} + {% include "components/tile.njk" %} + +
+ +{% endblock %} diff --git a/packages/docs/src/_includes/layouts/page-base.njk b/packages/docs/src/_includes/layouts/page-base.njk new file mode 100644 index 000000000..4a921e27f --- /dev/null +++ b/packages/docs/src/_includes/layouts/page-base.njk @@ -0,0 +1,24 @@ +{% extends 'layouts/base.njk' %} +{% set pageType = 'Resources' %} + +{# Intro content #} +{% set introHeading = title %} +{% set introSummary %} + +{% endset %} + +{% block content %} +
+
+
+ {% include "components/page-header.njk" %} +
+ {{ content | safe }} +
+ +
+
+
+{% endblock %} + +{{ content | safe }} diff --git a/packages/docs/src/_includes/layouts/page.njk b/packages/docs/src/_includes/layouts/page.njk new file mode 100644 index 000000000..0714fa10c --- /dev/null +++ b/packages/docs/src/_includes/layouts/page.njk @@ -0,0 +1,19 @@ +{% extends 'layouts/base.njk' %} +{% set pageType = 'Page' %} + +{# Intro content #} +{% set introHeading = title %} + +{% block content %} +
+
+
+ {% include "components/page-header.njk" %} + {{ content | safe }} +
+
+
+ +{% endblock %} + +{{ content | safe }} diff --git a/packages/docs/src/_includes/layouts/post.njk b/packages/docs/src/_includes/layouts/post.njk new file mode 100644 index 000000000..6a4702769 --- /dev/null +++ b/packages/docs/src/_includes/layouts/post.njk @@ -0,0 +1,25 @@ +{% extends 'layouts/base.njk' %} +{% set pageType = 'Post' %} + +{# Intro content #} +{% if date %} +{% set introKicker = date | dateFilter %} +{% endif %} +{% set introHeading = title %} + + +{% block content %} +
+
+
+ {% include "components/page-header.njk" %} + +
+ {{ content | safe }} +
+
+
+
+{% endblock %} + +{{ content | safe }} diff --git a/packages/docs/src/_includes/partials/components/demo-list.njk b/packages/docs/src/_includes/partials/components/demo-list.njk new file mode 100644 index 000000000..d220b7a9a --- /dev/null +++ b/packages/docs/src/_includes/partials/components/demo-list.njk @@ -0,0 +1,25 @@ +{% if demoListItems.length %} + +
    + {% for item in demoListItems %} + + {% if item.data.category == demoListCategory %} +
  1. + + + {{item.data.title}} +

    + {{ item.data.title }} +

    +

    + {{ item.data.description}} +

    +
    + +
  2. + {% endif %} + + {% endfor %} +
+ +{% endif %} diff --git a/packages/docs/src/_includes/partials/components/intro.njk b/packages/docs/src/_includes/partials/components/intro.njk new file mode 100644 index 000000000..e5cc10c13 --- /dev/null +++ b/packages/docs/src/_includes/partials/components/intro.njk @@ -0,0 +1,8 @@ +
+
+

{{ introHeading }}

+ {% if introSummary %} +
{{ introSummary | safe }}
+ {% endif %} +
+
diff --git a/packages/docs/src/_includes/partials/components/nav.njk b/packages/docs/src/_includes/partials/components/nav.njk new file mode 100644 index 000000000..0b9cbcf6f --- /dev/null +++ b/packages/docs/src/_includes/partials/components/nav.njk @@ -0,0 +1,22 @@ +{% if navigation.items %} + +{% endif %} diff --git a/packages/docs/src/_includes/partials/components/pagination.njk b/packages/docs/src/_includes/partials/components/pagination.njk new file mode 100644 index 000000000..d78236a2a --- /dev/null +++ b/packages/docs/src/_includes/partials/components/pagination.njk @@ -0,0 +1,23 @@ +{% set paginationLinkTokens = 'leading-tight text-500 weight-mid box-inline-flex align-center pad-bottom-300' %} + +{% if paginationNextUrl or paginationPrevUrl %} +
+ +{% endif %} diff --git a/packages/docs/src/_includes/partials/components/post-list.njk b/packages/docs/src/_includes/partials/components/post-list.njk new file mode 100644 index 000000000..7a241e2e1 --- /dev/null +++ b/packages/docs/src/_includes/partials/components/post-list.njk @@ -0,0 +1,22 @@ + +{% if postListItems.length %} + +
    + {% for item in postListItems %} +
  1. + + +

    + + {{ item.data.title }} +

    +

    + {{ item.data.description}} +

    +
    + +
  2. + {% endfor %} +
+ +{% endif %} diff --git a/packages/docs/src/admin.njk b/packages/docs/src/admin.njk new file mode 100644 index 000000000..c1c5517d1 --- /dev/null +++ b/packages/docs/src/admin.njk @@ -0,0 +1,22 @@ +--- +permalink: '/admin/index.html' +--- + + + + + + Content Manager + + + + + + + + + + + + + diff --git a/packages/docs/src/admin/config.yml b/packages/docs/src/admin/config.yml new file mode 100644 index 000000000..15abea8bc --- /dev/null +++ b/packages/docs/src/admin/config.yml @@ -0,0 +1,243 @@ +backend: + name: git-gateway + branch: master +publish_mode: editorial_workflow +site_url: 'https://example.com' +media_folder: 'src/images' +public_folder: 'images' +collections: + - name: 'pages' + label: 'Pages' + files: + - name: 'home' + label: 'Homepage' + delete: false + file: 'src/index.md' + slug: '{{slug}}' + create: false + fields: + - { + label: 'Layout', + name: 'layout', + widget: 'hidden', + default: 'layouts/njk.njk', + } + - {label: 'Title', name: 'title', widget: 'string'} + - { + label: 'SEO Meta Title', + name: 'metaTitle', + widget: 'string', + required: false, + } + - { + label: 'SEO Meta Description', + name: 'metaDesc', + widget: 'string', + required: false, + } + - { + label: 'Post Feed Heading', + name: 'postsHeading', + widget: 'string', + default: 'Latest posts', + } + - { + label: 'Archive Link Text', + name: 'archiveButtonText', + widget: 'string', + default: 'See all posts', + } + - {label: 'Social Image', name: 'socialImage', widget: 'image', required: false} + - {label: 'Body', name: 'body', widget: 'markdown'} + - name: 'generic_pages' + label: 'Generic Pages' + folder: 'src/pages' + slug: '{{slug}}' + preview_path: 'pages/{{slug}}' + create: true + fields: + - {label: 'Layout', name: 'layout', widget: 'hidden', default: 'layouts/page.njk'} + - {label: 'Title', name: 'title', widget: 'string'} + - { + label: "Permalink Override (Pattern: '/your-slug/index.html')", + name: 'permalink', + widget: 'string', + required: false, + } + - {label: 'SEO Meta Title', name: 'metaTitle', widget: 'string', required: false} + - { + label: 'SEO Meta Description', + name: 'metaDesc', + widget: 'string', + required: false, + } + - {label: 'Social Image', name: 'socialImage', widget: 'image', required: false} + - {label: 'Body', name: 'body', widget: 'markdown'} + - name: 'posts' + label: 'Posts' + folder: 'src/posts' + slug: '{{slug}}' + preview_path: 'posts/{{slug}}' + create: true + fields: + - {label: 'Layout', name: 'layout', widget: 'hidden', default: 'layouts/post.njk'} + - {label: 'Title', name: 'title', widget: 'string'} + - {label: 'SEO Meta Title', name: 'metaTitle', widget: 'string', required: false} + - { + label: 'SEO Meta Description', + name: 'metaDesc', + widget: 'string', + required: false, + } + - {label: 'Social Image', name: 'socialImage', widget: 'image', required: false} + - {label: 'Publish Date', name: 'date', widget: 'datetime'} + - {label: 'Tags', name: 'tags', widget: 'list', allow_add: true} + - {label: 'Body', name: 'body', widget: 'markdown'} + - name: 'docs' + label: 'Docs' + folder: 'src/docs' + slug: '{{slug}}' + preview_path: 'docs/{{slug}}' + create: true + fields: + - {label: 'Layout', name: 'layout', widget: 'hidden', default: 'layouts/post.njk'} + - {label: 'Title', name: 'title', widget: 'string'} + - {label: 'Publish Date', name: 'date', widget: 'datetime'} + - {label: 'Tags', name: 'tags', widget: 'list', allow_add: true} + - {label: 'Body', name: 'body', widget: 'markdown'} + - label: 'Globals' + name: 'globals' + files: + - label: 'Site Data' + name: 'site_data' + delete: false + file: 'src/_data/site.json' + fields: + - {label: 'Site Name', name: 'name', widget: 'string'} + - {label: 'Site Url', name: 'url', widget: 'string'} + - {label: 'Author Name', name: 'authorName', widget: 'string'} + - {label: 'Author Email Address', name: 'authorEmail', widget: 'string'} + - { + label: 'Author Twitter Handle', + name: 'authorHandle', + widget: 'string', + required: false, + } + - {label: 'Footer Short Description', name: 'shortDesc', widget: 'string'} + - { + label: 'Maximum Posts Per Page', + name: 'maxPostsPerPage', + widget: 'number', + default: 5, + } + - { + label: 'Show Theme Credit', + name: 'showThemeCredit', + widget: 'boolean', + default: true, + } + - { + label: 'Enable Third Party Comments Area', + name: 'enableThirdPartyComments', + widget: 'boolean', + default: false, + } + - { + label: 'Payment Pointer (Web Monetization: https://bit.ly/2kTRI1b)', + name: 'paymentPointer', + widget: 'string', + } + - { + label: 'Favicon path (EG: /images/favicon.png)', + name: 'faviconPath', + widget: 'string', + } + - label: 'Navigation' + name: 'nav' + delete: false + file: 'src/_data/navigation.json' + fields: + - label: 'Items' + name: 'items' + widget: 'list' + fields: + - {label: 'Text', name: 'text', widget: 'string'} + - {label: 'Url', name: 'url', widget: 'string'} + - { + label: 'Is url to external site?', + name: 'external', + widget: 'boolean', + required: false, + } + - label: 'Theme Settings' + name: 'theme' + delete: false + file: 'src/_data/tokens.json' + fields: + - label: 'Size Scale' + name: 'size-scale' + widget: 'object' + fields: + - {label: 'Base Size', name: 'base', widget: 'string', default: '1rem'} + - {label: 'Ratio: 300', name: '300', widget: 'string', default: '0.8rem'} + - {label: 'Ratio: 500', name: '500', widget: 'string', default: '1.25rem'} + - {label: 'Ratio: 600', name: '600', widget: 'string', default: '1.56rem'} + - {label: 'Ratio: 700', name: '700', widget: 'string', default: '1.95rem'} + - {label: 'Ratio: 800', name: '800', widget: 'string', default: '2.44rem'} + - {label: 'Ratio: 900', name: '900', widget: 'string', default: '3.05rem'} + - {label: 'Max Size', name: 'max', widget: 'string', default: '4rem'} + - label: 'Colors' + name: 'colors' + widget: 'object' + fields: + - { + label: 'Primary', + name: 'primary', + widget: 'string', + default: 'hsl(208, 57%, 21%)', + } + - { + label: 'Primary Shade (darker)', + name: 'primary-shade', + widget: 'string', + default: 'hsl(208, 56%, 14%)', + } + - { + label: 'Primary Glare (lighter)', + name: 'primary-glare', + widget: 'string', + default: 'hsl(207, 57%, 31%)', + } + - { + label: 'Highlight', + name: 'highlight', + widget: 'string', + default: 'hsl(42, 98%, 77%)', + } + - { + label: 'Light', + name: 'light', + widget: 'string', + default: 'hsl(0, 0%, 100%)', + } + - {label: 'Mid', name: 'mid', widget: 'string', default: 'hsl(0, 0%, 80%)'} + - { + label: 'Dark', + name: 'dark', + widget: 'string', + default: 'hsl(0, 0%, 20%)', + } + - { + label: 'Slate', + name: 'slate', + widget: 'string', + default: 'hsl(0, 0%, 25%)', + } + - label: 'Fonts' + name: 'fonts' + widget: 'hidden' + default: + { + 'base': '"-apple-system, BlinkMacSystemFont, ''Segoe UI'', Roboto, Helvetica, Arial, sans-serif, ''Apple Color Emoji'', ''Segoe UI Emoji'', ''Segoe UI Symbol''"', + 'serif': '"''Lora'', serif"', + } diff --git a/packages/docs/src/admin/previews.js b/packages/docs/src/admin/previews.js new file mode 100644 index 000000000..82dcd1f2c --- /dev/null +++ b/packages/docs/src/admin/previews.js @@ -0,0 +1,92 @@ +const {w3DateFilter, markdownFilter, dateFilter, helpers} = previewUtil; + +const env = nunjucks.configure(); + +env.addFilter('w3DateFilter', w3DateFilter); +env.addFilter('markdownFilter', markdownFilter); +env.addFilter('dateFilter', dateFilter); + +const Preview = ({entry, path, context}) => { + const data = context(entry.get('data').toJS()); + const html = env.render(path, {...data, helpers}); + return
; +}; + +const Home = ({entry}) => ( + ({ + title, + content: markdownFilter(body), + postsHeading, + archiveButtonText, + collections: { + postFeed: [ + { + url: 'javascript:void(0)', + date: new Date(), + data: { + title: 'Sample Post' + } + } + ] + } + })} + /> +); + +const Post = ({entry}) => ( + ({ + title, + date, + content: markdownFilter(body || '') + })} + /> +); + +const Page = ({entry}) => ( + ({ + title, + content: markdownFilter(body || '') + })} + /> +); + +const SiteData = ({entry}) => ( + ({ + site: { + name, + shortDesc, + showThemeCredit + } + })} + /> +); + +const Nav = ({entry}) => ( + ({ + navigation: { + items + } + })} + /> +); + +CMS.registerPreviewTemplate('home', Home); +CMS.registerPreviewTemplate('posts', Post); +CMS.registerPreviewTemplate('generic_pages', Page); +CMS.registerPreviewTemplate('site_data', SiteData); +CMS.registerPreviewTemplate('nav', Nav); diff --git a/packages/docs/src/admin/util.js b/packages/docs/src/admin/util.js new file mode 100644 index 000000000..302b159cf --- /dev/null +++ b/packages/docs/src/admin/util.js @@ -0,0 +1,11 @@ +import helpers from '../_data/helpers'; +import dateFilter from '../filters/date-filter'; +import markdownFilter from '../filters/markdown-filter'; +import w3DateFilter from '../filters/w3-date-filter'; + +export { + helpers, + dateFilter, + markdownFilter, + w3DateFilter, +}; diff --git a/packages/docs/src/archive.md b/packages/docs/src/archive.md new file mode 100644 index 000000000..76533c10f --- /dev/null +++ b/packages/docs/src/archive.md @@ -0,0 +1,4 @@ +--- +title: 'Posts Archive' +layout: 'layouts/archive.njk' +--- diff --git a/packages/docs/src/demos.md b/packages/docs/src/demos.md new file mode 100644 index 000000000..441563fc1 --- /dev/null +++ b/packages/docs/src/demos.md @@ -0,0 +1,13 @@ +--- +layout: layouts/demos.njk +title: Pattern Lab Demos +category: getting-started +--- + + + +Here’s a list of Pattern Lab’s UI starterkits that you can use to kickstart your UI design system project, as well as a list of Pattern Labs from around the web. + + + + diff --git a/packages/docs/src/demos/bolt-design-systems.md b/packages/docs/src/demos/bolt-design-systems.md new file mode 100644 index 000000000..54d091aa6 --- /dev/null +++ b/packages/docs/src/demos/bolt-design-systems.md @@ -0,0 +1,11 @@ +--- +title: Bolt Design System +description: The Bolt Design System provides robust Twig and Web Component-powered UI components, reusable visual styles, and powerful tooling to help developers, designers, and content authors build, maintain, and scale best of class digital experiences. +url: https://boltdesignsystem.com/ +category: example +tags: + - demo-in-the-wild + - demo-content + - code +image: /images/800x600.png +--- diff --git a/packages/docs/src/demos/brad-frosts-website-pl.md b/packages/docs/src/demos/brad-frosts-website-pl.md new file mode 100644 index 000000000..41bbe38c1 --- /dev/null +++ b/packages/docs/src/demos/brad-frosts-website-pl.md @@ -0,0 +1,11 @@ +--- +title: Brad Frost’s website PL +description: Pattern Lab helps you and your team build thoughtful, pattern-driven user interfaces using atomic design principles. +url: https://bradfrostdotcom-pl.netlify.com/ +category: example +tags: + - demo-in-the-wild + - demo-content + - code +image: /images/800x600.png +--- diff --git a/packages/docs/src/demos/handlebars-base-starterkit.md b/packages/docs/src/demos/handlebars-base-starterkit.md new file mode 100644 index 000000000..44ea634e4 --- /dev/null +++ b/packages/docs/src/demos/handlebars-base-starterkit.md @@ -0,0 +1,11 @@ +--- +title: Handlebars Base Starter Kit +description: The StarterKit for Handlebars is meant to be used as a demonstration of a Handlebars-based project in Pattern Lab. +url: https://patternlab-handlebars-preview.netlify.com/?p=all +category: starterkit +tags: + - demo-hbs-starter-kits + - demo-content + - code +image: /images/800x600.png +--- diff --git a/packages/docs/src/demos/handlebars-demo-starterkit.md b/packages/docs/src/demos/handlebars-demo-starterkit.md new file mode 100644 index 000000000..28387c606 --- /dev/null +++ b/packages/docs/src/demos/handlebars-demo-starterkit.md @@ -0,0 +1,11 @@ +--- +title: Handlebars Demo Starter Kit +description: The Demo StarterKit for Handlebars is meant to be used as a demonstration of a Handlebars-based project in Pattern Lab. +url: https://www.npmjs.com/package/@pattern-lab/starterkit-handlebars-demo +category: starterkit +tags: + - demo-hbs-starter-kits + - demo-content + - code +image: /images/800x600.png +--- diff --git a/packages/docs/src/demos/handlebars-vanilla-starterkit.md b/packages/docs/src/demos/handlebars-vanilla-starterkit.md new file mode 100644 index 000000000..4f7485a52 --- /dev/null +++ b/packages/docs/src/demos/handlebars-vanilla-starterkit.md @@ -0,0 +1,11 @@ +--- +title: Handlebars Vanilla Starter Kit +description: The Vanilla StarterKit for Handlebars is meant to be used as a demonstration of a Handlebars-based project in Pattern Lab. +url: https://www.npmjs.com/package/@pattern-lab/starterkit-handlebars-vanilla +category: starterkit +tags: + - demo-hbs-starter-kits + - demo-content + - code +image: /images/800x600.png +--- diff --git a/packages/docs/src/demos/pattern-lab-two-mustache-demo.md b/packages/docs/src/demos/pattern-lab-two-mustache-demo.md new file mode 100644 index 000000000..56fda1e32 --- /dev/null +++ b/packages/docs/src/demos/pattern-lab-two-mustache-demo.md @@ -0,0 +1,11 @@ +--- +title: Pattern Lab 2 Mustache Demo +description: Pattern Lab 1 projects should work with minimal changes in Pattern Lab 2. +url: http://demo.patternlab.io/ +category: starterkit +tags: + - demo-PL2 + - demo-content + - code +image: /images/800x600.png +--- diff --git a/packages/docs/src/demos/twig-base.md b/packages/docs/src/demos/twig-base.md new file mode 100644 index 000000000..0da6259b6 --- /dev/null +++ b/packages/docs/src/demos/twig-base.md @@ -0,0 +1,13 @@ +--- +title: Twig Base +description: The Base StarterKit for Twig is meant to be used as a near-blank starting point for Twig-based projects in Pattern Lab. +url: https://github.com/pattern-lab/starterkit-twig-base +category: starterkit +tags: + - demo-twig + - demo-content + - code +image: /images/800x600.png +--- + +loremi diff --git a/packages/docs/src/docs/a-post-with-code-samples.md b/packages/docs/src/docs/a-post-with-code-samples.md new file mode 100644 index 000000000..d5c83f6c7 --- /dev/null +++ b/packages/docs/src/docs/a-post-with-code-samples.md @@ -0,0 +1,67 @@ +--- +title: DOCS DOCS DOCS +tags: + - demo-content + - code + - blog +eleventyNavigation: + key: DOCS DOCS DOCS + order: 300 +--- + +The best way to demo a code post is to display a real life post, so check out this one from [andy-bell.design](https://andy-bell.design/wrote/creating-a-full-bleed-css-utility/) about a full bleed CSS utility. + +--- + +Sometimes you want to break your components out of the constraints that they find themselves in. A common situation where this occurs is when you don’t have much control of the container that it exists in, such as a CMS main content area. + +This is even more the case with editing tools such as the [WordPress Gutenberg editor](https://wordpress.org/gutenberg/), where in theory, you could pull in a component from a design system and utilise it in the main content of your web page. In these situations, it can be pretty darn handy to have a little utility that makes the element 100% of the viewport’s width _and_ still maintain its flow within its parent container. + +This is when I normally pull the `.full-bleed` utility class out of my back pocket. + +## The `.full-bleed` utility + +It’s small, but hella mighty: + +```css +.full-bleed { + width: 100vw; + margin-left: 50%; + transform: translateX(-50%); +} +``` + +Here it is in a context where it makes a fancy `
+ +{{> organisms-footer }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/checkout.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/checkout.hbs new file mode 100644 index 000000000..41046e131 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/checkout.hbs @@ -0,0 +1,29 @@ +{{> organisms-header }} +
+ +
+ {{> molecules-progress-tracker }} + {{> molecules-page-header }} +
+
+
+
+ {{#with definitionListSection }} + {{> organisms-definition-list-list }} + {{/ with }} + {{# totalPrice }} +
+ + {{ number }} +
+ {{/ totalPrice }} +
+
+
+ {{> organisms-form }} +
+
+
+
+
+{{> organisms-footer }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/confirmation.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/confirmation.hbs new file mode 100644 index 000000000..67c83694c --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/confirmation.hbs @@ -0,0 +1,14 @@ +{{> organisms-header }} +
+ +
+ {{> molecules-progress-tracker }} + {{> molecules-page-header }} +
+ {{> organisms-text-passage }} +
+ +
+ +
+{{> organisms-footer }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/detail.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/detail.hbs new file mode 100644 index 000000000..4b35ddde0 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/detail.hbs @@ -0,0 +1,32 @@ +{{> organisms-header }} +
+
+ {{> molecules-page-header }} +
+ +
+
+ +
+ {{# featureImage }} + {{ alt }} + {{/ featureImage }} +
+ +
+
+ {{> organisms-text-passage }} +
+ {{# checkoutForm }} + {{> organisms-form }} + {{/ checkoutForm }} +
+ +
+ {{#with stackedBlockSection }} + {{> organisms-stacked-block-section }} + {{/ with }} +
+ +
+{{> organisms-footer }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/homepage.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/homepage.hbs new file mode 100644 index 000000000..16de05be2 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/homepage.hbs @@ -0,0 +1,22 @@ +{{> organisms-header }} +
+ +
+ {{# hero }} + {{> molecules-hero }} + {{/ hero }} + + {{# promoBlock }} + {{> molecules-promo-block }} + {{/ promoBlock }} + + + {{#with saleSection}} + {{> organisms-stacked-block-section }} + {{/with}} + +
+ + +
+{{> organisms-footer }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/page.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/page.hbs new file mode 100644 index 000000000..ae4791473 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/page.hbs @@ -0,0 +1,15 @@ +{{> organisms-header }} + +
+ +
+ + {{> molecules-page-header }} + + {{> organisms-text-passage }} + +
+ +
+ +{{> organisms-footer }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/review.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/review.hbs new file mode 100644 index 000000000..ef60c06a8 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/03-templates/review.hbs @@ -0,0 +1,32 @@ +{{> organisms-header }} +
+ +
+ {{> molecules-progress-tracker }} + {{> molecules-page-header }} +
+
+
+
+ {{#with definitionListSection }} + {{> organisms-definition-list-list }} + {{/ with }} + {{# totalPrice }} +
+ + {{ number }} +
+ {{/ totalPrice }} +
+
+
+
+ {{> organisms-text-passage }} +
+ {{> organisms-button-group }} +
+
+
+
+
+{{> organisms-footer }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/00-homepage.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/00-homepage.hbs new file mode 100644 index 000000000..d9894d4a7 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/00-homepage.hbs @@ -0,0 +1 @@ +{{> templates-homepage }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/00-homepage.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/00-homepage.json new file mode 100644 index 000000000..b6b30dd08 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/00-homepage.json @@ -0,0 +1,126 @@ +{ + "hero" : { + "url": "link.pages-detail", + "src": "../../images/group-shoes.jpg", + "alt": "Group of shoes", + "heading" : "Shoes For The Soul" + }, + "promoBlock": [ + { + "promoBlockLink": { + "url": "#" + }, + "src": "../../images/women-boots.jpg", + "alt": "Women's boots", + "heading": "Go Out In Style", + "description": "Dive into the Fall season with these stylish casual boots that are great for a jump in the leaves or a night out on the town." + }, + { + "promoBlockLink": { + "url": "#" + }, + "styleModifier": "c-promo-block--right", + "src": "../../images/men-casual-shoes.jpg", + "alt": "striped sneakers", + "heading": "Casual But Classy", + "description": "Feel comfortable in your own shoes no matter what the situation." + }, + { + "promoBlockLink": { + "url": "#" + }, + "src": "../../images/women-hiking-boots.jpg", + "alt": "hiking boots in woods", + "heading": "Immerse Yourself In Nature", + "description": "Explore the outdoors and clear your head with a hike in one of our sleek boot styles." + }, + { + "promoBlockLink": { + "url": "#" + }, + "styleModifier": "c-promo-block--right u-margin-bottom-large", + "src": "../../images/kids-velcro.jpg", + "alt": "kid's velcro shoes", + "heading": "Discover the Unknown", + "description": "Take the path least traveled and write your own story with our shoes." + } + ], + "toutSection" : { + "styleModifier" : "l-grid--4up", + "toutList" : [ + { + "url": "link.pages-category", + "headline": "Women's fashion", + "imgLandscapeSrc" : "../../images/woman-outside-brownstone.jpg", + "imgLandscapeAlt" : "Woman in sweater" + }, + { + "url": "link.pages-category", + "headline": "Men's fashion", + "imgLandscapeSrc" : "../../images/smiling-man-in-formalwear.jpg", + "imgLandscapeAlt" : "Man in formalwear" + }, + { + "url": "link.pages-category", + "headline": "Kid's Fashion", + "imgLandscapeSrc" : "../../images/father-daughter-fashion.jpg", + "imgLandscapeAlt" : "Child with father" + } + ] + }, + "saleSection" : { + "sectionTitle": "On Sale", + "stackedBlockList": [ + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/men-blue-shoes.jpg", + "alt" : "blue walking shoes" + }, + "headline" : "Walking Shoes", + "excerpt" : "This casual pair of shoes will have you looking dapper in the city", + "label" : "$60", + "onSale": { + "badge": "Sale", + "price": "$90" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-hiking-boots.jpg", + "alt" : "leather boots" + }, + "headline" : "Leather Boots", + "excerpt" : "Hike down the trail in these durable, 100% authentic leather boots.", + "label" : "$120", + "onSale": { + "badge": "Sale", + "price": "$150" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-blue-heels.jpg", + "alt" : "blue heels" + }, + "headline" : "Blue Suede Heels", + "excerpt" : "Strut your stuff on the streets with these stunning high heels", + "label" : "$80", + "onSale": { + "badge": "Sale", + "price": "$110" + } + + } + ], + "btnTag": false, + "linkTag": true, + "url": "link.pages-category-on-sale", + "buttonText" : "See All Sale Items" + } +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category.hbs new file mode 100644 index 000000000..f0585d1e0 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category.hbs @@ -0,0 +1 @@ +{{> templates-category }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category.json new file mode 100644 index 000000000..4320309db --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category.json @@ -0,0 +1,142 @@ +{ + "page": { + "title" : "Women's Shoes", + "description": false + }, + "stackedBlockSection" : { + "styleModifier": "u-margin-bottom-large", + "stackedBlockList": [ + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-blue-heels.jpg", + "alt" : "blue high heels" + }, + "headline" : "Blue Suede Heels", + "excerpt" : "Available in 5 colors", + "label" : "$80", + "onSale": { + "badge": "Sale", + "price": "$110" + } + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-hiking-boots.jpg", + "alt" : "brown leather boots" + }, + "headline" : "Leather Boots", + "excerpt" : "Available in 2 colors. Overnight shipping available", + "label" : "$120", + "onSale": { + "badge": "Sale", + "price": "$150" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-leather-booties.jpg", + "alt" : "black leather booties" + }, + "headline" : "Black Leather Booties", + "excerpt" : "Available in 3 colors.", + "label" : "$95", + "onSale": { + "badge": "Sale", + "price": "$135" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-boot-wedges.jpg", + "alt" : "women's wedge boots" + }, + "headline" : "Suede Booties", + "excerpt" : "Available in 2 colors. Overnight shipping available", + "label" : "$120" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-adidas.jpg", + "alt" : "Adidas shoes" + }, + "headline" : "White Adidas Sneakers", + "excerpt" : "Available in 2 colors", + "label" : "$90" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-boots.jpg", + "alt" : "light tan leather boots" + }, + "headline" : "Light Tan Boots", + "excerpt" : "Available in 3 colors", + "label" : "$70" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-colorful.jpg", + "alt" : "technicolor sneakers" + }, + "headline" : "Multicolored Running Shoes", + "excerpt": false, + "label" : "$75" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-combat-boots.jpg", + "alt" : "black leather high ankle boots" + }, + "headline" : "Black Leather Boots", + "excerpt" : "Made of 100% authentic leather", + "label" : "$180" + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-white-heels.jpg", + "alt" : "white high heels" + }, + "headline" : "Shiny High Heels", + "excerpt" : "Available in 5 colors", + "label" : "$95" + } + ] + }, + "paginationList" : [ + { + "itemModifier": "is-disabled", + "number" : "Prev" + }, + { + "itemModifier": "is-active", + "number" : "1" + }, + { + "url": "link.pages-category-page-two", + "number" : "2" + }, + { + "number" : "Next", + "url": "link.pages-category-page-two" + } + ] +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~holiday-guide.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~holiday-guide.json new file mode 100644 index 000000000..e06b4a3da --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~holiday-guide.json @@ -0,0 +1,12 @@ +{ + "page": { + "title": false + }, + "hero": { + "url": "link.pages-detail", + "src": "../../images/holiday.jpg", + "alt": "Group of shoes", + "heading": "2019 Holiday Gift Guide" + }, + "paginationList": false +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~kids.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~kids.json new file mode 100644 index 000000000..f7a28e47e --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~kids.json @@ -0,0 +1,83 @@ +{ + "page": { + "title" : "Kids' Shoes", + "description": false + }, + "stackedBlockSection" : { + "stackedBlockList": [ + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/men-chucks.jpg", + "alt" : "chuck taylor shoes" + }, + "headline" : "Converse Chuck Taylor's", + "excerpt" : "Available in both boys' and girls' sizes", + "label" : "$50", + "onSale": { + "badge": "Sale", + "price": "$85" + } + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/girls-high-tops.jpg", + "alt" : "girl's high tops" + }, + "headline" : "Girl's High Tops", + "excerpt" : "Available in 4 color combinations", + "label" : "$90" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/kids-green-shoes.jpg", + "alt" : "toddler green shoes" + }, + "headline" : "Toddler Green Shoes", + "excerpt" : "Suitable for ages 0-2 years", + "label" : "$230" + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/kids-technicolor-nikes.jpg", + "alt" : "multicolored Nike shoes" + }, + "headline" : "Multicolored Nikes", + "excerpt" : "Available in toddler and youth sizes", + "label" : "$120" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/girls-nike.jpg", + "alt" : "girl's nike sneakers" + }, + "headline" : "Girl's Nike Sneakers", + "excerpt" : "Available in 5 colors", + "label" : "$70" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/kids-velcro.jpg", + "alt" : "velcro shoes" + }, + "headline" : "Velcro Shoes", + "excerpt" : "Available in both boys' and girls' sizes", + "label" : "$70" + } + ] + }, + "paginationList": false +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~men.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~men.json new file mode 100644 index 000000000..e4f142e13 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~men.json @@ -0,0 +1,110 @@ +{ + "page": { + "title" : "Men's Shoes", + "description": false + }, + "stackedBlockSection" : { + "styleModifier": "u-margin-bottom-large", + "stackedBlockList": [ + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/men-blue-shoes.jpg", + "alt" : "blue walking shoes" + }, + "headline" : "Walking Shoes", + "excerpt" : "This casual pair of shoes will have you looking dapper in the city", + "label" : "$60", + "onSale": { + "badge": "Sale", + "price": "$90" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-brown-shoes.jpg", + "alt" : "brown embroidered shoes" + }, + "headline" : "Embroidered Dress Shoes", + "excerpt" : "Available in 2 colors. Made of 100% authentic leather", + "label" : "$120", + "onSale": { + "badge": "Sale", + "price": "$155" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-brown-dress-shoes.jpg", + "alt" : "brown dress shoes" + }, + "headline" : "Brown Dress Shoes", + "excerpt" : "Made of 100% authentic leather in USA", + "label" : "$140" + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-casual-shoes.jpg", + "alt" : "black striped sneakers" + }, + "headline" : "Striped Casual Walking Shoes", + "excerpt" : "Available in 3 styles", + "label" : "$70" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-gray-shoes.jpg", + "alt" : "Gray walking shoes." + }, + "headline" : "Gray casual walking shoes", + "excerpt" : false, + "label" : "$180" + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-loafers.jpg", + "alt" : "men's loafers" + }, + "headline" : "Loafers", + "excerpt" : "Available in a variety of colors", + "label" : "$180" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-walking-shoes.jpg", + "alt" : "men's running shoes" + }, + "headline" : "Running Shoes", + "excerpt" : "Available in low-top and high-top.", + "label" : "$95" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-winter-boots.jpg", + "alt" : "men's winter boots" + }, + "headline" : "Steel Toe Boots", + "excerpt" : "Available in 2 colors. Made in USA", + "label" : "$190" + } + ] + }, + "paginationList": false +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~on-sale.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~on-sale.json new file mode 100644 index 000000000..994278d7e --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~on-sale.json @@ -0,0 +1,104 @@ +{ + "page": { + "title" : "On Sale", + "description": false + }, + "stackedBlockSection" : { + "styleModifier": "u-margin-bottom-large", + "stackedBlockList": [ + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/men-blue-shoes.jpg", + "alt" : "blue walking shoes" + }, + "headline" : "Walking Shoes", + "excerpt" : "This casual pair of shoes will have you looking dapper in the city", + "label" : "$60", + "onSale": { + "badge": "Sale", + "price": "$90" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-hiking-boots.jpg", + "alt" : "leather boots" + }, + "headline" : "Leather Boots", + "excerpt" : "Hike down the trail in these durable, 100% authentic leather boots.", + "label" : "$120", + "onSale": { + "badge": "Sale", + "price": "$150" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-blue-heels.jpg", + "alt" : "blue heels" + }, + "headline" : "Blue Suede Heels", + "excerpt" : "Strut your stuff on the streets with these stunning high heels", + "label" : "$80", + "onSale": { + "badge": "Sale", + "price": "$110" + } + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/men-chucks.jpg", + "alt" : "chuck taylor shoes" + }, + "headline" : "Boys Chucks", + "excerpt" : "These shoes are a great mix between athlete and trend setter", + "label" : "$50", + "onSale": { + "badge": "Sale", + "price": "$85" + } + + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/men-brown-shoes.jpg", + "alt" : "woman in sweater" + }, + "headline" : "Pinstripe Skirt and Tank Top", + "excerpt" : "This pinstripe skirt and tank top are a great pairing for a friendly get-together", + "label" : "$120", + "onSale": { + "badge": "Sale", + "price": "$155" + } + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-leather-booties.jpg", + "alt" : "woman in sweater" + }, + "headline" : "Long Button-Down Sweater", + "excerpt" : "Comes in 2 colors", + "label" : "$95", + "onSale": { + "badge": "Sale", + "price": "$135" + } + } + ] + }, + "paginationList": false +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~page-two.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~page-two.json new file mode 100644 index 000000000..adb64d14d --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/01-category~page-two.json @@ -0,0 +1,41 @@ +{ + "page": { + "title" : "Women's Shoes", + "description": false + }, + "stackedBlockSection" : { + "styleModifier": "u-margin-bottom-large", + "stackedBlockList": [ + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../../images/women-shiny-sneakers.jpg", + "alt" : "patent leather sneakers" + }, + "headline" : "Patent Leather Everyday Shoes", + "excerpt" : "Available in brown and black. Overnight shipping available", + "label" : "$190" + } + ] + }, + "paginationList" : [ + { + "url": "link.pages-category", + "number" : "Prev" + }, + { + "url": "link.pages-category", + "number" : "1" + }, + { + "itemModifier": "is-active", + "url": "link.pages-category-page-two", + "number" : "2" + }, + { + "itemModifier": "is-disabled", + "number" : "Next" + } + ] +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/02-detail.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/02-detail.hbs new file mode 100644 index 000000000..c024f1f62 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/02-detail.hbs @@ -0,0 +1 @@ +{{> templates-detail }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/02-detail.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/02-detail.json new file mode 100644 index 000000000..5c8446d97 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/02-detail.json @@ -0,0 +1,125 @@ +{ + "page": { + "title": "Suede Booties", + "description": false + }, + "featureImage": { + "src": "../../images/women-boot-wedges.jpg", + "alt": "Boot wedges" + }, + "htmlText": "

These suede booties are the perfect shoes to accent your outfit whether heading to a casual dinner or an elaborate gala.

These booties come in a sepia (shown) or a stark black. These are made of 100% suede in U.S.A.

$120

", + "priceSection": { + "label": "$120" + }, + "checkoutForm": { + "formFields": { + "items": [ + { + "selectField": { + "label": "Pick a Size", + "selectOptions" : [ + { + "value" : "size-1", + "option" : "Size 5" + }, + { + "value" : "size-2", + "option" : "Size 5.5" + }, + { + "value" : "size-3", + "option" : "Size 6" + }, + { + "value" : "size-4", + "option" : "Size 6.5" + }, + { + "value" : "size-5", + "option" : "Size 7" + }, + { + "value" : "size-6", + "option" : "Size 7.5" + }, + { + "value" : "size-7", + "option" : "Size 8" + }, + { + "value" : "size-8", + "option" : "Size 8.5" + }, + { + "value" : "size-9", + "option" : "Size 9" + }, + { + "value" : "size-10", + "option" : "Size 9.5" + }, + { + "value" : "size-11", + "option" : "Size 10" + }, + { + "value" : "size-12", + "option" : "Size 10.5" + }, + { + "value" : "size-13", + "option" : "Size 11" + } + ] + } + } + ] + }, + "buttonGroup": [ + { + "buttonTag": false, + "linkTag": true, + "url": "link.pages-cart", + "buttonText": "Add To Cart" + } + ] + }, + "stackedBlockSection": { + "sectionTitle": "Related Items", + "stackedBlockList": [ + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/men-blue-shoes.jpg", + "alt" : "blue walking shoes" + }, + "headline" : "Walking Shoes", + "excerpt" : "This casual pair of shoes will have you looking dapper in the city", + "label" : "$60" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-hiking-boots.jpg", + "alt" : "leather boots" + }, + "headline" : "Leather Boots", + "excerpt" : "Hike down the trail in these durable, 100% authentic leather boots.", + "label" : "$120" + }, + { + "styleModifier" : "", + "url" : "link.pages-detail", + "stackedBlockMedia": { + "src" : "../../images/women-blue-heels.jpg", + "alt" : "blue heels" + }, + "headline" : "Blue Suede Heels", + "excerpt" : "Strut your stuff on the streets with these stunning high heels", + "label" : "$80" + } + ] + } +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/03-cart.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/03-cart.hbs new file mode 100644 index 000000000..b30fd0db7 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/03-cart.hbs @@ -0,0 +1 @@ +{{> templates-cart }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/03-cart.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/03-cart.json new file mode 100644 index 000000000..be228c2b9 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/03-cart.json @@ -0,0 +1,48 @@ +{ + "page": { + "title": "You have 2 items in your cart", + "description": "Please review your cart details before checking out." + }, + "stripeList": [ + { + "url": "#", + "src": "../../images/women-boot-wedges.jpg", + "alt": "placeholder image", + "stripeField": { + "styleModifier": "c-field--small", + "label": "Quantity", + "value": "1" + }, + "headline": "Suede Booties", + "cartPrice": { + "label": "Price", + "meta": "$120" + } + }, + { + "url": "#", + "src": "../../images/men-brown-dress-shoes.jpg", + "alt": "placeholder image", + "stripeField": { + "styleModifier": "c-field--small", + "label": "Quantity", + "value": "1" + }, + "headline": "Brown Dress Shoes", + "cartPrice": { + "label": "Price", + "meta": "$140" + } + } + ], + "totalPrice": { + "label": "Total", + "number": "$360" + }, + "checkoutButton": { + "buttonTag": false, + "linkTag": true, + "url": "link.pages-checkout", + "buttonText": "Checkout" + } +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout.hbs new file mode 100644 index 000000000..0788a94e1 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout.hbs @@ -0,0 +1 @@ +{{> templates-checkout }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout.json new file mode 100644 index 000000000..3a20406c0 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout.json @@ -0,0 +1,95 @@ +{ + "page": { + "title": "Shipping Information", + "description": "Please fill out your shipping information below." + }, + "formFields" : { + "items": [ + { + "textField": { + "label" : "Name" + } + }, + { + "textField": { + "label" : "Address" + } + }, + { + "textField": { + "label" : "City" + } + }, + { + "textField": { + "label" : "State" + } + }, + { + "textField": { + "label" : "Zip Code" + } + }, + { + "inlineCheckbox": { + "styleModifier": "u-margin-bottom-large", + "label": "Billing address is the same as shipping" + } + } + ] + }, + "selectField": false, + "buttonGroup" : [ + { + "buttonTag" : false, + "linkTag" : true, + "url" : "link.pages-checkout-billing", + "buttonText": "Continue to Billing" + } + ], + "definitionListSection": { + "styleModifier":"c-definition-list-list--lined", + "definitionItems": [ + { + "definitionList": { + "items": [ + { + "term": "Item", + "description": "Suede Booties" + }, + { + "term": "Quantity", + "description": "1" + }, + { + "term": "Price", + "description": "$120" + } + ] + } + }, + { + "definitionList": { + "items": [ + { + "term": "Item", + "description": "Brown Dress Shoes" + }, + { + "term": "Quantity", + "description": "1" + }, + { + "term": "Price", + "description": "$140" + } + ] + } + } + ] + }, + "totalPrice": { + "label": "Total", + "number": "$360" + } +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout~billing-same-shipping.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout~billing-same-shipping.json new file mode 100644 index 000000000..de5857c32 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout~billing-same-shipping.json @@ -0,0 +1,85 @@ +{ + "progressTracker" : { + "items": [ + { + "number": "1", + "label": "Shipping Information" + }, + { + "styleModifier": "is-current", + "number": "2", + "label": "Billing Information" + }, + { + "number": "3", + "label": "Review Order" + }, + { + "number": "4", + "label": "Confirmation" + } + ] + }, + "page": { + "title": "Billing Information", + "description": "Please fill out your billing address and payment information below." + }, + "formFields" : { + "items": [ + { + "textField": { + "label" : "Name", + "value": "John Smith" + } + }, + { + "textField": { + "label" : "Address", + "value": "99 Main Street" + } + }, + { + "textField": { + "label" : "City", + "value": "Pittsburgh" + } + }, + { + "textField": { + "label" : "State", + "value": "PA" + } + }, + { + "textField": { + "label" : "Zip Code", + "value": "15202" + } + }, + { + "textField": { + "label" : "Credit Card Number" + } + }, + { + "textField": { + "label" : "Expiration Date" + } + }, + { + "textField": { + "label" : "CVV" + } + } + ] + }, + "selectField": false, + "buttonGroup" : [ + { + "buttonTag" : false, + "linkTag" : true, + "url" : "link.pages-review", + "buttonText": "Continue To Review Order" + } + ] +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout~billing.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout~billing.json new file mode 100644 index 000000000..8d6396e92 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/04-checkout~billing.json @@ -0,0 +1,80 @@ +{ + "progressTracker" : { + "items": [ + { + "number": "1", + "label": "Shipping Information" + }, + { + "styleModifier": "is-current", + "number": "2", + "label": "Billing Information" + }, + { + "number": "3", + "label": "Review Order" + }, + { + "number": "4", + "label": "Confirmation" + } + ] + }, + "page": { + "title": "Billing Information", + "description": "Please fill out your billing address and payment information below." + }, + "formFields" : { + "items": [ + { + "textField": { + "label" : "Name" + } + }, + { + "textField": { + "label" : "Address" + } + }, + { + "textField": { + "label" : "City" + } + }, + { + "textField": { + "label" : "State" + } + }, + { + "textField": { + "label" : "Zip Code" + } + }, + { + "textField": { + "label" : "Credit Card Number" + } + }, + { + "textField": { + "label" : "Expiration Date" + } + }, + { + "textField": { + "label" : "CVV" + } + } + ] + }, + "selectField": false, + "buttonGroup" : [ + { + "buttonTag" : false, + "linkTag" : true, + "url" : "link.pages-review", + "buttonText": "Continue To Review Order" + } + ] +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/05-review.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/05-review.hbs new file mode 100644 index 000000000..f46f8b204 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/05-review.hbs @@ -0,0 +1 @@ +{{> templates-review }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/05-review.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/05-review.json new file mode 100644 index 000000000..ec0865197 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/05-review.json @@ -0,0 +1,81 @@ +{ + "progressTracker" : { + "items": [ + { + "number": "1", + "label": "Shipping Information" + }, + { + "number": "2", + "label": "Billing Information" + }, + { + "styleModifier": "is-current", + "number": "3", + "label": "Review Order" + }, + { + "number": "4", + "label": "Confirmation" + } + ] + }, + "page": { + "title": "Review Your Order", + "description": "Please make sure your information is correct below before submitting your order." + }, + "definitionListSection": { + "styleModifier":"c-definition-list-list--lined", + "definitionItems": [ + { + "definitionList": { + "items": [ + { + "term": "Item", + "description": "Suede Booties" + }, + { + "term": "Quantity", + "description": "1" + }, + { + "term": "Price", + "description": "$120" + } + ] + } + }, + { + "definitionList": { + "items": [ + { + "term": "Item", + "description": "Brown Dress Shoes" + }, + { + "term": "Quantity", + "description": "1" + }, + { + "term": "Price", + "description": "$140" + } + ] + } + } + ] + }, + "totalPrice": { + "label": "Total", + "number": "$360" + }, + "htmlText": "

Shipping Address

John Smith
99 Main Street
Pittsburgh, PA 15202

Billing Address

John Smith
99 Main Street
Pittsburgh, PA 15202

Payment Information

Card Type Visa
Card # ********0000
Expiration 12/25

", + "buttonGroup":[ + { + "buttonTag": false, + "linkTag": true, + "url": "link.pages-confirmation", + "buttonText": "Submit Order" + } + ] +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/06-confirmation.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/06-confirmation.hbs new file mode 100644 index 000000000..399d5b73c --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/06-confirmation.hbs @@ -0,0 +1 @@ +{{> templates-confirmation }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/06-confirmation.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/06-confirmation.json new file mode 100644 index 000000000..20dbfd149 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/06-confirmation.json @@ -0,0 +1,28 @@ +{ + "progressTracker" : { + "items": [ + { + "number": "1", + "label": "Shipping Information" + }, + { + "number": "2", + "label": "Billing Information" + }, + { + "number": "3", + "label": "Review Order" + }, + { + "styleModifier": "is-current", + "number": "4", + "label": "Confirmation" + } + ] + }, + "page": { + "title": "Your Order Has Been Processed", + "description": false + }, + "htmlText": "

Your confirmation number is: 1234567890

Thank you for shopping with SoulSoles!

You will receive a confirmation email shortly.

" +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/page.hbs b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/page.hbs new file mode 100644 index 000000000..2daad69fc --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/page.hbs @@ -0,0 +1 @@ +{{> templates-page }} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/page.json b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/page.json new file mode 100644 index 000000000..122b65b5d --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/_patterns/04-pages/page.json @@ -0,0 +1,7 @@ +{ + "page": { + "title": "General Page", + "description": "I'm a page and I'm cool" + }, + "htmlText": "

This is a text passage. This is cool.

" +} diff --git a/packages/starterkit-handlebars-demo/dist/css/pattern-scaffolding.css b/packages/starterkit-handlebars-demo/dist/css/pattern-scaffolding.css new file mode 100644 index 000000000..a2bfd7189 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/pattern-scaffolding.css @@ -0,0 +1,275 @@ +/** + * This stylesheet is for styles you want to include only when displaying demo + * styles for grids, animations, color swatches, etc. + * These styles will not be your production CSS. + */ +#sg-patterns { + -webkit-box-sizing: border-box !important; + box-sizing: border-box !important; + max-width: 100%; + padding: 0 1rem; +} + +.demo-animate { + background: #ddd; + padding: 1em; + margin-bottom: 1em; + text-align: center; + border-radius: 8px; + cursor: pointer; +} + +.sg-colors { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + list-style: none !important; + padding: 0 !important; + margin: 0 !important; +} + +@supports (display: grid) { + .sg-colors { + display: grid; + grid-gap: 10px; + grid-template-columns: repeat( + auto-fill, + minmax(180px, 1fr) + ); + } +} + +.sg-colors li { + -webkit-box-flex: 1; + -ms-flex: auto; + flex: auto; + padding: 0.3em; + margin: 0 0.5em 0.5em 0; + min-width: 5em; + max-width: 14em; + border: 1px solid #ddd; + border-radius: 8px; +} + +.sg-swatch { + display: block; + height: 4em; + margin-bottom: 0.3em; + border-radius: 5px; +} + +.sg-label { + font-size: 90%; + line-height: 1; +} + +/** + * Icon grid + */ +.icon-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); +} + +/** + * Icon grid item + */ +.icon-grid__item { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 5.5rem; + height: 5.5rem; + background: #f5f5f5; + border: 1px solid #cccccd; + border-radius: 8px; + padding: 0.5rem; + margin: 0.5rem; +} + +/** + * Icon grid item title + */ +.icon-grid__item h3 { + font-size: 0.6rem; + margin-top: 1rem; +} + +/** +* Icon grid item svg +*/ +.icon-grid__item svg { + height: 16px; + width: 16px; +} + +.sg-pattern-example > footer > p { + display: none; +} + +/** +* For placeholder only block +* 1) Used for placeholder blocks for layouts +*/ +.fpo { + padding: 1rem; + background: #f5f5f5; + text-align: center; + font-weight: bold; + margin-bottom: 0.5rem; +} + +/** +* Dark for placeholder only block +*/ +.fpo-block--dark { + background: #808080; +} + +.sg-pattern-example small { + font-size: 10px; + display: block; + margin-top: 0.5rem; +} + +.sg-pattern-example small code { + font-size: inherit; + padding: 0.2em; +} + +/** + * Add height and overflow to two column fixed layout to show functionality only in style-guide example. + */ +.sg-pattern-example .l-page-layout--two-column-fixed { + height: 10rem; + overflow: auto; +} + +/** + * Add min-height of 0 to two column fixed to help with showing functionality only in style-guide example. + */ +.sg-pattern-example .l-page-layout--two-column-fixed .l-page-layout__secondary { + min-height: 0; +} + +/** + * FPO block within two column fixed layout within secondary section + * 1) Width expands entire container at small screens + */ +.sg-pattern-example + .l-page-layout--two-column-fixed + .l-page-layout__secondary + .fpo-block { + width: 100%; /* 1 */ +} + +/** + * FPO block within two column fixed layout within secondary section larger screens + * 1) Set height to 100% of viewport height + * 2) Set width = width of vertical header + */ +@media all and (min-width: 70em) { + .sg-pattern-example + .l-page-layout--two-column-fixed + .l-page-layout__secondary + .fpo-block { + width: 20rem; /* 1 */ + height: 100vh; /* 2 */ + margin-bottom: 0; + } +} + +/** + * Two column fixed layout within pattern example + * 1) Set height to height of placeholder content secondary section + * 2) Set overflow to auto so the secondary section stays fixed while the main section scrolls + */ +.sg-pattern-example .l-page-layout--two-column-fixed { + height: 18.3rem; + overflow: auto; +} + +/** + * Secondary section within pattern example and two-column fixed at larger screens + * 1) Position absolute to make this pattern similar to fixed vertical header + * 2) Height inherits so it doesn't span longer than the pattern window on "All" PL page + * 3) Float this left to get layout sections side by side within PL "View All" section + */ + +@media all and (min-width: 70em) { + .sg-pattern-example + .l-page-layout--two-column-fixed + .l-page-layout__secondary { + position: absolute; /* 1 */ + height: inherit; /* 2 */ + float: left; /* 3 */ + } +} + +/** + * Fpo block within pattern example, two column fixed, and secondary section + * 1) Make fpo block width of the container on small screens + */ +.sg-pattern-example + .l-page-layout--two-column-fixed + .l-page-layout__secondary + .fpo-block { + width: 100%; /* 1 */ +} + +/** + * FPO Block Within pattern example, two column fixed, and secondary layout larger screens + * 1) Added width similar to style guide vertical header + * 2) Height inherits so it doesn't span longer than the pattern window on "All" PL page + */ +@media all and (min-width: 70em) { + .sg-pattern-example + .l-page-layout--two-column-fixed + .l-page-layout__secondary + .fpo-block { + width: 20rem; /* 1 */ + height: inherit; /* 2 */ + } +} + +/** + * Add height of main to get appearance of side bar staying fixed while main window scrolls. + */ +.sg-pattern-example .l-page-layout--two-column-fixed .l-page-layout__main { + height: 30rem; +} + +/** + * Add height of fpo block to equal height of main to help with scrolling main window/fixed sidebar effect. + */ +.sg-pattern-example + .l-page-layout--two-column-fixed + .l-page-layout__main + .fpo-block { + height: 30rem; + margin-bottom: 0; +} + +/** + * Vertical header in pattern example at large screens + */ +@media all and (min-width: 70em) { + .sg-pattern-example .c-header--vertical { + max-width: 20rem; + } +} + +#molecules-footer-nav .sg-pattern-example { + background: #041544; +} + +.sg-pattern .c-hero { + margin: 0; +} + +.sg-pattern .c-promo-block { + margin: 0; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_colors.scss b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_colors.scss new file mode 100644 index 000000000..0f790f450 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_colors.scss @@ -0,0 +1,79 @@ +/*------------------------------------*\ + #COLORS +\*------------------------------------*/ + +/** + * In this file, we take the literal colors from our palette (defined in variables.scss) + * and define them against variables that we can utilise anywhere throughout the project. + */ + + + + + +/*------------------------------------*\ + #GLOBAL TEXT COLOR +\*------------------------------------*/ + +/** + * Body text and background colors + */ +$color-body-text: $color-neutral-gray-93 !default; +$color-body-bg: $color-neutral-white !default; + +/** + * Highlight colors + */ +$color-text-highlight: $color-neutral-gray-93; +$color-text-highlight-bg: $color-neutral-gray-13; + + + + + +/*------------------------------------*\ + #LINKS +\*------------------------------------*/ + +$color-links: $color-neutral-gray-73 !default; +$color-links-hover: $color-brand-orange !default; +$color-links-active: $color-neutral-gray-93 !default; +$color-links-visited: $color-neutral-gray-93 !default; + + + + + +/*------------------------------------*\ + #BUTTONS +\*------------------------------------*/ + +$color-btn-primary: $color-neutral-white !default; +$color-btn-primary-bg: $color-neutral-gray-93 !default; +$color-btn-primary-bg-hover: $color-neutral-gray-50 !default; +$color-btn-primary-border: $color-neutral-gray-93 !default; + +$color-btn-secondary: $color-neutral-gray-93 !default; +$color-btn-secondary-bg: $color-neutral-white !default; +$color-btn-secondary-bg-hover: $color-neutral-gray-07 !default; +$color-btn-secondary-border: $color-neutral-gray-93 !default; + +$color-btn-disabled: $color-neutral-gray-50 !default; +$color-btn-disabled-bg: $color-neutral-gray-07 !default; + + + + + +/*------------------------------------*\ + #FORMS +\*------------------------------------*/ + +$color-form: $color-neutral-gray-93 !default; +$color-form-bg: $color-neutral-white !default; +$color-form-border: $color-neutral-gray-73 !default; +$color-form-border-focus: $color-neutral-gray-93 !default; +$color-form-border-error: $color-utility-error !default; +$color-form-label: $color-neutral-gray-93 !default; +$color-form-info: $color-neutral-gray-73; +$color-form-placeholder: $color-neutral-gray-50; diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_mixins.scss b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_mixins.scss new file mode 100644 index 000000000..78d168f10 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_mixins.scss @@ -0,0 +1,70 @@ +/*------------------------------------*\ + #MIXINS +\*------------------------------------*/ + +/** + * Body Styles + * 1) Prevent Mobile Safari from scaling up text: https://blog.55minutes.com/2012/04/iphone-text-resizing/ + */ +@mixin typographyBody() { + font-size: $font-size-med; + line-height: 1.6; + -webkit-text-size-adjust: 100%; /* 1 */ +} + +/** + * XL Type Styles + */ + @mixin typographyBodyLarge() { + font-size: $font-size-med-2; + line-height: $line-height-large; +} + +/** + * XL Heading Styles + */ +@mixin typographyHeadingXXL() { + font-size: $font-size-xl; + font-weight: normal; + line-height: 1.2; + + @media all and (min-width: $bp-med) { + font-size: $font-size-xxl; + } +} + +/** + * XL Heading Styles + */ +@mixin typographyHeadingXl() { + font-size: $font-size-xl; + font-weight: normal; + line-height: 1.2; +} + +/** + * Large Heading Styles + */ + @mixin typographyHeadingLarge() { + font-size: $font-size-large; + font-weight: normal; + line-height: 1.2; +} + +/** + * Medium 2 Heading Styles + */ + @mixin typographyHeadingMed2() { + font-size: $font-size-med-2; + font-weight: normal; + line-height: 1.2; +} + +/** + * Medium Heading Styles + */ + @mixin typographyHeadingMed() { + font-size: $font-size-med; + font-weight: normal; + line-height: 1.2; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_typography.scss b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_typography.scss new file mode 100644 index 000000000..028b0df80 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_typography.scss @@ -0,0 +1,10 @@ +/*------------------------------------*\ + #TYPOGRAPHY +\*------------------------------------*/ + +/** + * In this file, we take the literal font sizes from our scale and define them + * against variables that we can utilise anywhere throughout the project. + */ + + $body-font-size: $font-size-med; diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_variables.scss b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_variables.scss new file mode 100644 index 000000000..ed2f7e355 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/abstracts/_variables.scss @@ -0,0 +1,198 @@ +/*------------------------------------*\ + #VARIABLES +\*------------------------------------*/ + +/** + * CONTENTS + * + * COLORS + * Brand Colors...............Globally-available variables and config + * Neutral Colors.............Grayscale colors, including white and black + * Utility Colors.............Info, Warning, Error, Success + * + * TYPOGRAPHY + * Font Families..............The fonts used in the design system + * Sizing.....................Font sizing + * + * LAYOUT + * Max-widths.................Maximum layout container width + * + + * SPACING + * Spacing defaults...........Spacing between elements + * + * BORDERS + * Border Width...............Border thicknesses + * Border Radius..............Border radius definitions + * + * ANIMATION + * Animation Speed............Transition/animation speed variables + * Animation easing...........Easing variables + * + * BREAKPOINTS + * Breakpoints................Global breakpoint definitions + */ + + /*------------------------------------*\ + #COLORS + \*------------------------------------*/ + +/** + * Brand Colors + * 1) Brand=specific colors + */ +$color-brand-blue: #114689; +$color-brand-blue-dark: #041544; +$color-brand-orange: #ba6333; + +/** + * Neutral Colors + * 1) Neutral colors are grayscale values used throughout the UI + */ +$color-neutral-white: #fff; +$color-neutral-gray-02: #f9f9f9; +$color-neutral-gray-07: #eee; +$color-neutral-gray-13: #ddd; +$color-neutral-gray-27: #bbb; +$color-neutral-gray-50: #808080; +$color-neutral-gray-60: #666; +$color-neutral-gray-73: #444; +$color-neutral-gray-93: #131313; +$color-neutral-black: #000; + +/** + * Utility Colors + * 1) Utility colors are colors used to provide feedback, such as alert messages, + * form validation, etc. + */ +$color-utility-info: #0192d0; +$color-utility-info-light: #d3f2ff; +$color-utility-error: #b12a0b; +$color-utility-error-light: #fdded8; +$color-utility-success: #03804d; +$color-utility-success-light: #d4f3e6; +$color-utility-warning: #a59b15; +$color-utility-warning-light: #fffecf; + + + + + +/*------------------------------------*\ + #TYPOGRAPHY +\*------------------------------------*/ + +/** + * Font Family + */ +$font-family-primary: 'Raleway', "HelveticaNeue", "Helvetica", "Arial", sans-serif; +$font-family-secondary: 'Abel', serif; + + +/** + * Font Sizing + */ +$font-size-sm: 0.75rem; +$font-size-sm-2: 0.85rem; +$font-size-med: 1rem; +$font-size-med-2: 1.2rem; +$font-size-large: 2rem; +$font-size-xl: 3rem; +$font-size-xxl: 4rem; + +/** + * Line Height + */ +$line-height-sm: 0.8; +$line-height-sm-2: 0.9; +$line-height-med: 1; +$line-height-med-2: 1.2; +$line-height-large: 1.6; +$line-height-xl: 1.8; + + + + + +/*------------------------------------*\ + #LAYOUT +\*------------------------------------*/ + +/** + * Max Width + */ +$l-max-width: 80rem !default; +$l-max-width-narrow: 45rem !default; +$l-linelength-width: 36rem !default; + + + + + +/*------------------------------------*\ + #SPACING +\*------------------------------------*/ + +/** + * Spacing and offsets + * 1) Used to space grids and body padding + */ + +$spacing: 1rem; +$spacing-small: round(0.5 * $spacing); +$spacing-large: round(2 * $spacing); + + + + + +/*------------------------------------*\ + #BORDERS +\*------------------------------------*/ + +/** + * Border + */ + $border-thickness: 1px; + +/** + * Border radius + */ +$border-radius: 4px; + + + + + +/*------------------------------------*\ + #ANIMATION +\*------------------------------------*/ + +/** + * Transition Speed + */ +$anim-fade-quick: 0.15s; +$anim-fade-long: 0.5s; + +/** + * Transition Ease + */ +$anim-ease: ease-out; + + + + + +/*------------------------------------*\ + #BREAKPOINTS +\*------------------------------------*/ + +/** + * Breakpoints used in media queries + * 1) These are not the only breakpoints used, but they provide a few defaults + */ +$bp-small: 28em; +$bp-small-2: 35em; +$bp-med: 47em; +$bp-large: 60em; +$bp-xl: 70em; diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_body.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_body.scss new file mode 100644 index 000000000..f215c85b2 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_body.scss @@ -0,0 +1,25 @@ +/*------------------------------------*\ + #BODY +\*------------------------------------*/ + +/** + * HTML base styles + * 1) Set the html element's height to at least 100% of the viewport. + * This is used to achieve a sticky footer + */ +html { + min-height: 100vh; /* 1 */ +} + +/** + * Body base styles + * 1) Set the body element's height to at least 100% of the viewport. + * This is used to achieve a sticky footer + */ +body { + min-height: 100vh; /* 1 */ + font-family: $font-family-primary; + @include typographyBody(); + background-color: $color-body-bg; + color: $color-body-text; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_buttons.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_buttons.scss new file mode 100644 index 000000000..d3019f197 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_buttons.scss @@ -0,0 +1,11 @@ +/*------------------------------------*\ + #BUTTONS +\*------------------------------------*/ + +/** + * Button and submit inputs reset + * 1) These should be styled using c-btn + */ +button { + cursor: pointer; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_forms.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_forms.scss new file mode 100644 index 000000000..7e1d1a154 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_forms.scss @@ -0,0 +1,128 @@ +/*------------------------------------*\ + #FORMS +\*------------------------------------*/ + +/** + * 1) Form element base styles + */ + +/** + * Input placeholder text base styles + */ +::-webkit-input-placeholder { + color: $color-form-placeholder; +} + +::-moz-placeholder { + color: $color-form-placeholder; +} + +:-ms-input-placeholder { + color: $color-form-placeholder; +} + +/** + * Fieldset base styles + */ +fieldset { + border: 0; + padding: 0; + margin: 0; +} + +/** + * Legend base styles + */ +legend { + margin-bottom: 0.25rem; +} + +/** + * Label base styles + */ +label { + display: block; + padding-bottom: 0.25rem; + color: $color-form-label; +} + +/** + * Add font size 100% of form element and margin 0 to these elements + */ +button, input, select, textarea { + font-family: inherit; + font-size: $font-size-med; + margin: 0; +} + +/** + * Text area base styles + */ +textarea { + resize: none; +} + +/** + * Input and text area base styles + */ +input, textarea { + width: 100%; + padding: 0.5rem; + border: $border-thickness solid $color-form-border; + background: $color-form-bg; + + &:focus { + border-color: $color-form-border-focus; + } + + &:disabled { + border-color: $color-neutral-gray-07; + background: $color-neutral-gray-07; + color: $color-neutral-gray-50; + } +} + +/** + * Remove webkit appearance styles from these elements + */ +input[type=text], input[type=search], input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration, input[type=url], input[type=number], textarea { + -webkit-appearance: none; +} + +/** + * Checkbox and radio button base styles + */ +input[type="checkbox"], +input[type="radio"] { + width: auto; + margin-right: 0.3rem; + border-color: $color-form-border; +} + +/** + * Search input base styles + */ +input[type="search"] { + -webkit-appearance: none; + border-radius: 0; +} + +/** + * Select + * 1) Remove default styling + */ +select { + display: block; + font-size: $font-size-med; + width: 100%; + border: $border-thickness solid $color-form-border; + border-radius: 0; + padding: 0.5rem; + height: 2rem; + background: $color-form-bg; + color: $color-form; + + &:focus { + border-color: $color-form-border-focus; + } +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_headings.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_headings.scss new file mode 100644 index 000000000..af247fac2 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_headings.scss @@ -0,0 +1,36 @@ +/*------------------------------------*\ + #HEADINGS +\*------------------------------------*/ + +h1, h2, h3, h4 { + font-family: $font-family-secondary; + text-transform: uppercase; +} + +/** + * Heading 1 base styles + */ +h1 { + @include typographyHeadingXXL(); +} + +/** + * Heading 2 base styles + */ +h2 { + @include typographyHeadingMed2(); +} + +/** + * Heading 3 base styles + */ +h3 { + @include typographyHeadingMed2(); +} + +/** + * Heading 4 base styles + */ +h4 { + @include typographyHeadingMed(); +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_links.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_links.scss new file mode 100644 index 000000000..b0f287694 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_links.scss @@ -0,0 +1,21 @@ +/*------------------------------------*\ + #LINKS +\*------------------------------------*/ + +/** + * Link base styles + */ +a { + color: $color-links; + text-decoration: none; + outline: 0; + transition: color $anim-fade-quick $anim-ease; + + &:hover, &:focus { + color: $color-links-hover; + } + + &:active { + color: $color-links-active; + } +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_lists.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_lists.scss new file mode 100644 index 000000000..597596c90 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_lists.scss @@ -0,0 +1,14 @@ +/*------------------------------------*\ + #LISTS +\*------------------------------------*/ + +/** + * 1) List base styles + */ + + /** + * Remove list styles from unordered and ordered lists + */ +ol, ul { + list-style: none; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_main.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_main.scss new file mode 100644 index 000000000..3f6da2cb8 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_main.scss @@ -0,0 +1,11 @@ +/*------------------------------------*\ + #MAIN ELEMENT +\*------------------------------------*/ + +/** + * Main element + */ +[role=main] { + display: block; + flex: 1 0 auto; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_media.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_media.scss new file mode 100644 index 000000000..45fc33c5c --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_media.scss @@ -0,0 +1,12 @@ +/*------------------------------------*\ + #MEDIA +\*------------------------------------*/ + +/** + * Responsive image styling + * 1) Allows for images to flex with varying screen size + */ +img { + max-width: 100%; + height: auto; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_reset.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_reset.scss new file mode 100644 index 000000000..82c641215 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_reset.scss @@ -0,0 +1,25 @@ +/*------------------------------------*\ + #RESET +\*------------------------------------*/ + +/** + * Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/ + */ +* { + box-sizing: border-box; +} + +/** + * 1) Zero out margins and padding for elements + */ +html, body, div, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, ol, ul, li, form, legend, label, table, header, footer, nav, section, figure { + margin: 0; + padding: 0; +} + +/** + * 1) Set HTML5 elements to display: block + */ +header, footer, nav, section, article, figure { + display: block; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_table.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_table.scss new file mode 100644 index 000000000..fa3215c54 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_table.scss @@ -0,0 +1,26 @@ +/*------------------------------------*\ + #TABLES +\*------------------------------------*/ + +/** + * Table + */ +table { + border-collapse: collapse; + border-spacing: 0; + width: 100%; +} + +/** + * Table header cell + */ +th { + text-align: left; +} + +/** + * Table row + */ +tr { + vertical-align: top; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/base/_text.scss b/packages/starterkit-handlebars-demo/dist/css/scss/base/_text.scss new file mode 100644 index 000000000..b5c3c5525 --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/base/_text.scss @@ -0,0 +1,83 @@ +/*------------------------------------*\ + #TEXT +\*------------------------------------*/ + +/** + * Paragraph base styles + */ +p { + margin-bottom: $spacing; +} + +/** + * Blockquote base styles + */ +blockquote { + font-style:italic; + border-left: 1px solid $color-neutral-gray-50; + color: $color-neutral-gray-50; + padding-left: 1rem; + margin-bottom: $spacing; +} + +/** + * Horizontal rule base styles + */ +hr { + border: 0; + height: 1px; + background: $color-neutral-gray-13; + margin: 1rem 0; +} + +/** + * Selection styles + */ +::-moz-selection { + color: $color-text-highlight; + background: $color-text-highlight-bg; /* Gecko Browsers */ +} + +::selection { + color: $color-text-highlight; + background: $color-text-highlight-bg; /* WebKit/Blink Browsers */ +} + +/** + * Code base styles + */ +code { + display: inline-block; + background: $color-neutral-gray-02; + border: 1px solid $color-neutral-gray-13; + padding: .2rem .5rem; + line-height: 1.2; + font-size: .85rem; +} + +/** + * Preformatted text base styles + */ +pre { + background: $color-neutral-gray-02; + border: 1px solid $color-neutral-gray-13; + font-size: $font-size-med; + padding: 1rem; + overflow-x: auto; + + /** + * Remove border from code within preformatted text block + */ + code { + border: 0; + } +} + +/** + * Code with languages associated with them + * 1) Override Prism sysles for code blocks with language + */ +code[class*="language-"], +pre[class*="language-"] { + font-family:monospace !important; +} diff --git a/packages/starterkit-handlebars-demo/dist/css/scss/components/_buttons.scss b/packages/starterkit-handlebars-demo/dist/css/scss/components/_buttons.scss new file mode 100644 index 000000000..517fbb9ae --- /dev/null +++ b/packages/starterkit-handlebars-demo/dist/css/scss/components/_buttons.scss @@ -0,0 +1,59 @@ +/*------------------------------------*\ + #BUTTONS +\*------------------------------------*/ + +/** + * + * 1) Button or link that has functionality to it + */ +.c-btn { + display: inline-block; + border: $border-thickness solid $color-btn-primary-border; + background: $color-brand-blue; + color: $color-neutral-white; + line-height: 1; + padding: 1rem 2rem; + border: 0; + text-transform: uppercase; + text-align: center; + transition: all $anim-fade-quick $anim-ease; + + &:hover, &:focus { + color: $color-neutral-white; + background: $color-brand-blue-dark; + } +} + +.c-btn--bare { + background: none; + color: $color-brand-blue; + border: 1px solid transparent; + + &:hover, &:focus { + background: none; + color: $color-brand-blue; + border-color: $color-brand-blue; + } +} + +/* + * Inner container wrapper + * 1) Container is direct decendant of + + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/04-forms/01-comment-form.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/04-forms/01-comment-form.twig new file mode 100755 index 000000000..e4360727b --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/04-forms/01-comment-form.twig @@ -0,0 +1,20 @@ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/04-forms/02-newsletter.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/04-forms/02-newsletter.twig new file mode 100755 index 000000000..041e2319e --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/04-forms/02-newsletter.twig @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/00-primary-nav.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/00-primary-nav.twig new file mode 100755 index 000000000..84942ffb7 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/00-primary-nav.twig @@ -0,0 +1,8 @@ + diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/01-footer-nav.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/01-footer-nav.twig new file mode 100755 index 000000000..d46a36b0c --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/01-footer-nav.twig @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/02-breadcrumbs.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/02-breadcrumbs.twig new file mode 100755 index 000000000..3b5c15351 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/02-breadcrumbs.twig @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/03-pagination.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/03-pagination.twig new file mode 100755 index 000000000..8b6de64a3 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/03-pagination.twig @@ -0,0 +1,9 @@ +
    +
  1. 1
  2. +
  3. 2
  4. +
  5. 3
  6. +
  7. 4
  8. +
  9. 5
  10. +
  11. 6
  12. +
  13. 7
  14. +
\ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/04-tabs.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/04-tabs.twig new file mode 100755 index 000000000..8e4ec10e2 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/05-navigation/04-tabs.twig @@ -0,0 +1,7 @@ +
+ +
\ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/00-social-share.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/00-social-share.twig new file mode 100755 index 000000000..120527d78 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/00-social-share.twig @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/01-accordion.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/01-accordion.twig new file mode 100755 index 000000000..253962dcb --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/01-accordion.twig @@ -0,0 +1,19 @@ +
+ +
\ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/02-single-comment.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/02-single-comment.twig new file mode 100755 index 000000000..4566255a8 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/06-components/02-single-comment.twig @@ -0,0 +1,9 @@ +
  • +
    + {% include "@atoms/04-images/04-avatar.twig" %} +

    {{ name.first }} {{ name.last }}

    +
    +
    +

    {{ description }}

    +
    +
  • diff --git a/packages/starterkit-twig-demo/dist/_patterns/01-molecules/07-messaging/00-alert.twig b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/07-messaging/00-alert.twig new file mode 100755 index 000000000..971484885 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/01-molecules/07-messaging/00-alert.twig @@ -0,0 +1,3 @@ +
    + {{ excerpt.short }} +
    \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/02-organisms/00-global/00-header.twig b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/00-global/00-header.twig new file mode 100755 index 000000000..706bd8d59 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/00-global/00-header.twig @@ -0,0 +1,9 @@ + + + diff --git a/packages/starterkit-twig-demo/dist/_patterns/02-organisms/00-global/01-footer.twig b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/00-global/01-footer.twig new file mode 100755 index 000000000..63f6fa5ef --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/00-global/01-footer.twig @@ -0,0 +1,7 @@ + +
    +
    + +
    +
    + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/02-organisms/01-article/00-article-body.twig b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/01-article/00-article-body.twig new file mode 100755 index 000000000..218bf5c2c --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/01-article/00-article-body.twig @@ -0,0 +1,22 @@ +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer fringilla sem a urna porttitor fringilla. Nulla eget justo felis.

    + +

    Aliquam erat volutpat. Mauris vulputate scelerisque feugiat. Cras a erat a diam venenatis aliquam. Sed tempus, purus ac pretium varius, risus orci sagittis purus, quis auctor libero magna nec magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas eros dolor, rutrum eu sollicitudin eu, commodo at leo. Suspendisse potenti. Sed eu nibh sit amet quam auctor feugiat vel et risus. Maecenas eu urna adipiscing neque dictum mollis suscipit in augue. Praesent pulvinar condimentum sagittis. Maecenas laoreet neque non eros consectetur fringilla. Donec vitae risus leo, vitae pharetra ipsum. Sed placerat eros eget elit iaculis semper. Aliquam congue blandit orci ac pretium.

    + +{% include "@atoms/04-images/02-landscape-16x9.twig" %} + +

    Aliquam ultrices cursus mauris, eget volutpat justo mattis nec. Sed a orci turpis. Aliquam aliquet placerat dui, consectetur tincidunt leo tristique et. Vivamus enim nisi, blandit a venenatis quis, convallis et arcu. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris libero sapien, placerat in sodales eu, tempor quis dui. Vivamus egestas faucibus pulvinar. Maecenas eget diam nunc. Phasellus at sem eros, ac suscipit neque. Phasellus sollicitudin libero a odio dignissim scelerisque. Aliquam purus nulla, tempor eget ullamcorper quis, rhoncus non dui. +

    + +{% include "@atoms/02-text/02-blockquote.twig" %} + +

    Cras at fringilla ipsum. Donec nec libero eget est blandit dignissim a eu ante. Morbi augue nulla, luctus eu sagittis vel, malesuada ut felis. Aliquam erat volutpat. Morbi malesuada augue ac massa hendrerit fermentum. Integer scelerisque lacus a dolor convallis lobortis. Curabitur mollis ante in massa ultricies dignissim. +

    + +{% include "@atoms/03-lists/00-unordered.twig" %} + +{% include "@atoms/03-lists/01-ordered.twig" %} + +

    Donec posuere fringilla nunc, vitae venenatis diam scelerisque vel. Nullam vitae mauris magna. Mauris et diam quis justo volutpat tincidunt congue nec magna. Curabitur vitae orci elit. Ut mollis massa id magna vestibulum consequat. Proin rutrum lectus justo, sit amet tincidunt est. Vivamus vitae lacinia risus. +

    + +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reiciendis, suscipit repellendus nulla accusantium deserunt sed explicabo voluptate sapiente ratione inventore molestiae nihil earum repellat quia odit vitae perspiciatis aliquam amet?

    diff --git a/packages/starterkit-twig-demo/dist/_patterns/02-organisms/02-comments/00-comment-thread.twig b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/02-comments/00-comment-thread.twig new file mode 100755 index 000000000..f6d5a8c60 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/02-comments/00-comment-thread.twig @@ -0,0 +1,12 @@ +
    +
    +

    59 Comments

    + {% include "@molecules/04-forms/01-comment-form.twig" %} +
      + {% for item in 1..5 %} + {% include "@molecules/06-components/02-single-comment.twig" %} + {% endfor %} +
    +
    + {% include "@molecules/05-navigation/03-pagination.twig" %} +
    diff --git a/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/00-latest-posts.twig b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/00-latest-posts.twig new file mode 100755 index 000000000..c85c91804 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/00-latest-posts.twig @@ -0,0 +1,9 @@ +
    +

    Latest Posts

    +
      + {% for post in latest_posts %} +
    • {% include "@molecules/02-blocks/00-media-block.twig" %}
    • + {% endfor %} +
    + View more posts +
    diff --git a/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/01-recent-tweets.twig b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/01-recent-tweets.twig new file mode 100755 index 000000000..d2d655305 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/01-recent-tweets.twig @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/02-related-posts.twig b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/02-related-posts.twig new file mode 100755 index 000000000..b4a75cbed --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/02-organisms/03-sections/02-related-posts.twig @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/00-site.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/00-site.twig new file mode 100755 index 000000000..18d596f1c --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/00-site.twig @@ -0,0 +1,9 @@ +
    + {% include "@organisms/00-global/00-header.twig" %} +
    + {% block hero %}{% endblock %} + {% block title %}{% endblock %} + {% block content %}{% endblock %} +
    + {% include "@organisms/00-global/01-footer.twig" %} +
    diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/01-page-1col.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/01-page-1col.twig new file mode 100755 index 000000000..ad48b2f37 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/01-page-1col.twig @@ -0,0 +1,10 @@ +{% extends "@templates/00-layouts/00-site.twig" %} +{% block content %} +
    +
    + {% block main %} +

    Content Placeholder

    + {% endblock %} +
    +
    +{% endblock %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/01-page-2col.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/01-page-2col.twig new file mode 100755 index 000000000..802647d7a --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/00-layouts/01-page-2col.twig @@ -0,0 +1,15 @@ +{% extends "@templates/00-layouts/00-site.twig" %} +{% block content %} +
    +
    + {% block main %} +

    Content Placeholder

    + {% endblock %} +
    + +
    +{% endblock %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/01-homepage.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/01-homepage.twig new file mode 100755 index 000000000..bf96fb39f --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/01-homepage.twig @@ -0,0 +1,35 @@ +{% extends "@templates/00-layouts/01-page-2col.twig" %} +{% block hero %} + {% if emergency %} + {% include "@molecules/07-messaging/00-alert.twig" with emergency %} + {% endif %} + {% if hero %} + {% include "@molecules/02-blocks/02-block-hero.twig" %} + {% endif %} + +
    + {% for tout in touts %} +
    + {% include "@molecules/02-blocks/05-block-inset.twig" %} +
    + {% endfor %} +
    + +
    +{% endblock %} + +{% block main %} +
    +

    Latest Posts

    +
      + {% for post in latest_posts %} +
    • {% include "@molecules/02-blocks/00-media-block.twig" %}
    • + {% endfor %} +
    + View more posts +
    +{% endblock %} + +{% block sidebar %} + {% include "@organisms/03-sections/01-recent-tweets.twig" %} +{% endblock %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/02-blog.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/02-blog.twig new file mode 100755 index 000000000..6690bc73e --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/02-blog.twig @@ -0,0 +1,11 @@ +{% extends "@templates/00-layouts/00-site.twig" %} +{% block title %}

    Our Outdoor Blog

    {% endblock %} + +{% block main %} + {% include "@organisms/03-sections/00-latest-posts.twig" %} + {% include "@molecules/05-navigation/03-pagination.twig" %} +{% endblock %} + +{% block sidebar %} + {% include "@organisms/03-sections/01-recent-tweets.twig" %} +{% endblock %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article-2col.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article-2col.twig new file mode 100755 index 000000000..825ca9471 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article-2col.twig @@ -0,0 +1,17 @@ +{% extends "@templates/00-layouts/01-page-2col.twig" %} +{% block main %} +
    +
    +

    Article Headline Lorem ipsum dolor sit aweofij

    + {% include "@molecules/00-text/00-byline.twig" %} +
    + {% include "@organisms/01-article/00-article-body.twig" %} +
    + {% include "@molecules/06-components/00-social-share.twig" %} + {% include "@organisms/02-comments/00-comment-thread.twig" %} +{% endblock %} + +{% block sidebar %} + {% include "@organisms/03-sections/02-related-posts.twig" %} + {% include "@organisms/03-sections/01-recent-tweets.twig" %} +{% endblock %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article.twig b/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article.twig new file mode 100755 index 000000000..0b960e162 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/03-templates/03-article.twig @@ -0,0 +1,12 @@ +{% extends "@templates/00-layouts/01-page-1col.twig" %} +{% block main %} +
    +
    +

    Article Headline Lorem ipsum dolor sit aweofij

    + {% include "@molecules/00-text/00-byline.twig" %} +
    + {% include "@organisms/01-article/00-article-body.twig" %} +
    + {% include "@molecules/06-components/00-social-share.twig" %} + {% include "@organisms/02-comments/00-comment-thread.twig" %} +{% endblock %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage.json b/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage.json new file mode 100755 index 000000000..8a879bd07 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage.json @@ -0,0 +1,135 @@ +{ + "title" : "Home Page", + "bodyClass": "home", + "emergency" : false, + "hero" : [ + { + "img": { + "landscape_16x9": { + "src": "../../images/sample/landscape-16x9-mountains.jpg", + "alt": "Mountains" + } + }, + "headline" : { + "medium" : "Top 10 mountain ranges for hiking" + } + } + ], + "touts" : [ + { + "img": { + "landscape_4x3": { + "src": "../../images/sample/tout-4x3-climber.jpg", + "alt": "Climber" + } + }, + "headline" : { + "short" : "Extreme climbing tips" + } + }, + { + "img": { + "landscape_4x3": { + "src": "../../images/sample/tout-4x3-stream.jpg", + "alt": "Stream hiking" + } + }, + "headline" : { + "short" : "Stream hiking" + } + }, + { + "img": { + "landscape_4x3": { + "src": "../../images/sample/tout-4x3-climbers.jpg", + "alt": "Explore hiking trails" + } + }, + "headline" : { + "short" : "Explore hiking trails" + } + } + ], + "latest-posts" : [ + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-river.jpg", + "alt": "Post Thumbnail" + } + }, + "headline" : { + "short" : "Navigate the Allegheny River" + }, + "excerpt" : { + "medium" : "The Allegheny River is a principal tributary of the Ohio River; it is located in the Eastern United States. The Allegheny River joins with the Monongahela River to form the Ohio River at the Point of Point State Park in Downtown Pittsburgh, Pennsylvania." + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-ivy.jpg", + "alt": "Ivy" + } + }, + "headline" : { + "short" : "How to detect and avoid poison ivy" + }, + "excerpt" : { + "medium" : "Toxicodendron radicans, commonly known as poison ivy is a poisonous North American plant that is well known for its production of urushiol" + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-yosemite.jpg", + "alt": "Yosemite" + } + }, + "headline" : { + "short" : "Top 10 hiking mountains" + }, + "excerpt" : { + "medium" : "Yosemite National Park is a United States National Park spanning eastern portions of Tuolumne, Mariposa and Madera counties in the central eastern portion of the U.S. state of California." + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-fire.jpg", + "alt": "Fire" + } + }, + "headline" : { + "short" : "How to build a campfire" + }, + "excerpt" : { + "medium" : "A campfire is a fire lit at a campsite, to serve the following functions: light, warmth, a beacon, an insect and/or apex predator deterrent, to cook, and for a psychological sense of security. " + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-gear.jpg", + "alt": "Camping Gear" + } + }, + "headline" : { + "short" : "Pick the right camping gear" + }, + "excerpt" : { + "medium" : "The equipment used in camping varies with the particular type of camping. For instance, in survival camping the equipment consists of small items which have the purpose of helping the camper in providing food, heat and safety." + } + } + ], + "inset-blocks" : [ + { + "headline" : "This is the headline for the inset block" + } + ], + "latest-block" : [ + { + "headline" : "This is the headline for the latest block" + } + ] +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage.twig b/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage.twig new file mode 100755 index 000000000..41c4fe12a --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage.twig @@ -0,0 +1 @@ +{% include "@templates/01-homepage.twig" %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage~emergency.json b/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage~emergency.json new file mode 100755 index 000000000..14255064f --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/04-pages/00-homepage~emergency.json @@ -0,0 +1,8 @@ +{ + "emergency": { + "styleModifier" : "error", + "excerpt" : { + "short" : "Emergency! This is a variation of the core homepage template." + } + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/04-pages/01-blog.json b/packages/starterkit-twig-demo/dist/_patterns/04-pages/01-blog.json new file mode 100755 index 000000000..c5067e3e7 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/04-pages/01-blog.json @@ -0,0 +1,86 @@ +{ + "title" : "Blog", + "bodyClass": "blog", + "latest-posts" : [ + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-river.jpg", + "alt": "Post Thumbnail" + } + }, + "headline" : { + "short" : "Navigate the Allegheny River" + }, + "excerpt" : { + "medium" : "The Allegheny River is a principal tributary of the Ohio River; it is located in the Eastern United States. The Allegheny River joins with the Monongahela River to form the Ohio River at the Point of Point State Park in Downtown Pittsburgh, Pennsylvania." + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-ivy.jpg", + "alt": "Ivy" + } + }, + "headline" : { + "short" : "How to detect and avoid poison ivy" + }, + "excerpt" : { + "medium" : "Toxicodendron radicans, commonly known as poison ivy is a poisonous North American plant that is well known for its production of urushiol" + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-yosemite.jpg", + "alt": "Yosemite" + } + }, + "headline" : { + "short" : "Top 10 hiking mountains" + }, + "excerpt" : { + "medium" : "Yosemite National Park is a United States National Park spanning eastern portions of Tuolumne, Mariposa and Madera counties in the central eastern portion of the U.S. state of California." + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-fire.jpg", + "alt": "Fire" + } + }, + "headline" : { + "short" : "How to build a campfire" + }, + "excerpt" : { + "medium" : "A campfire is a fire lit at a campsite, to serve the following functions: light, warmth, a beacon, an insect and/or apex predator deterrent, to cook, and for a psychological sense of security. " + } + }, + { + "img": { + "square": { + "src": "../../images/sample/thumb-square-gear.jpg", + "alt": "Camping Gear" + } + }, + "headline" : { + "short" : "Pick the right camping gear" + }, + "excerpt" : { + "medium" : "The equipment used in camping varies with the particular type of camping. For instance, in survival camping the equipment consists of small items which have the purpose of helping the camper in providing food, heat and safety." + } + } + ], + "inset_blocks" : [ + { + "headline" : "This is the headline for the inset block" + } + ], + "latest_block" : [ + { + "headline" : "This is the headline for the latest block" + } + ] +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/04-pages/01-blog.twig b/packages/starterkit-twig-demo/dist/_patterns/04-pages/01-blog.twig new file mode 100755 index 000000000..89884f577 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/04-pages/01-blog.twig @@ -0,0 +1 @@ +{% include "@templates/02-blog.twig" %} diff --git a/packages/starterkit-twig-demo/dist/_patterns/04-pages/02-article.json b/packages/starterkit-twig-demo/dist/_patterns/04-pages/02-article.json new file mode 100755 index 000000000..1d8574600 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/04-pages/02-article.json @@ -0,0 +1,28 @@ +{ + "title" : "Top 10 Trails You Have To Hike Before You Die", + "bodyClass": "article", + "author" : { + "first-name" : "Julianne", + "last-name" : "McCormick" + }, + "img": { + "landscape_4x3": { + "src": "../../images/sample/landscape-16x9-mountains.jpg", + "alt": "Mountains" + }, + "landscape_16x9": { + "src": "../../images/sample/landscape-16x9-mountains.jpg", + "alt": "Mountains" + } + }, + "inset_blocks" : [ + { + "headline" : "This is the headline for the inset block" + } + ], + "latest_block" : [ + { + "headline" : "This is the headline for the latest block" + } + ] +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/_patterns/04-pages/02-article.twig b/packages/starterkit-twig-demo/dist/_patterns/04-pages/02-article.twig new file mode 100755 index 000000000..eb40c4bfd --- /dev/null +++ b/packages/starterkit-twig-demo/dist/_patterns/04-pages/02-article.twig @@ -0,0 +1 @@ +{% include "@templates/03-article-2col.twig" %} diff --git a/packages/starterkit-twig-demo/dist/css/pattern-scaffolding.css b/packages/starterkit-twig-demo/dist/css/pattern-scaffolding.css new file mode 100755 index 000000000..b09172fc8 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/pattern-scaffolding.css @@ -0,0 +1,54 @@ +/** + * This stylesheet is for styles you want to include only when displaying demo + * styles for grids, animations, color swatches, etc. + * These styles will not be your production CSS. + */ +#sg-patterns { + -webkit-box-sizing: border-box !important; + box-sizing: border-box !important; + max-width: 100%; + padding: 0 0.5em; +} + +.demo-animate { + background: #ddd; + padding: 1em; + margin-bottom: 1em; + text-align: center; + border-radius: 8px; + cursor: pointer; +} + +.sg-colors { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + list-style: none !important; + padding: 0 !important; + margin: 0 !important; +} +.sg-colors li { + -webkit-box-flex: 1; + -ms-flex: auto; + flex: auto; + padding: 0.3em; + margin: 0 0.5em 0.5em 0; + min-width: 5em; + max-width: 14em; + border: 1px solid #ddd; + border-radius: 8px; +} + +.sg-swatch { + display: block; + height: 4em; + margin-bottom: 0.3em; + border-radius: 5px; +} + +.sg-label { + font-size: 90%; + line-height: 1; +} diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_animation.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_animation.scss new file mode 100755 index 000000000..d28bc9136 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_animation.scss @@ -0,0 +1,13 @@ +.animate-fade { + @include transition(opacity, 0.3s, ease-out); + + &:hover { + opacity: 0; + } +} + +.animate-move { + > .demo-shape { + @include transition(all, 0.8s, ease-in-out); + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_forms.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_forms.scss new file mode 100755 index 000000000..1c02c6a83 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_forms.scss @@ -0,0 +1,111 @@ +/*------------------------------------*\ + $FORMS +\*------------------------------------*/ +form ol, form ul { + list-style: none; + margin-left: 0; +} + +fieldset { + border: 0; + padding: 0; + margin: 0; +} + +label { + display: block; + padding-bottom: $space-half; +} + +button, input, select, textarea { + font-family: inherit; + font-size: 100%; + margin: 0 1px 0; +} + +input, textarea { + width: 100%; + border: 1px solid $gray; + padding: $pad-half 0.65rem; +} + +input[type=text], input[type=search], input[type=url], input[type=number], textarea { + -webkit-appearance: none; +} + +button, input[type="submit"] { + padding: $pad-half; + background: $gray-dark; + border: 1px solid $gray; + cursor: pointer; +} + +input[type="checkbox"], +input[type="radio"] { + width: auto; + margin-right: 0.3em; +} + +input[type="search"] { + -webkit-appearance: none; + border-radius: 0; +} + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +//Form Field Container +.field-container { + margin-bottom: $space; +} + +.inline-form { + fieldset, .inline-container { + position: relative; + } + + input[type=submit], button, .btn { + font-size: $font-size-small-2; + padding: 0.65rem 1.3rem; + background: $gray-dark; + position: absolute; + top: 0; + right: 0; + z-index: 1; + width: auto; + + &:hover, &:focus { + background: $gray; + color: $white; + } + } +} + +/* Validation */ +.has-error { + border-color: $error; +} +.is-valid { + border-color: $valid; +} + + + + +/*------------------------------------*\ + $SPECIFIC FORMS +\*------------------------------------*/ + +/* Search Form */ +.search-field { + padding-right: 3em; +} +.inline-form .search-submit { + background: none; + padding: 0.78em 1em; + border: 0; + border-left: 1px solid $gray; + color: $gray; +} diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_global-classes.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_global-classes.scss new file mode 100755 index 000000000..2e13f8858 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_global-classes.scss @@ -0,0 +1,104 @@ +/*------------------------------------*\ + $GLOBAL CLASSES +\*------------------------------------*/ + +/* Clearfix */ +.cf { + *zoom: 1; +} +.cf:before, .cf:after { + content: " "; /* 1 */ + display: table; /* 2 */ +} + +.cf:after { + clear: both; +} + +/* Completely remove from the flow and screen readers. */ +.is-hidden { + display: none !important; + visibility: hidden !important; +} + +/* Completely remove from the flow but leave available to screen readers. */ +.is-vishidden { + position: absolute !important; + overflow: hidden; + width: 1px; + height: 1px; + padding: 0; + border: 0; + clip: rect(1px, 1px, 1px, 1px); +} + +/* Floats */ +.right { + float: right; + padding: 0 0 $pad $pad; +} + +.right-search { + float: right; + padding: 0 0 $pad 0; +} + +.left { + float: left; + padding: 0 $pad $pad 0; +} + +/* Text-Align */ +.align-right { + text-align: right; +} + +.align-center { + text-align: center; +} + +.align-left { + text-align: left; +} + +/* Display Classes */ +.hide-small { + @media all and (max-width: $bp-med) { + display: none; + } +} + +.hide-med { + @media all and (min-width: $bp-med) and (max-width: $bp-large) { + display: none; + } +} + +.hide-large { + @media all and (min-width: $bp-large) { + display: none; + } +} + +//States +.valid { + color: $valid; +} + +.error { + color: $error; +} + +.warning { + color: $warning; +} + +.information { + color: $information; +} + +.font-secondary { + font-family: $font-secondary; +} + + diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_headings.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_headings.scss new file mode 100755 index 000000000..5f2433645 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_headings.scss @@ -0,0 +1,31 @@ +/* Headings */ +/*Further Reading: http:/csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css/ */ +h1, .alpha { + line-height: 1.2; +} + +h2, .beta { + line-height: 1.2; +} + +h3, .gamma { + line-height: 1.2; +} + +h4, .delta { + +} + +h5, .epsilon { + +} + +h6, .zeta { + +} + +/* Subheadings */ +.subheading { + font-family: $font-secondary; + font-weight: normal; +} diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_links.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_links.scss new file mode 100755 index 000000000..d70545d76 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_links.scss @@ -0,0 +1,10 @@ +/* Links */ +a { + color: $gray-dark; + text-decoration: none; + outline: 0; + + &:hover, &:focus { + color: $gray; + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_lists.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_lists.scss new file mode 100755 index 000000000..4ceb7cf5c --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_lists.scss @@ -0,0 +1,19 @@ +ol, ul { + margin: 0; + padding: 0; + list-style: none; +} + +/* Definition Lists */ +dl { + overflow: hidden; + margin: 0 0 $space; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 0; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_main.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_main.scss new file mode 100755 index 000000000..f92fd1b34 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_main.scss @@ -0,0 +1,6 @@ +body { + background: $white; + font: 100%/1.5 $font; + -webkit-text-size-adjust: 100%; + color: $gray-dark; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_media.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_media.scss new file mode 100755 index 000000000..ec74c8ffc --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_media.scss @@ -0,0 +1,23 @@ +/*------------------------------------*\ + $MEDIA ELEMENTS +\*------------------------------------*/ + +/* Flexible Media */ +img, video, object { + max-width: 100%; + height: auto; +} + +iframe { + margin-bottom: $space; +} + +figure { + margin-bottom: $space; + img { + margin-bottom: $space-half; + } +} +figcaption { + font-style: italic; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_tables.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_tables.scss new file mode 100755 index 000000000..1b2a2b2c4 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_tables.scss @@ -0,0 +1,18 @@ +/*------------------------------------*\ + $Table +\*------------------------------------*/ +table { + border-collapse: collapse; + border-spacing: 0; + border: 1px solid $gray; + width: 100%; +} +th { + text-align: left; + border: 1px solid $gray; + padding: 0.2em; +} +td { + border: 1px solid $gray; + padding: 0.2em; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/base/_text.scss b/packages/starterkit-twig-demo/dist/css/scss/base/_text.scss new file mode 100755 index 000000000..de17e3ec6 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/base/_text.scss @@ -0,0 +1,26 @@ +/* Text-Related Elements */ +p { + margin-bottom: $space; +} + +/* Blockquote */ +blockquote { + font-style:italic; + border-left: 1px solid $gray; + color: $gray; + padding-left: $pad; + margin-bottom: $space; +} + +/* Horizontal Rule */ +hr { + border: 0; + height: 2px; + background: $gray-light-2; + margin: $space-double 0; +} + +abbr { + border-bottom: 1px dotted $gray; + cursor: help; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/generic/_mixins.scss b/packages/starterkit-twig-demo/dist/css/scss/generic/_mixins.scss new file mode 100755 index 000000000..14d8a2a3d --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/generic/_mixins.scss @@ -0,0 +1,23 @@ +/*------------------------------------*\ + $MIXINS +\*------------------------------------*/ + +/* CSS Transition + Usage: @include transition(width,0.3s,ease-out); + */ +@mixin transition($transition-property, $transition-time, $method) { + -webkit-transition: $transition-property $transition-time $method; + -moz-transition: $transition-property $transition-time $method; + -ms-transition: $transition-property $transition-time $method; + -o-transition: $transition-property $transition-time $method; + transition: $transition-property $transition-time $method; +} + +/* Rem Unit font sizes with relative fallback http:/seesparkbox.com/foundry/scss_rem_mixin_now_with_a_better_fallback + Usage: @include font-size(1, large); +*/ +@mixin font-size( $decimal-size, $keyword: null ) { + @if $keyword{ font-size: $keyword; } + @else { font-size: $decimal-size * $base-font-multiplier * 16px;} + font-size: $decimal-size * 1rem; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/generic/_reset.scss b/packages/starterkit-twig-demo/dist/css/scss/generic/_reset.scss new file mode 100755 index 000000000..e7807ec72 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/generic/_reset.scss @@ -0,0 +1,17 @@ +/*------------------------------------*\ + $RESET +\*------------------------------------*/ + +/* Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/ */ +* { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +html, body, div, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, ol, ul, li, form, legend, label, table, header, footer, nav, section, figure { + margin: 0; + padding: 0; +} +header, footer, nav, section, article, hgroup, figure { + display: block; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/generic/_variables.scss b/packages/starterkit-twig-demo/dist/css/scss/generic/_variables.scss new file mode 100755 index 000000000..3e7ccbcba --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/generic/_variables.scss @@ -0,0 +1,65 @@ +/*------------------------------------*\ + $VARIABLES +\*------------------------------------*/ + +//Colors +$gray : #808080; +$gray-light : #f9f9f9; +$gray-light-2 : #eee; +$gray-light-3 : #ddd; +$gray-med : #666; +$gray-dark : #333; +$gray-dark-2 : #131313; +$white : #fff; +$black : #000; +$dim : rgba(0,0,0,0.5); +$error : #f00; +$valid : #089e00; +$warning : #fff664; +$information : #000db5; + + +//Typography +$font : "HelveticaNeue", "Helvetica", "Arial", sans-serif; +$font-secondary : Georgia, Times, "Times New Roman", serif; + +$font-size-small : 0.75em; +$font-size-small-2 : 0.875em; +$font-size-med : 1em; +$font-size-med-2: 1.0625em; +$font-size-large : 1.4375em; + + +//Layout +$max-width: 72em; + +//Defaults +$space : 1em; +$space-and-half : $space*1.5; +$space-double : $space*2; +$space-quad : $space*4; +$space-half : $space/2; +$pad : 1em; +$pad-and-half : $pad*1.5; +$pad-double : $pad*2; +$pad-half : $pad/2; +$pad-quarter :$pad/4; + +//Borders +$border-med: 3px; +$border-thick: 7px; + + +//Breakpoints +$bp-small : 24em; +$bp-small-2 : 29.75em; +$bp-small-3 : 39.8em; +$bp-med : 46.8em; +$bp-med-2 : 48em; +$bp-large : 50em; +$bp-large-2 : 66em; +$bp-xl : 73em; +$bp-xxl : 89em; +$bp-xxxl : 93em; + +// \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_accordion.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_accordion.scss new file mode 100755 index 000000000..3423544c9 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_accordion.scss @@ -0,0 +1,33 @@ +.accordion { + margin-bottom: $space; +} + +.acc-handle { + background: $gray-dark-2; + color: $white; + font-family: $font-secondary; + font-weight: bold; + display: block; + position: relative; + padding: $pad-half; + border-bottom: 1px solid $gray-light-3; + + &:after { + content:"+"; + float: right; + } + + &:hover { + color: $white; + background: $gray-dark; + + } + + &.active { + background: $gray-dark; + + &:after { + content:"-"; + } + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_article.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_article.scss new file mode 100755 index 000000000..55387309e --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_article.scss @@ -0,0 +1,34 @@ +//Article +.article-header { + h1 { + font-size: 2.5em; + } +} + +.byline { + font-size: $font-size-small-2; + font-style: italic; + margin-bottom: $space-half; +} + +//Social Share +.social-share { + overflow: hidden; + margin-bottom: $space; + + li { + float: left; + margin-right: $space-half; + } + + a { + background: $gray-dark; + color: $white; + display: block; + padding: $pad-half; + + &:hover { + background: $gray; + } + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_blocks.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_blocks.scss new file mode 100755 index 000000000..160963bd6 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_blocks.scss @@ -0,0 +1,138 @@ +/* Generic Placeholder Brick: REMOVE FOR PRODUCTION */ +.brick { + background: #dcdddc; + padding: $pad-double; + text-align: center; + font-weight: bold; + border-bottom: 1px solid $gray-light-2; +} + +/* Block */ +.block { + overflow: hidden; + + p:last-child { + margin-bottom: 0; + } +} + +.headline { + line-height: 1.2; +} + +/* Hero Block */ +.block-hero { + margin-bottom: $space-half; + + .b-thumb { + img { + display: block; + } + } + + @media all and (min-width: $bp-large) { + position: relative; + + .b-text { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + background: $dim; + color: $white; + padding: $pad-and-half; + } + } +} + +/* Block Thumbnail with Headline */ +.block-thumb { + display: table; + width: 100%; + border-collapse: collapse; + + .b-inner { + display: table-row; + vertical-align: top; + overflow: hidden; + } + + .b-thumb { + @media all and (min-width: $bp-small-2) { + display: table-cell; + vertical-align: top; + width: 30%; + max-width: 10em; + + img { + display: block; + width: 100%; + height: auto; + } + } + } + + .b-text { + @media all and (min-width: $bp-small-2) { + display: table-cell; + width: 70%; + padding: 0 $pad; + } + } +} + + +/* Block Headline Summary */ +.block-headline-summary { + a { + display: block; + padding: $pad-half; + } +} + +/* Block Inset */ +.block-inset { + position: relative; + + .b-thumb { + position: relative; + z-index: 0; + + img { + display: block; + } + } +} + +/* Hero Block */ +.block-inset { + margin-bottom: $space-half; + position: relative; + + .headline { + font-size: 1.1em; + } + + .b-text { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + background: $dim; + color: $white; + padding: $pad-half; + } +} + +/* Block Thumb with Summary */ +.block-thumb-summary { + .b-thumb { + float: left; + width: 50%; + } + + .b-text { + margin-left: 50%; + padding: $pad-half; + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_buttons.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_buttons.scss new file mode 100755 index 000000000..0ae2805e1 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_buttons.scss @@ -0,0 +1,40 @@ +/*------------------------------------*\ + $BUTTONS +\*------------------------------------*/ +.btn { + display: inline-block; + background: $gray-dark; + color: $white; + line-height: 1; + font-weight: bold; + padding: $pad; + border: 0; + text-align: center; + + &:hover, &:focus { + background: $gray; + color: $white; + } + + &.disabled { + background: $gray-light-2; + color: $gray; + } +} + +.btn-small { + padding: $pad-half; +} + +.btn-large { + padding: $pad-half; + text-transform: uppercase; + background: $gray; + font-size: 1.4rem; + font-weight: normal; +} + + +.text-btn { + font-style: italic; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_carousels.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_carousels.scss new file mode 100755 index 000000000..77e3f197b --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_carousels.scss @@ -0,0 +1,38 @@ +/* Horizontal Carousel */ +.carousel-horizontal { + margin-bottom: $space; + overflow: hidden; + position: relative; +} + +.carousel-island-container { + overflow: hidden; +} + +.carousel-container { + position: relative; +} + +.carousel-list { + +} + +.carousel-controls { + display: table; + width: 100%; + margin: (-$space-half) 0 $space; + + a, div { + display: table-cell; + padding: $pad-half; + } + + .carousel-pagination { + text-align: center; + } + + .carousel-next { + text-align: right; + } + +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_comments.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_comments.scss new file mode 100755 index 000000000..9959b7abf --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_comments.scss @@ -0,0 +1,30 @@ +.comments { + li { + margin-bottom: $space; + } +} + +.comment-container { + overflow: hidden; + margin-bottom: $space; + list-style: none; +} + +.comment-meta { + float: left; + width: 6.5em; + + img { + display: block; + border: 1px solid $gray-light-2; + margin-bottom: $space-half; + } +} + +.comment-name { + font-size: $font-size-small; +} + +.comment-text { + margin-left: 9em; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_footer.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_footer.scss new file mode 100755 index 000000000..850f94bf4 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_footer.scss @@ -0,0 +1,39 @@ +/*------------------------------------*\ + $FOOTER +\*------------------------------------*/ +.footer { + clear: both; + overflow: hidden; + background: $gray-dark-2; + color: $white; + line-height: 1.2; + + a { + color: $gray-light; + } +} + +//Footer Nav +.nav-footer { + margin: (-$pad) (-$pad) $space; + + li { + border-bottom: 1px solid $gray-dark; + + @media all and (min-width: $bp-med) { + border: 0; + float: left; + } + } + + a { + display: block; + padding: $pad; + } +} + +.copyright { + @media all and (min-width: $bp-med) { + float: right; + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_header.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_header.scss new file mode 100755 index 000000000..8fb78d7ce --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_header.scss @@ -0,0 +1,45 @@ +.header { + background: $white; + padding: 0; + border-bottom: 1px solid #dbdbdb; + @extend .lc; +} + +.logo { + float: left; + max-width: 8rem; + margin: 0.4rem; + + @media all and (min-width: $bp-med) { + max-width: 9rem; + } +} + +.nav-toggle { + float: right; + display: block; + padding: 0.9rem 1rem 0.7rem; + font-size: 1.3rem; + line-height: 1; + border-left: 1px solid #dbdbdb; + + @media all and (min-width: $bp-med) { + display: none; + } + + @media all and (max-width: 17em) { + padding-left: 0.2rem; + padding-right: 0.2rem; + } +} + +.search-form { + overflow: hidden; + max-height: 0; + + @media all and (min-width: $bp-med) { + float: right; + max-height: none; + margin: 0.65em 0.5em 0 0; + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_icons.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_icons.scss new file mode 100755 index 000000000..cacbf1fbd --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_icons.scss @@ -0,0 +1,125 @@ + +/* Icon Font */ +@font-face { + font-family: 'icons'; + src:url('../fonts/icons.eot'); + src:url('../fonts/icons.eot?#iefix') format('embedded-opentype'), + url('../fonts/icons.woff') format('woff'), + url('../fonts/icons.ttf') format('truetype'), + url('../fonts/icons.svg#icons') format('svg'); + font-weight: normal; + font-style: normal; +} + +/* Use the following CSS code if you want to use data attributes for inserting your icons */ +[data-icon]:before { + font-family: 'icons'; + content: attr(data-icon); + speak: none; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; +} + +.icon-twitter:before, .icon-stumbleupon:before, .icon-pinterest:before, .icon-linkedin:before, .icon-google-plus:before, .icon-search:before, .icon-play:before, .icon-menu:before, .icon-arrow-left:before, .icon-arrow-right:before, .icon-bubble:before, .icon-facebook:before, .icon-feed:before, .icon-youtube:before, .icon-tag:before, .icon-tumblr:before, .icon-instagram, .icon-podcast, .icon-apple,.icon-android, .icon-arrow:after, .icon-envelope:before { + font-family: 'icons'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; +} +.icon-twitter:before { + content: "\74"; +} +.icon-stumbleupon:before { + content: "\75"; +} +.icon-pinterest:before { + content: "\70"; +} +.icon-linkedin:before { + content: "\69"; +} +.icon-google-plus:before { + content: "\67"; +} +.icon-search:before { + content: "\73"; +} +.icon-play:before { + content: "\61"; +} +.icon-menu:before { + content: "\21"; +} +.icon-arrow-left:before { + content: "\23"; +} +.icon-arrow-right:before { + content: "\24"; +} +.icon-bubble:before { + content: "\25"; +} +.icon-facebook:before { + content: "\66"; +} +.icon-feed:before { + content: "\27"; +} +.icon-youtube:before { + content: "\79"; +} +.icon-tag:before { + content: "\28"; +} +.icon-tumblr:before { + content: "\6d"; +} +.icon-instagram:before { + content: "\22"; +} +.icon-podcast:before { + content: "\26"; +} +.icon-android:before { + content: "\29"; +} +.icon-apple:before { + content: "\2a"; +} +.icon-envelope:before { + content: "\2b"; +} + + +.icon-arrow:after { + content: "\61"; + display: inline-block; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); +} + +.icon-play:before { + font-size: 0.7rem; + padding-left: 0.2em; +} + +.icon-play-box { + display: block; + margin-left: $pad-double; +} + +.icon-play-box:before { + padding: $pad-quarter; + background: $gray; + color: $white; + margin-left: -1.7rem; + margin-right: $pad-half; +} diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_layout.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_layout.scss new file mode 100755 index 000000000..4929d28e3 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_layout.scss @@ -0,0 +1,288 @@ +/*------------------------------------*\ + $LAYOUT +\*------------------------------------*/ + +/* Layout Container */ +.lc { + max-width: $max-width; + margin: 0 auto; + padding: $pad-half; +} + +/*------------------------------------*\ + $TEMPLATES +\*------------------------------------*/ + +/* Two Column Layout */ +.l-two-col { + @extend .cf; + + .l-main { + @media all and (min-width: $bp-large) { + float: left; + width: 70%; + padding-right: $pad; + } + } + + .l-sidebar { + @media all and (max-width: $bp-large) { + clear: both; + } + + @media all and (min-width: $bp-large) { + float: left; + width: 30%; + padding: 0 0 0 $pad; + } + } +} + + +/*------------------------------------*\ + $GRIDS +\*------------------------------------*/ + +/* Grid Container */ +.g { + overflow: hidden; + margin: 0 (-$pad-half); +} + +/* Grid Item */ +.gi { + padding: $pad-half; + + img { + display: block; + } + + @media all and (min-width: $bp-med) { + float: left; + } +} + +/* Grid 1up */ +.g-1up { + .gi { + width: 100%; + } +} + +/* Grid 2up */ +.g-2up { + @media all and (min-width: $bp-med) { + > .gi { + float: left; + width: 50%; + + &:nth-of-type(odd) { + clear: left; + } + } + } +} + +/* Grid Half (Always displayed side by side) */ +.g-half { + > .gi { + float: left; + width: 50%; + + &:nth-of-type(odd) { + clear: left; + } + } +} + +/* Grid 3up */ +.g-3up { + @media all and (min-width: $bp-med) { + > .gi { + float: left; + width: 50%; + + &:nth-of-type(2n+1) { + clear: left; + } + } + } + + @media all and (min-width: $bp-large) { + > .gi { + width: 33.3333333%; + + &:nth-of-type(2n+1) { + clear: none; + } + + &:nth-of-type(3n+1) { + clear: left; + } + } + } +} + +/* Grid 4up */ +.g-4up { + @media all and (min-width: $bp-med) { + >.gi { + float: left; + width: 50%; + + &:nth-of-type(2n+1) { + clear: both; + } + } + } + + @media all and (min-width: $bp-large) { + >.gi { + width: 25%; + + &:nth-of-type(2n+1) { + clear: none; + } + + &:nth-of-type(4n+1) { + clear: left; + } + } + } +} + +/* Grid Quarter (Always displayed side by side) */ +.g-quarter { + > .gi { + float: left; + width: 24%; + + &:nth-of-type(4n+1) { + clear: left; + } + } +} + +.g-max4 { + + @media all and (min-width: $bp-small-2) { + >.gi { + float: left; + width: 50%; + + &:nth-of-type(2n+1) { + clear: both; + } + } + } + + @media all and (min-width: $bp-small-3) { + >.gi { + width: 33.3333333%; + + &:nth-of-type(2n+1) { + clear: none; + } + + &:nth-of-type(3n+1) { + clear: left; + } + } + } + + @media all and (min-width: $bp-large) { + >.gi { + width: 25%; + + &:nth-of-type(3n+1) { + clear: none; + } + + &:nth-of-type(4n+1) { + clear: left; + } + } + } +} + +/* Grid 5up */ +.g-max5 { + + >.gi { + float: left; + width: 50%; + + &:nth-of-type(2n+1) { + clear: both; + } + } + + @media all and (min-width: $bp-small-3) { + >.gi { + width: 33.3333333%; + + &:nth-of-type(2n+1) { + clear: none; + } + + &:nth-of-type(3n+1) { + clear: left; + } + } + } + + @media all and (min-width: $bp-med) { + >.gi { + width: 25%; + + &:nth-of-type(3n+1) { + clear: none; + } + + &:nth-of-type(4n+1) { + clear: left; + } + } + } + + @media all and (min-width: $bp-med-2) { + >.gi { + width: 20%; + + &:nth-of-type(4n+1) { + clear: none; + } + + &:nth-of-type(5n+1) { + clear: left; + } + } + } +} + +/* Grid 2/3 */ +.gi-2-3 { + @media all and (min-width: $bp-med) { + float: left; + width: 66.666666%; + } +} + +.gi-1-3 { + @media all and (min-width: $bp-med) { + float: left; + width: 33.333333%; + } +} + +/* Grid 4up block */ +.g-opposites { + .gi { + float: left; + + &:last-child { + float: right; + text-align: right; + } + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_lists.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_lists.scss new file mode 100755 index 000000000..0c4e8beaa --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_lists.scss @@ -0,0 +1,63 @@ +.inline-list { + li { + display: inline-block; + } +} + +/* Social List */ +.social-list { + li { + margin: 0 0.4rem $space 0; + } + + a { + font-size: 1.6em; + } +} + + +/* Headline List */ +.headline-list { + margin-bottom: $space; + + &.flush { + margin: 0; + } + + h4 { + font-weight: normal; + } + + li { + padding: $pad-quarter 0; + border-top: 1px solid $gray-light-3; + } +} + +/* Post List */ +.post-list { + li { + margin-bottom: $space; + } +} + +/* Bullet List */ +.bullet-list { + list-style: square; + margin: 0 0 1em 1.2em; + line-height: 1.3; + + li { + margin-bottom: $space; + } +} + +/* Text List */ +.text-list { + margin: 0 0 1em; + line-height: 1.3; + + li { + margin-bottom: $space; + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_main.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_main.scss new file mode 100755 index 000000000..592c01dea --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_main.scss @@ -0,0 +1,9 @@ +/*------------------------------------*\ + $MAIN CONTENT AREA +\*------------------------------------*/ +[role=main] { + padding: $pad-half $pad-half $pad-double; + overflow: hidden; + @extend .lc; + @extend .cf; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_messaging.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_messaging.scss new file mode 100755 index 000000000..a2d31a92e --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_messaging.scss @@ -0,0 +1,18 @@ +/*------------------------------------*\ + $MESSAGING +\*------------------------------------*/ + +// Alerts +.alert { + text-align: center; + padding: $pad; + margin-bottom: $space-half; + border: 1px solid $gray; + background: $gray-light; +} + +.alert-error { + color: $error; + border-color: $error; + background: #ffbebe; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_nav.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_nav.scss new file mode 100755 index 000000000..b98e3300e --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_nav.scss @@ -0,0 +1,52 @@ +/*------------------------------------*\ + $NAVIGATION +\*------------------------------------*/ + +.nav { + clear: both; + overflow: hidden; + max-height: 0; + + a { + display: block; + padding: $pad; + border-top: 1px solid $gray-light-2; + } + + &.active { + max-height: 40em; + } + + @media all and (min-width: $bp-med) { + max-height: none; + float: right; + clear: none; + + li { + float: left; + } + + a { + border: 0; + } + + } +} + +//Pagination +.pagination { + overflow: hidden; + + li { + float: left; + border-right: 1px solid $gray-light-2; + + &:last-child { + border: 0; + } + } + + a { + padding: $pad; + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_sections.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_sections.scss new file mode 100755 index 000000000..7235af263 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_sections.scss @@ -0,0 +1,7 @@ +.section { + margin: 0 0 $space; +} + +.section-title { + margin-bottom: $space-half; +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_tabs.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_tabs.scss new file mode 100755 index 000000000..b22ca7438 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_tabs.scss @@ -0,0 +1,33 @@ +.tabs { + overflow: hidden; + + ul { + display: table; + width: 100%; + } + + li { + display: table-cell; + text-align: center; + border-right: 1px solid $gray-light-3; + + &:last-child { + border-right: 0; + } + } + + a { + display: block; + padding: $pad-half; + background: $gray; + + &:hover, &:focus { + background: $gray-light-3; + } + + &.active { + background: $gray-dark; + color: $white; + } + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_text.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_text.scss new file mode 100755 index 000000000..d645f5646 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_text.scss @@ -0,0 +1,41 @@ +//Intro text +.intro { + font-size: $font-size-med-2; + font-weight: bold; +} + +//Pullquote +.pullquote { + font-family: $font-secondary; + font-size: $font-size-large; +} + +//Caption +.caption { + font-style: italic; +} + +//Passages of text +.text { + a { + text-decoration: underline; + } + + ul { + list-style: disc; + margin: 0 0 $space 1.2em; + + ul { + margin-bottom: 0; + } + } + + ol { + list-style: decimal; + margin: 0 0 $space 1.5em; + + ol { + margin-bottom: 0; + } + } +} diff --git a/packages/starterkit-twig-demo/dist/css/scss/objects/_tooltip.scss b/packages/starterkit-twig-demo/dist/css/scss/objects/_tooltip.scss new file mode 100755 index 000000000..e0fdd95da --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/scss/objects/_tooltip.scss @@ -0,0 +1,42 @@ +.tooltip-container { + display: inline-block; + position: relative; + + &:hover { + .tooltip { + display: block; + } + } +} + +.tooltip-link { + background: $gray-light; +} + +.tooltip { + display: none; + position: absolute; + top: 1.5em; + left: 0; + width: 18em; + padding: $pad; + background: $white; + border: 1px solid $gray; + box-shadow: 0.3em 0.3em 1em 0 rgba(0,0,0,0.2); + + h2 { + margin-top: 0; + } + + @media all and (min-width: $bp-small) { + width: 22em; + } + + @media all and (min-width: $bp-small-2) { + width: 27em; + } + + @media all and (min-width: $bp-small-3) { + width: 30em; + } +} \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/css/style.css b/packages/starterkit-twig-demo/dist/css/style.css new file mode 100755 index 000000000..e176c1aae --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/style.css @@ -0,0 +1,1481 @@ +/* + ,, ,, ,, + .M"""bgd mm db `7MM mm mm `7MM OO OO OO +,MI "Y MM MM MM MM MM 88 88 88 +`MMb. mmMMmm ,pW"Wq.`7MMpdMAo. `7Mb,od8 `7MM .P"Ybmmm MMpMMMb.mmMMmm mmMMmm MMpMMMb. .gP"Ya `7Mb,od8 .gP"Ya || || || + `YMMNq. MM 6W' `Wb MM `Wb MM' "' MM :MI I8 MM MM MM MM MM MM ,M' Yb MM' "',M' Yb || || || +. `MM MM 8M M8 MM M8 MM MM WmmmP" MM MM MM MM MM MM 8M"""""" MM 8M"""""" `' `' `' +Mb dM MM YA. ,A9 MM ,AP MM MM 8M MM MM MM MM MM MM YM. , MM YM. , ,, ,, ,, +P"Ybmmd" `Mbmo`Ybmd9' MMbmmd' .JMML. .JMML.YMMMMMb .JMML JMML.`Mbmo `Mbmo.JMML JMML.`Mbmmd'.JMML. `Mbmmd' db db db + MM 6' dP + .JMML. Ybmmmd' + +Pattern Lab doesn't have any CSS requirements, which means you can write your styles however you want. Hooray! +You can use Sass, Less, vanilla CSS, or some other crazy thing I haven't heard of yet. +So please don't use these styles. They're just here to put together the demo, and nothing more. +They're intentionally gray, boring, and crappy because you're supposed to do this stuff yourself. + +Atomic design is philosophically complimentary with these CSS approaches: + +* SMACSS by Jonathan Snook http://smacss.com/ +* OOCSS by Nicole Sullivan http://oocss.org/ +* BEM CSS Methology : http://bem.info/method/ +* CSS Guidelines by Harry Roberts : https://cssguidelin.es/ + +So feel free to use any of these approaches. Or don't. It's totally up to you. + +*/ +/*------------------------------------*\ + $TABLE OF CONTENTS + based generally on Harry Roberts excellent CSS Guidelines https://cssguidelin.es/ +\*------------------------------------*/ +/** + * VARIABLES..............................Declarations of Sass variables + * .....Colors + * .....Typography + * .....Layout + * .....Defaults + * .....Breakpoints + * MIXINS.................................Sass mixins + * RESET..................................Set reset defaults + * GLOBAL CLASSES.........................Set reset defaults + * GLOBAL ELEMENTS........................Establish global styles + * .....Main + * .....Headings + * .....Text-related elements (p, blockquote, lists) + * .....Defaults + * .....Breakpoints + * TYPOGRAPHY------------------------------ + * MEDIA------------------------------ + * LAYOUT------------------------------ + * NAVIGATION------------------------------ + * TOC To Be Continued + */ +/*------------------------------------*\ + $VARIABLES +\*------------------------------------*/ +/*------------------------------------*\ + $MIXINS +\*------------------------------------*/ +/* CSS Transition + Usage: @include transition(width,0.3s,ease-out); + */ +/* Rem Unit font sizes with relative fallback http:/seesparkbox.com/foundry/scss_rem_mixin_now_with_a_better_fallback + Usage: @include font-size(1, large); +*/ +/*------------------------------------*\ + $RESET +\*------------------------------------*/ +/* Border-Box http:/paulirish.com/2012/box-sizing-border-box-ftw/ */ +* { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +html, +body, +div, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +ol, +ul, +li, +form, +legend, +label, +table, +header, +footer, +nav, +section, +figure { + margin: 0; + padding: 0; +} + +header, +footer, +nav, +section, +article, +hgroup, +figure { + display: block; +} + +/*------------------------------------*\ + $GLOBAL ELEMENTS +\*------------------------------------*/ +/*------------------------------------*\ + $GLOBAL CLASSES +\*------------------------------------*/ +/* Clearfix */ +.cf, +.l-two-col, +[role='main'] { + *zoom: 1; +} + +.cf:before, +.l-two-col:before, +[role='main']:before, +.cf:after, +.l-two-col:after, +[role='main']:after { + content: ' '; + /* 1 */ + display: table; + /* 2 */ +} + +.cf:after, +.l-two-col:after, +[role='main']:after { + clear: both; +} + +/* Completely remove from the flow and screen readers. */ +.is-hidden { + display: none !important; + visibility: hidden !important; +} + +/* Completely remove from the flow but leave available to screen readers. */ +.is-vishidden { + position: absolute !important; + overflow: hidden; + width: 1px; + height: 1px; + padding: 0; + border: 0; + clip: rect(1px, 1px, 1px, 1px); +} + +/* Floats */ +.right { + float: right; + padding: 0 0 1em 1em; +} + +.right-search { + float: right; + padding: 0 0 1em 0; +} + +.left { + float: left; + padding: 0 1em 1em 0; +} + +/* Text-Align */ +.align-right { + text-align: right; +} + +.align-center { + text-align: center; +} + +.align-left { + text-align: left; +} + +/* Display Classes */ +@media all and (max-width: 46.8em) { + .hide-small { + display: none; + } +} + +@media all and (min-width: 46.8em) and (max-width: 50em) { + .hide-med { + display: none; + } +} + +@media all and (min-width: 50em) { + .hide-large { + display: none; + } +} + +.valid { + color: #089e00; +} + +.error { + color: red; +} + +.warning { + color: #fff664; +} + +.information { + color: #000db5; +} + +.font-secondary { + font-family: Georgia, Times, 'Times New Roman', serif; +} + +body { + background: white; + font: 100%/1.5 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif; + -webkit-text-size-adjust: 100%; + color: #333333; +} + +/* Links */ +a { + color: #333333; + text-decoration: none; + outline: 0; +} +a:hover, +a:focus { + color: gray; +} + +/* Headings */ +/*Further Reading: http:/csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css/ */ +h1, +.alpha { + line-height: 1.2; +} + +h2, +.beta { + line-height: 1.2; +} + +h3, +.gamma { + line-height: 1.2; +} + +/* Subheadings */ +.subheading { + font-family: Georgia, Times, 'Times New Roman', serif; + font-weight: normal; +} + +/* Text-Related Elements */ +p { + margin-bottom: 1em; +} + +/* Blockquote */ +blockquote { + font-style: italic; + border-left: 1px solid gray; + color: gray; + padding-left: 1em; + margin-bottom: 1em; +} + +/* Horizontal Rule */ +hr { + border: 0; + height: 2px; + background: #eeeeee; + margin: 2em 0; +} + +abbr { + border-bottom: 1px dotted gray; + cursor: help; +} + +ol, +ul { + margin: 0; + padding: 0; + list-style: none; +} + +/* Definition Lists */ +dl { + overflow: hidden; + margin: 0 0 1em; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 0; +} + +/*------------------------------------*\ + $MEDIA ELEMENTS +\*------------------------------------*/ +/* Flexible Media */ +img, +video, +object { + max-width: 100%; + height: auto; +} + +iframe { + margin-bottom: 1em; +} + +figure { + margin-bottom: 1em; +} +figure img { + margin-bottom: 0.5em; +} + +figcaption { + font-style: italic; +} + +/*------------------------------------*\ + $FORMS +\*------------------------------------*/ +form ol, +form ul { + list-style: none; + margin-left: 0; +} + +fieldset { + border: 0; + padding: 0; + margin: 0; +} + +label { + display: block; + padding-bottom: 0.5em; +} + +button, +input, +select, +textarea { + font-family: inherit; + font-size: 100%; + margin: 0 1px 0; +} + +input, +textarea { + width: 100%; + border: 1px solid gray; + padding: 0.5em 0.65rem; +} + +input[type='text'], +input[type='search'], +input[type='url'], +input[type='number'], +textarea { + -webkit-appearance: none; +} + +button, +input[type='submit'] { + padding: 0.5em; + background: #333333; + border: 1px solid gray; + cursor: pointer; +} + +input[type='checkbox'], +input[type='radio'] { + width: auto; + margin-right: 0.3em; +} + +input[type='search'] { + -webkit-appearance: none; + border-radius: 0; +} + +input[type='search']::-webkit-search-cancel-button, +input[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +.field-container { + margin-bottom: 1em; +} + +.inline-form fieldset, +.inline-form .inline-container { + position: relative; +} +.inline-form input[type='submit'], +.inline-form button, +.inline-form .btn { + font-size: 0.875em; + padding: 0.65rem 1.3rem; + background: #333333; + position: absolute; + top: 0; + right: 0; + z-index: 1; + width: auto; +} +.inline-form input[type='submit']:hover, +.inline-form input[type='submit']:focus, +.inline-form button:hover, +.inline-form button:focus, +.inline-form .btn:hover, +.inline-form .btn:focus { + background: gray; + color: white; +} + +/* Validation */ +.has-error { + border-color: red; +} + +.is-valid { + border-color: #089e00; +} + +/*------------------------------------*\ + $SPECIFIC FORMS +\*------------------------------------*/ +/* Search Form */ +.search-field { + padding-right: 3em; +} + +.inline-form .search-submit { + background: none; + padding: 0.78em 1em; + border: 0; + border-left: 1px solid gray; + color: gray; +} + +/*------------------------------------*\ + $Table +\*------------------------------------*/ +table { + border-collapse: collapse; + border-spacing: 0; + border: 1px solid gray; + width: 100%; +} + +th { + text-align: left; + border: 1px solid gray; + padding: 0.2em; +} + +td { + border: 1px solid gray; + padding: 0.2em; +} + +.animate-fade { + -webkit-transition: opacity 0.3s ease-out; + -moz-transition: opacity 0.3s ease-out; + -ms-transition: opacity 0.3s ease-out; + -o-transition: opacity 0.3s ease-out; + transition: opacity 0.3s ease-out; +} +.animate-fade:hover { + opacity: 0; +} + +.animate-move > .demo-shape { + -webkit-transition: all 0.8s ease-in-out; + -moz-transition: all 0.8s ease-in-out; + -ms-transition: all 0.8s ease-in-out; + -o-transition: all 0.8s ease-in-out; + transition: all 0.8s ease-in-out; +} + +/*------------------------------------*\ + $LAYOUT +\*------------------------------------*/ +/*------------------------------------*\ + $LAYOUT +\*------------------------------------*/ +/* Layout Container */ +.lc, +.header, +[role='main'] { + max-width: 72em; + margin: 0 auto; + padding: 0.5em; +} + +/*------------------------------------*\ + $TEMPLATES +\*------------------------------------*/ +/* Two Column Layout */ +@media all and (min-width: 50em) { + .l-two-col .l-main { + float: left; + width: 70%; + padding-right: 1em; + } +} +@media all and (max-width: 50em) { + .l-two-col .l-sidebar { + clear: both; + } +} +@media all and (min-width: 50em) { + .l-two-col .l-sidebar { + float: left; + width: 30%; + padding: 0 0 0 1em; + } +} + +/*------------------------------------*\ + $GRIDS +\*------------------------------------*/ +/* Grid Container */ +.g { + overflow: hidden; + margin: 0 -0.5em; +} + +/* Grid Item */ +.gi { + padding: 0.5em; +} +.gi img { + display: block; +} +@media all and (min-width: 46.8em) { + .gi { + float: left; + } +} + +/* Grid 1up */ +.g-1up .gi { + width: 100%; +} + +/* Grid 2up */ +@media all and (min-width: 46.8em) { + .g-2up > .gi { + float: left; + width: 50%; + } + .g-2up > .gi:nth-of-type(odd) { + clear: left; + } +} + +/* Grid Half (Always displayed side by side) */ +.g-half > .gi { + float: left; + width: 50%; +} +.g-half > .gi:nth-of-type(odd) { + clear: left; +} + +/* Grid 3up */ +@media all and (min-width: 46.8em) { + .g-3up > .gi { + float: left; + width: 50%; + } + .g-3up > .gi:nth-of-type(2n + 1) { + clear: left; + } +} +@media all and (min-width: 50em) { + .g-3up > .gi { + width: 33.3333333%; + } + .g-3up > .gi:nth-of-type(2n + 1) { + clear: none; + } + .g-3up > .gi:nth-of-type(3n + 1) { + clear: left; + } +} + +/* Grid 4up */ +@media all and (min-width: 46.8em) { + .g-4up > .gi { + float: left; + width: 50%; + } + .g-4up > .gi:nth-of-type(2n + 1) { + clear: both; + } +} +@media all and (min-width: 50em) { + .g-4up > .gi { + width: 25%; + } + .g-4up > .gi:nth-of-type(2n + 1) { + clear: none; + } + .g-4up > .gi:nth-of-type(4n + 1) { + clear: left; + } +} + +/* Grid Quarter (Always displayed side by side) */ +.g-quarter > .gi { + float: left; + width: 24%; +} +.g-quarter > .gi:nth-of-type(4n + 1) { + clear: left; +} + +@media all and (min-width: 29.75em) { + .g-max4 > .gi { + float: left; + width: 50%; + } + .g-max4 > .gi:nth-of-type(2n + 1) { + clear: both; + } +} +@media all and (min-width: 39.8em) { + .g-max4 > .gi { + width: 33.3333333%; + } + .g-max4 > .gi:nth-of-type(2n + 1) { + clear: none; + } + .g-max4 > .gi:nth-of-type(3n + 1) { + clear: left; + } +} +@media all and (min-width: 50em) { + .g-max4 > .gi { + width: 25%; + } + .g-max4 > .gi:nth-of-type(3n + 1) { + clear: none; + } + .g-max4 > .gi:nth-of-type(4n + 1) { + clear: left; + } +} + +/* Grid 5up */ +.g-max5 > .gi { + float: left; + width: 50%; +} +.g-max5 > .gi:nth-of-type(2n + 1) { + clear: both; +} +@media all and (min-width: 39.8em) { + .g-max5 > .gi { + width: 33.3333333%; + } + .g-max5 > .gi:nth-of-type(2n + 1) { + clear: none; + } + .g-max5 > .gi:nth-of-type(3n + 1) { + clear: left; + } +} +@media all and (min-width: 46.8em) { + .g-max5 > .gi { + width: 25%; + } + .g-max5 > .gi:nth-of-type(3n + 1) { + clear: none; + } + .g-max5 > .gi:nth-of-type(4n + 1) { + clear: left; + } +} +@media all and (min-width: 48em) { + .g-max5 > .gi { + width: 20%; + } + .g-max5 > .gi:nth-of-type(4n + 1) { + clear: none; + } + .g-max5 > .gi:nth-of-type(5n + 1) { + clear: left; + } +} + +/* Grid 2/3 */ +@media all and (min-width: 46.8em) { + .gi-2-3 { + float: left; + width: 66.666666%; + } +} + +@media all and (min-width: 46.8em) { + .gi-1-3 { + float: left; + width: 33.333333%; + } +} + +/* Grid 4up block */ +.g-opposites .gi { + float: left; +} +.g-opposites .gi:last-child { + float: right; + text-align: right; +} + +/*------------------------------------*\ + $PAGE STRUCTURE +\*------------------------------------*/ +.header { + background: white; + padding: 0; + border-bottom: 1px solid #dbdbdb; +} + +.logo { + float: left; + max-width: 8rem; + margin: 0.4rem; +} +@media all and (min-width: 46.8em) { + .logo { + max-width: 9rem; + } +} + +.nav-toggle { + float: right; + display: block; + padding: 0.9rem 1rem 0.7rem; + font-size: 1.3rem; + line-height: 1; + border-left: 1px solid #dbdbdb; +} +@media all and (min-width: 46.8em) { + .nav-toggle { + display: none; + } +} +@media all and (max-width: 17em) { + .nav-toggle { + padding-left: 0.2rem; + padding-right: 0.2rem; + } +} + +.search-form { + overflow: hidden; + max-height: 0; +} +@media all and (min-width: 46.8em) { + .search-form { + float: right; + max-height: none; + margin: 0.65em 0.5em 0 0; + } +} + +/*------------------------------------*\ + $NAVIGATION +\*------------------------------------*/ +.nav { + clear: both; + overflow: hidden; + max-height: 0; +} +.nav a { + display: block; + padding: 1em; + border-top: 1px solid #eeeeee; +} +.nav.active { + max-height: 40em; +} +@media all and (min-width: 46.8em) { + .nav { + max-height: none; + float: right; + clear: none; + } + .nav li { + float: left; + } + .nav a { + border: 0; + } +} + +.pagination { + overflow: hidden; +} +.pagination li { + float: left; + border-right: 1px solid #eeeeee; +} +.pagination li:last-child { + border: 0; +} +.pagination a { + padding: 1em; +} + +/*------------------------------------*\ + $MAIN CONTENT AREA +\*------------------------------------*/ +[role='main'] { + padding: 0.5em 0.5em 2em; + overflow: hidden; +} + +/*------------------------------------*\ + $FOOTER +\*------------------------------------*/ +.footer { + clear: both; + overflow: hidden; + background: #131313; + color: white; + line-height: 1.2; +} +.footer a { + color: #f9f9f9; +} + +.nav-footer { + margin: -1em -1em 1em; +} +.nav-footer li { + border-bottom: 1px solid #333333; +} +@media all and (min-width: 46.8em) { + .nav-footer li { + border: 0; + float: left; + } +} +.nav-footer a { + display: block; + padding: 1em; +} + +@media all and (min-width: 46.8em) { + .copyright { + float: right; + } +} + +/*------------------------------------*\ + $TEXT Styles +\*------------------------------------*/ +.intro { + font-size: 1.0625em; + font-weight: bold; +} + +.pullquote { + font-family: Georgia, Times, 'Times New Roman', serif; + font-size: 1.4375em; +} + +.caption { + font-style: italic; +} + +.text a { + text-decoration: underline; +} +.text ul { + list-style: disc; + margin: 0 0 1em 1.2em; +} +.text ul ul { + margin-bottom: 0; +} +.text ol { + list-style: decimal; + margin: 0 0 1em 1.5em; +} +.text ol ol { + margin-bottom: 0; +} + +/*------------------------------------*\ + $COMPONENTS +\*------------------------------------*/ +/* Icon Font */ +@font-face { + font-family: 'icons'; + src: url('../fonts/icons.eot'); + src: url('../fonts/icons.eot?#iefix') format('embedded-opentype'), + url('../fonts/icons.woff') format('woff'), + url('../fonts/icons.ttf') format('truetype'), + url('../fonts/icons.svg#icons') format('svg'); + font-weight: normal; + font-style: normal; +} + +/* Use the following CSS code if you want to use data attributes for inserting your icons */ +[data-icon]:before { + font-family: 'icons'; + content: attr(data-icon); + speak: none; + font-weight: normal; + line-height: 1; + -webkit-font-smoothing: antialiased; +} + +.icon-twitter:before, +.icon-stumbleupon:before, +.icon-pinterest:before, +.icon-linkedin:before, +.icon-google-plus:before, +.icon-search:before, +.icon-play:before, +.icon-menu:before, +.icon-arrow-left:before, +.icon-arrow-right:before, +.icon-bubble:before, +.icon-facebook:before, +.icon-feed:before, +.icon-youtube:before, +.icon-tag:before, +.icon-tumblr:before, +.icon-instagram, +.icon-podcast, +.icon-apple, +.icon-android, +.icon-arrow:after, +.icon-envelope:before { + font-family: 'icons'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + -webkit-font-smoothing: antialiased; +} + +.icon-twitter:before { + content: '\74'; +} + +.icon-stumbleupon:before { + content: '\75'; +} + +.icon-pinterest:before { + content: '\70'; +} + +.icon-linkedin:before { + content: '\69'; +} + +.icon-google-plus:before { + content: '\67'; +} + +.icon-search:before { + content: '\73'; +} + +.icon-play:before { + content: '\61'; +} + +.icon-menu:before { + content: '\21'; +} + +.icon-arrow-left:before { + content: '\23'; +} + +.icon-arrow-right:before { + content: '\24'; +} + +.icon-bubble:before { + content: '\25'; +} + +.icon-facebook:before { + content: '\66'; +} + +.icon-feed:before { + content: '\27'; +} + +.icon-youtube:before { + content: '\79'; +} + +.icon-tag:before { + content: '\28'; +} + +.icon-tumblr:before { + content: '\6d'; +} + +.icon-instagram:before { + content: '\22'; +} + +.icon-podcast:before { + content: '\26'; +} + +.icon-android:before { + content: '\29'; +} + +.icon-apple:before { + content: '\2a'; +} + +.icon-envelope:before { + content: '\2b'; +} + +.icon-arrow:after { + content: '\61'; + display: inline-block; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + transform: rotate(90deg); +} + +.icon-play:before { + font-size: 0.7rem; + padding-left: 0.2em; +} + +.icon-play-box { + display: block; + margin-left: 2em; +} + +.icon-play-box:before { + padding: 0.25em; + background: gray; + color: white; + margin-left: -1.7rem; + margin-right: 0.5em; +} + +/*------------------------------------*\ + $BUTTONS +\*------------------------------------*/ +.btn { + display: inline-block; + background: #333333; + color: white; + line-height: 1; + font-weight: bold; + padding: 1em; + border: 0; + text-align: center; +} +.btn:hover, +.btn:focus { + background: gray; + color: white; +} +.btn.disabled { + background: #eeeeee; + color: gray; +} + +.btn-small { + padding: 0.5em; +} + +.btn-large { + padding: 0.5em; + text-transform: uppercase; + background: gray; + font-size: 1.4rem; + font-weight: normal; +} + +.text-btn { + font-style: italic; +} + +/* Generic Placeholder Brick: REMOVE FOR PRODUCTION */ +.brick { + background: #dcdddc; + padding: 2em; + text-align: center; + font-weight: bold; + border-bottom: 1px solid #eeeeee; +} + +/* Block */ +.block { + overflow: hidden; +} +.block p:last-child { + margin-bottom: 0; +} + +.headline { + line-height: 1.2; +} + +/* Hero Block */ +.block-hero { + margin-bottom: 0.5em; +} +.block-hero .b-thumb img { + display: block; +} +@media all and (min-width: 50em) { + .block-hero { + position: relative; + } + .block-hero .b-text { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + background: rgba(0, 0, 0, 0.5); + color: white; + padding: 1.5em; + } +} + +/* Block Thumbnail with Headline */ +.block-thumb { + display: table; + width: 100%; + border-collapse: collapse; +} +.block-thumb .b-inner { + display: table-row; + vertical-align: top; + overflow: hidden; +} +@media all and (min-width: 29.75em) { + .block-thumb .b-thumb { + display: table-cell; + vertical-align: top; + width: 30%; + max-width: 10em; + } + .block-thumb .b-thumb img { + display: block; + width: 100%; + height: auto; + } +} +@media all and (min-width: 29.75em) { + .block-thumb .b-text { + display: table-cell; + width: 70%; + padding: 0 1em; + } +} + +/* Block Headline Summary */ +.block-headline-summary a { + display: block; + padding: 0.5em; +} + +/* Block Inset */ +.block-inset { + position: relative; +} +.block-inset .b-thumb { + position: relative; + z-index: 0; +} +.block-inset .b-thumb img { + display: block; +} + +/* Hero Block */ +.block-inset { + margin-bottom: 0.5em; + position: relative; +} +.block-inset .headline { + font-size: 1.1em; +} +.block-inset .b-text { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + background: rgba(0, 0, 0, 0.5); + color: white; + padding: 0.5em; +} + +/* Block Thumb with Summary */ +.block-thumb-summary .b-thumb { + float: left; + width: 50%; +} +.block-thumb-summary .b-text { + margin-left: 50%; + padding: 0.5em; +} + +.inline-list li { + display: inline-block; +} + +/* Social List */ +.social-list li { + margin: 0 0.4rem 1em 0; +} +.social-list a { + font-size: 1.6em; +} + +/* Headline List */ +.headline-list { + margin-bottom: 1em; +} +.headline-list.flush { + margin: 0; +} +.headline-list h4 { + font-weight: normal; +} +.headline-list li { + padding: 0.25em 0; + border-top: 1px solid #dddddd; +} + +/* Post List */ +.post-list li { + margin-bottom: 1em; +} + +/* Bullet List */ +.bullet-list { + list-style: square; + margin: 0 0 1em 1.2em; + line-height: 1.3; +} +.bullet-list li { + margin-bottom: 1em; +} + +/* Text List */ +.text-list { + margin: 0 0 1em; + line-height: 1.3; +} +.text-list li { + margin-bottom: 1em; +} + +.tooltip-container { + display: inline-block; + position: relative; +} +.tooltip-container:hover .tooltip { + display: block; +} + +.tooltip-link { + background: #f9f9f9; +} + +.tooltip { + display: none; + position: absolute; + top: 1.5em; + left: 0; + width: 18em; + padding: 1em; + background: white; + border: 1px solid gray; + box-shadow: 0.3em 0.3em 1em 0 rgba(0, 0, 0, 0.2); +} +.tooltip h2 { + margin-top: 0; +} +@media all and (min-width: 24em) { + .tooltip { + width: 22em; + } +} +@media all and (min-width: 29.75em) { + .tooltip { + width: 27em; + } +} +@media all and (min-width: 39.8em) { + .tooltip { + width: 30em; + } +} + +.accordion { + margin-bottom: 1em; +} + +.acc-handle { + background: #131313; + color: white; + font-family: Georgia, Times, 'Times New Roman', serif; + font-weight: bold; + display: block; + position: relative; + padding: 0.5em; + border-bottom: 1px solid #dddddd; +} +.acc-handle:after { + content: '+'; + float: right; +} +.acc-handle:hover { + color: white; + background: #333333; +} +.acc-handle.active { + background: #333333; +} +.acc-handle.active:after { + content: '-'; +} + +.tabs { + overflow: hidden; +} +.tabs ul { + display: table; + width: 100%; +} +.tabs li { + display: table-cell; + text-align: center; + border-right: 1px solid #dddddd; +} +.tabs li:last-child { + border-right: 0; +} +.tabs a { + display: block; + padding: 0.5em; + background: gray; +} +.tabs a:hover, +.tabs a:focus { + background: #dddddd; +} +.tabs a.active { + background: #333333; + color: white; +} + +.section { + margin: 0 0 1em; +} + +.section-title { + margin-bottom: 0.5em; +} + +.article-header h1 { + font-size: 2.5em; +} + +.byline { + font-size: 0.875em; + font-style: italic; + margin-bottom: 0.5em; +} + +.social-share { + overflow: hidden; + margin-bottom: 1em; +} +.social-share li { + float: left; + margin-right: 0.5em; +} +.social-share a { + background: #333333; + color: white; + display: block; + padding: 0.5em; +} +.social-share a:hover { + background: gray; +} + +.comments li { + margin-bottom: 1em; +} + +.comment-container { + overflow: hidden; + margin-bottom: 1em; + list-style: none; +} + +.comment-meta { + float: left; + width: 6.5em; +} +.comment-meta img { + display: block; + border: 1px solid #eeeeee; + margin-bottom: 0.5em; +} + +.comment-name { + font-size: 0.75em; +} + +.comment-text { + margin-left: 9em; +} + +/*------------------------------------*\ + $MESSAGING +\*------------------------------------*/ +.alert { + text-align: center; + padding: 1em; + margin-bottom: 0.5em; + border: 1px solid gray; + background: #f9f9f9; +} + +.alert-error { + color: red; + border-color: red; + background: #ffbebe; +} diff --git a/packages/starterkit-twig-demo/dist/css/style.scss b/packages/starterkit-twig-demo/dist/css/style.scss new file mode 100755 index 000000000..b749f20f7 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/css/style.scss @@ -0,0 +1,121 @@ +/* + ,, ,, ,, + .M"""bgd mm db `7MM mm mm `7MM OO OO OO +,MI "Y MM MM MM MM MM 88 88 88 +`MMb. mmMMmm ,pW"Wq.`7MMpdMAo. `7Mb,od8 `7MM .P"Ybmmm MMpMMMb.mmMMmm mmMMmm MMpMMMb. .gP"Ya `7Mb,od8 .gP"Ya || || || + `YMMNq. MM 6W' `Wb MM `Wb MM' "' MM :MI I8 MM MM MM MM MM MM ,M' Yb MM' "',M' Yb || || || +. `MM MM 8M M8 MM M8 MM MM WmmmP" MM MM MM MM MM MM 8M"""""" MM 8M"""""" `' `' `' +Mb dM MM YA. ,A9 MM ,AP MM MM 8M MM MM MM MM MM MM YM. , MM YM. , ,, ,, ,, +P"Ybmmd" `Mbmo`Ybmd9' MMbmmd' .JMML. .JMML.YMMMMMb .JMML JMML.`Mbmo `Mbmo.JMML JMML.`Mbmmd'.JMML. `Mbmmd' db db db + MM 6' dP + .JMML. Ybmmmd' + +Pattern Lab doesn't have any CSS requirements, which means you can write your styles however you want. Hooray! +You can use Sass, Less, vanilla CSS, or some other crazy thing I haven't heard of yet. +So please don't use these styles. They're just here to put together the demo, and nothing more. +They're intentionally gray, boring, and crappy because you're supposed to do this stuff yourself. + +Atomic design is philosophically complimentary with these CSS approaches: + +* SMACSS by Jonathan Snook http://smacss.com/ +* OOCSS by Nicole Sullivan http://oocss.org/ +* BEM CSS Methology : http://bem.info/method/ +* CSS Guidelines by Harry Roberts : https://github.com/csswizardry/CSS-Guidelines + +So feel free to use any of these approaches. Or don't. It's totally up to you. + +*/ + +/*------------------------------------*\ + $TABLE OF CONTENTS + based generally on Harry Roberts excellent CSS Guidelines https://github.com/csswizardry/CSS-Guidelines +\*------------------------------------*/ +/** + * VARIABLES..............................Declarations of Sass variables + * .....Colors + * .....Typography + * .....Layout + * .....Defaults + * .....Breakpoints + * MIXINS.................................Sass mixins + * RESET..................................Set reset defaults + * GLOBAL CLASSES.........................Set reset defaults + * GLOBAL ELEMENTS........................Establish global styles + * .....Main + * .....Headings + * .....Text-related elements (p, blockquote, lists) + * .....Defaults + * .....Breakpoints + * TYPOGRAPHY------------------------------ + * MEDIA------------------------------ + * LAYOUT------------------------------ + * NAVIGATION------------------------------ + * TOC To Be Continued + */ + + + +@import "scss/generic/variables"; +@import "scss/generic/mixins"; +@import "scss/generic/reset"; + + + + + +/*------------------------------------*\ + $GLOBAL ELEMENTS +\*------------------------------------*/ +@import "scss/base/global-classes"; +@import "scss/base/main"; +@import "scss/base/links"; +@import "scss/base/headings"; +@import "scss/base/text"; +@import "scss/base/lists"; +@import "scss/base/media"; +@import "scss/base/forms"; +@import "scss/base/tables"; +@import "scss/base/animation"; + + + + + +/*------------------------------------*\ + $LAYOUT +\*------------------------------------*/ +@import "scss/objects/layout"; + + +/*------------------------------------*\ + $PAGE STRUCTURE +\*------------------------------------*/ +@import "scss/objects/header"; +@import "scss/objects/nav"; +@import "scss/objects/main"; +@import "scss/objects/footer"; + + + +/*------------------------------------*\ + $TEXT Styles +\*------------------------------------*/ +@import "scss/objects/text"; + + +/*------------------------------------*\ + $COMPONENTS +\*------------------------------------*/ +@import "scss/objects/icons"; +@import "scss/objects/buttons"; +@import "scss/objects/blocks"; +@import "scss/objects/lists"; +@import "scss/objects/tooltip"; +@import "scss/objects/accordion"; +@import "scss/objects/tabs"; +@import "scss/objects/sections"; +@import "scss/objects/article"; +@import "scss/objects/comments"; +@import "scss/objects/messaging"; + + diff --git a/packages/starterkit-twig-demo/dist/favicon.ico b/packages/starterkit-twig-demo/dist/favicon.ico new file mode 100755 index 000000000..eee4aa78f Binary files /dev/null and b/packages/starterkit-twig-demo/dist/favicon.ico differ diff --git a/packages/starterkit-twig-demo/dist/fonts/icons.dev.svg b/packages/starterkit-twig-demo/dist/fonts/icons.dev.svg new file mode 100755 index 000000000..ca8e49e3a --- /dev/null +++ b/packages/starterkit-twig-demo/dist/fonts/icons.dev.svg @@ -0,0 +1,103 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/fonts/icons.eot b/packages/starterkit-twig-demo/dist/fonts/icons.eot new file mode 100755 index 000000000..81a314b08 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/fonts/icons.eot differ diff --git a/packages/starterkit-twig-demo/dist/fonts/icons.svg b/packages/starterkit-twig-demo/dist/fonts/icons.svg new file mode 100755 index 000000000..3c64026b6 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/fonts/icons.svg @@ -0,0 +1,103 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/starterkit-twig-demo/dist/fonts/icons.ttf b/packages/starterkit-twig-demo/dist/fonts/icons.ttf new file mode 100755 index 000000000..e6bff0814 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/fonts/icons.ttf differ diff --git a/packages/starterkit-twig-demo/dist/fonts/icons.woff b/packages/starterkit-twig-demo/dist/fonts/icons.woff new file mode 100755 index 000000000..10e663234 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/fonts/icons.woff differ diff --git a/packages/starterkit-twig-demo/dist/images/ajax-loader.gif b/packages/starterkit-twig-demo/dist/images/ajax-loader.gif new file mode 100755 index 000000000..f2a1bc0c6 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/ajax-loader.gif differ diff --git a/packages/starterkit-twig-demo/dist/images/favicon_16x16.jpg b/packages/starterkit-twig-demo/dist/images/favicon_16x16.jpg new file mode 100755 index 000000000..05e744965 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/favicon_16x16.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/favicon_32x32.jpg b/packages/starterkit-twig-demo/dist/images/favicon_32x32.jpg new file mode 100755 index 000000000..0970980b7 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/favicon_32x32.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/fpo_16x9.png b/packages/starterkit-twig-demo/dist/images/fpo_16x9.png new file mode 100755 index 000000000..013949dcc Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/fpo_16x9.png differ diff --git a/packages/starterkit-twig-demo/dist/images/fpo_4x3.png b/packages/starterkit-twig-demo/dist/images/fpo_4x3.png new file mode 100755 index 000000000..7ff84b81b Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/fpo_4x3.png differ diff --git a/packages/starterkit-twig-demo/dist/images/fpo_avatar.png b/packages/starterkit-twig-demo/dist/images/fpo_avatar.png new file mode 100755 index 000000000..e666a40ed Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/fpo_avatar.png differ diff --git a/packages/starterkit-twig-demo/dist/images/fpo_square.png b/packages/starterkit-twig-demo/dist/images/fpo_square.png new file mode 100755 index 000000000..ce8a1e4e6 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/fpo_square.png differ diff --git a/packages/starterkit-twig-demo/dist/images/logo.png b/packages/starterkit-twig-demo/dist/images/logo.png new file mode 100755 index 000000000..93db733d2 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/logo.png differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/landscape-16x9-mountains.jpg b/packages/starterkit-twig-demo/dist/images/sample/landscape-16x9-mountains.jpg new file mode 100755 index 000000000..3c0d92b29 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/landscape-16x9-mountains.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/thumb-square-fire.jpg b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-fire.jpg new file mode 100755 index 000000000..20a5c5ed6 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-fire.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/thumb-square-gear.jpg b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-gear.jpg new file mode 100755 index 000000000..052a52a17 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-gear.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/thumb-square-ivy.jpg b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-ivy.jpg new file mode 100755 index 000000000..64183a7a3 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-ivy.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/thumb-square-river.jpg b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-river.jpg new file mode 100755 index 000000000..f19018689 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-river.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/thumb-square-yosemite.jpg b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-yosemite.jpg new file mode 100755 index 000000000..8f388d798 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/thumb-square-yosemite.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-climber.jpg b/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-climber.jpg new file mode 100755 index 000000000..1348cd7e7 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-climber.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-climbers.jpg b/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-climbers.jpg new file mode 100755 index 000000000..d8461a191 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-climbers.jpg differ diff --git a/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-stream.jpg b/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-stream.jpg new file mode 100755 index 000000000..8e091d1d0 Binary files /dev/null and b/packages/starterkit-twig-demo/dist/images/sample/tout-4x3-stream.jpg differ diff --git a/packages/starterkit-twig-demo/dist/js/fitvids.js b/packages/starterkit-twig-demo/dist/js/fitvids.js new file mode 100755 index 000000000..d3fa97f50 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/js/fitvids.js @@ -0,0 +1,91 @@ +/*global jQuery */ +/*! +* FitVids 1.0 +* +* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com +* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ +* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ +* +* Date: Thu Sept 01 18:00:00 2011 -0500 +*/ + +(function($) { + $.fn.fitVids = function(options) { + var settings = { + customSelector: null, + }; + + var div = document.createElement('div'), + ref = + document.getElementsByTagName('base')[0] || + document.getElementsByTagName('script')[0]; + + div.className = 'fit-vids-style'; + div.innerHTML = + '­'; + + ref.parentNode.insertBefore(div, ref); + + if (options) { + $.extend(settings, options); + } + + return this.each(function() { + var selectors = [ + "iframe[src*='player.vimeo.com']", + "iframe[src*='www.youtube.com']", + "iframe[src*='www.kickstarter.com']", + 'object', + 'embed', + ]; + + if (settings.customSelector) { + selectors.push(settings.customSelector); + } + + var $allVideos = $(this).find(selectors.join(',')); + + $allVideos.each(function() { + var $this = $(this); + if ( + (this.tagName.toLowerCase() == 'embed' && + $this.parent('object').length) || + $this.parent('.fluid-width-video-wrapper').length + ) { + return; + } + var height = + this.tagName.toLowerCase() == 'object' || $this.attr('height') + ? $this.attr('height') + : $this.height(), + width = $this.attr('width') ? $this.attr('width') : $this.width(), + aspectRatio = height / width; + if (!$this.attr('id')) { + var videoID = 'fitvid' + Math.floor(Math.random() * 999999); + $this.attr('id', videoID); + } + $this + .wrap('
    ') + .parent('.fluid-width-video-wrapper') + .css('padding-top', aspectRatio * 100 + '%'); + $this.removeAttr('height').removeAttr('width'); + }); + }); + }; +})(jQuery); diff --git a/packages/starterkit-twig-demo/dist/js/init.js b/packages/starterkit-twig-demo/dist/js/init.js new file mode 100755 index 000000000..723a99732 --- /dev/null +++ b/packages/starterkit-twig-demo/dist/js/init.js @@ -0,0 +1,26 @@ +(function(w) { + var sw = document.body.clientWidth, + sh = document.body.clientHeight; + + $(w).resize(function() { + //Update dimensions on resize + sw = document.body.clientWidth; + sh = document.body.clientHeight; + + //updateAds(); + }); + + //Navigation toggle + $('.nav-toggle-menu').click(function(e) { + e.preventDefault(); + $(this).toggleClass('active'); + $('.nav').toggleClass('active'); + }); + + //Navigation toggle + $('.nav-toggle-search').click(function(e) { + e.preventDefault(); + $(this).toggleClass('active'); + $('.header .search-form').toggleClass('active'); + }); +})(this); diff --git a/packages/starterkit-twig-demo/dist/js/jquery-2.0.0b2.js b/packages/starterkit-twig-demo/dist/js/jquery-2.0.0b2.js new file mode 100755 index 000000000..c518c3bdc --- /dev/null +++ b/packages/starterkit-twig-demo/dist/js/jquery-2.0.0b2.js @@ -0,0 +1,9462 @@ +/*! + * jQuery JavaScript Library v2.0.0b2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-3-1 + */ +(function(window, undefined) { + // Can't do this because several apps including ASP.NET trace + // the stack via arguments.caller.callee and Firefox dies if + // you try to trace through "use strict" call chains. (#13335) + // Support: Firefox 18+ + //"use strict"; + var // A central reference to the root jQuery(document) + rootjQuery, + // The deferred used on DOM ready + readyList, + // Support: IE9 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + // [[Class]] -> type pairs + class2type = {}, + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + core_version = '2.0.0b2', + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + // Define a local copy of jQuery + jQuery = function(selector, context) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init(selector, context, rootjQuery); + }, + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function(all, letter) { + return letter.toUpperCase(); + }, + // The ready event handler and self cleanup method + completed = function() { + document.removeEventListener('DOMContentLoaded', completed, false); + window.removeEventListener('load', completed, false); + jQuery.ready(); + }; + + jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function(selector, context, rootjQuery) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if (!selector) { + return this; + } + + // Handle HTML strings + if (typeof selector === 'string') { + if ( + selector.charAt(0) === '<' && + selector.charAt(selector.length - 1) === '>' && + selector.length >= 3 + ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [null, selector, null]; + } else { + match = rquickExpr.exec(selector); + } + + // Match html or make sure no context is specified for #id + if (match && (match[1] || !context)) { + // HANDLE: $(html) -> $(array) + if (match[1]) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( + this, + jQuery.parseHTML( + match[1], + context && context.nodeType + ? context.ownerDocument || context + : document, + true + ) + ); + + // HANDLE: $(html, props) + if (rsingleTag.test(match[1]) && jQuery.isPlainObject(context)) { + for (match in context) { + // Properties of context are called as methods if possible + if (jQuery.isFunction(this[match])) { + this[match](context[match]); + + // ...and otherwise set as attributes + } else { + this.attr(match, context[match]); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById(match[2]); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if (elem && elem.parentNode) { + // Handle the case where IE and Opera return items + // by name instead of ID + if (elem.id !== match[2]) { + return rootjQuery.find(selector); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if (!context || context.jquery) { + return (context || rootjQuery).find(selector); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor(context).find(selector); + } + + // HANDLE: $(DOMElement) + } else if (selector.nodeType) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if (jQuery.isFunction(selector)) { + return rootjQuery.ready(selector); + } + + if (selector.selector !== undefined) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray(selector, this); + }, + + // Start with an empty selector + selector: '', + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return core_slice.call(this); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function(num) { + return num == null + ? // Return a 'clean' array + this.toArray() + : // Return just the object + num < 0 ? this[this.length + num] : this[num]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function(elems) { + // Build a new jQuery matched element set + var ret = jQuery.merge(this.constructor(), elems); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function(callback, args) { + return jQuery.each(this, callback, args); + }, + + ready: function(fn) { + // Add the callback + jQuery.ready.promise().done(fn); + + return this; + }, + + slice: function() { + return this.pushStack(core_slice.apply(this, arguments)); + }, + + first: function() { + return this.eq(0); + }, + + last: function() { + return this.eq(-1); + }, + + eq: function(i) { + var len = this.length, + j = +i + (i < 0 ? len : 0); + return this.pushStack(j >= 0 && j < len ? [this[j]] : []); + }, + + map: function(callback) { + return this.pushStack( + jQuery.map(this, function(elem, i) { + return callback.call(elem, i, elem); + }) + ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice, + }; + + // Give the init function the jQuery prototype for later instantiation + jQuery.fn.init.prototype = jQuery.fn; + + jQuery.extend = jQuery.fn.extend = function() { + var options, + name, + src, + copy, + copyIsArray, + clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if (typeof target !== 'object' && !jQuery.isFunction(target)) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if (length === i) { + target = this; + --i; + } + + for (; i < length; i++) { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) { + // Extend the base object + for (name in options) { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( + deep && + copy && + (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy))) + ) { + if (copyIsArray) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = jQuery.extend(deep, clone, copy); + + // Don't bring in undefined values + } else if (copy !== undefined) { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; + }; + + jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: 'jQuery' + (core_version + Math.random()).replace(/\D/g, ''), + + noConflict: function(deep) { + if (window.$ === jQuery) { + window.$ = _$; + } + + if (deep && window.jQuery === jQuery) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function(hold) { + if (hold) { + jQuery.readyWait++; + } else { + jQuery.ready(true); + } + }, + + // Handle when the DOM is ready + ready: function(wait) { + // Abort if there are pending holds or we're already ready + if (wait === true ? --jQuery.readyWait : jQuery.isReady) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if (wait !== true && --jQuery.readyWait > 0) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith(document, [jQuery]); + + // Trigger any bound ready events + if (jQuery.fn.trigger) { + jQuery(document) + .trigger('ready') + .off('ready'); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function(obj) { + return jQuery.type(obj) === 'function'; + }, + + isArray: Array.isArray, + + isWindow: function(obj) { + return obj != null && obj == obj.window; + }, + + isNumeric: function(obj) { + return !isNaN(parseFloat(obj)) && isFinite(obj); + }, + + type: function(obj) { + if (obj == null) { + return String(obj); + } + // Support: Safari <=5.1 (functionish RegExp) + return typeof obj === 'object' || typeof obj === 'function' + ? class2type[core_toString.call(obj)] || 'object' + : typeof obj; + }, + + isPlainObject: function(obj) { + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if ( + jQuery.type(obj) !== 'object' || + obj.nodeType || + jQuery.isWindow(obj) + ) { + return false; + } + + // Support: Firefox >16 + // The try/catch suppresses exceptions thrown when attempting to access + // the "constructor" property of certain host objects, ie. |window.location| + try { + if ( + obj.constructor && + !core_hasOwn.call(obj.constructor.prototype, 'isPrototypeOf') + ) { + return false; + } + } catch (e) { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, + + isEmptyObject: function(obj) { + var name; + for (name in obj) { + return false; + } + return true; + }, + + error: function(msg) { + throw new Error(msg); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function(data, context, keepScripts) { + if (!data || typeof data !== 'string') { + return null; + } + if (typeof context === 'boolean') { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec(data), + scripts = !keepScripts && []; + + // Single tag + if (parsed) { + return [context.createElement(parsed[1])]; + } + + parsed = jQuery.buildFragment([data], context, scripts); + + if (scripts) { + jQuery(scripts).remove(); + } + + return jQuery.merge([], parsed.childNodes); + }, + + parseJSON: JSON.parse, + + // Cross-browser xml parsing + parseXML: function(data) { + var xml, tmp; + if (!data || typeof data !== 'string') { + return null; + } + + // Support: IE9 + try { + tmp = new DOMParser(); + xml = tmp.parseFromString(data, 'text/xml'); + } catch (e) { + xml = undefined; + } + + if (!xml || xml.getElementsByTagName('parsererror').length) { + jQuery.error('Invalid XML: ' + data); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + globalEval: function(data) { + var indirect = eval; + if (jQuery.trim(data)) { + indirect(data + ';'); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function(string) { + return string.replace(rmsPrefix, 'ms-').replace(rdashAlpha, fcamelCase); + }, + + nodeName: function(elem, name) { + return ( + elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase() + ); + }, + + // args is for internal usage only + each: function(obj, callback, args) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike(obj); + + if (args) { + if (isArray) { + for (; i < length; i++) { + value = callback.apply(obj[i], args); + + if (value === false) { + break; + } + } + } else { + for (i in obj) { + value = callback.apply(obj[i], args); + + if (value === false) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if (isArray) { + for (; i < length; i++) { + value = callback.call(obj[i], i, obj[i]); + + if (value === false) { + break; + } + } + } else { + for (i in obj) { + value = callback.call(obj[i], i, obj[i]); + + if (value === false) { + break; + } + } + } + } + + return obj; + }, + + trim: function(text) { + return text == null ? '' : core_trim.call(text); + }, + + // results is for internal usage only + makeArray: function(arr, results) { + var ret = results || []; + + if (arr != null) { + if (isArraylike(Object(arr))) { + jQuery.merge(ret, typeof arr === 'string' ? [arr] : arr); + } else { + core_push.call(ret, arr); + } + } + + return ret; + }, + + inArray: function(elem, arr, i) { + return arr == null ? -1 : core_indexOf.call(arr, elem, i); + }, + + merge: function(first, second) { + var l = second.length, + i = first.length, + j = 0; + + if (typeof l === 'number') { + for (; j < l; j++) { + first[i++] = second[j]; + } + } else { + while (second[j] !== undefined) { + first[i++] = second[j++]; + } + } + + first.length = i; + + return first; + }, + + grep: function(elems, callback, inv) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for (; i < length; i++) { + retVal = !!callback(elems[i], i); + if (inv !== retVal) { + ret.push(elems[i]); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function(elems, callback, arg) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike(elems), + ret = []; + + // Go through the array, translating each of the items to their + if (isArray) { + for (; i < length; i++) { + value = callback(elems[i], i, arg); + + if (value != null) { + ret[ret.length] = value; + } + } + + // Go through every key on the object, + } else { + for (i in elems) { + value = callback(elems[i], i, arg); + + if (value != null) { + ret[ret.length] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply([], ret); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function(fn, context) { + var tmp, args, proxy; + + if (typeof context === 'string') { + tmp = fn[context]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if (!jQuery.isFunction(fn)) { + return undefined; + } + + // Simulated bind + args = core_slice.call(arguments, 2); + proxy = function() { + return fn.apply( + context || this, + args.concat(core_slice.call(arguments)) + ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function(elems, fn, key, value, chainable, emptyGet, raw) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if (jQuery.type(key) === 'object') { + chainable = true; + for (i in key) { + jQuery.access(elems, fn, i, key[i], true, emptyGet, raw); + } + + // Sets one value + } else if (value !== undefined) { + chainable = true; + + if (!jQuery.isFunction(value)) { + raw = true; + } + + if (bulk) { + // Bulk operations run against the entire set + if (raw) { + fn.call(elems, value); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function(elem, key, value) { + return bulk.call(jQuery(elem), value); + }; + } + } + + if (fn) { + for (; i < length; i++) { + fn( + elems[i], + key, + raw ? value : value.call(elems[i], i, fn(elems[i], key)) + ); + } + } + } + + return chainable + ? elems + : // Gets + bulk ? fn.call(elems) : length ? fn(elems[0], key) : emptyGet; + }, + + now: Date.now, + }); + + jQuery.ready.promise = function(obj) { + if (!readyList) { + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if (document.readyState === 'complete') { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout(jQuery.ready); + } else { + // Use the handy event callback + document.addEventListener('DOMContentLoaded', completed, false); + + // A fallback to window.onload, that will always work + window.addEventListener('load', completed, false); + } + } + return readyList.promise(obj); + }; + + // Populate the class2type map + jQuery.each( + 'Boolean Number String Function Array Date RegExp Object Error'.split(' '), + function(i, name) { + class2type['[object ' + name + ']'] = name.toLowerCase(); + } + ); + + function isArraylike(obj) { + var length = obj.length, + type = jQuery.type(obj); + + if (jQuery.isWindow(obj)) { + return false; + } + + if (obj.nodeType === 1 && length) { + return true; + } + + return ( + type === 'array' || + (type !== 'function' && + (length === 0 || + (typeof length === 'number' && length > 0 && length - 1 in obj))) + ); + } + + // All jQuery objects should point back to these + rootjQuery = jQuery(document); + // String to Object options format cache + var optionsCache = {}; + + // Convert String-formatted options into Object-formatted ones and store in cache + function createOptions(options) { + var object = (optionsCache[options] = {}); + jQuery.each(options.match(core_rnotwhite) || [], function(_, flag) { + object[flag] = true; + }); + return object; + } + + /* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ + jQuery.Callbacks = function(options) { + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = + typeof options === 'string' + ? optionsCache[options] || createOptions(options) + : jQuery.extend({}, options); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function(data) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for (; list && firingIndex < firingLength; firingIndex++) { + if ( + list[firingIndex].apply(data[0], data[1]) === false && + options.stopOnFalse + ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if (list) { + if (stack) { + if (stack.length) { + fire(stack.shift()); + } + } else if (memory) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if (list) { + // First, we save the current length + var start = list.length; + (function add(args) { + jQuery.each(args, function(_, arg) { + var type = jQuery.type(arg); + if (type === 'function') { + if (!options.unique || !self.has(arg)) { + list.push(arg); + } + } else if (arg && arg.length && type !== 'string') { + // Inspect recursively + add(arg); + } + }); + })(arguments); + // Do we need to add the callbacks to the + // current firing batch? + if (firing) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if (memory) { + firingStart = start; + fire(memory); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if (list) { + jQuery.each(arguments, function(_, arg) { + var index; + while ((index = jQuery.inArray(arg, list, index)) > -1) { + list.splice(index, 1); + // Handle firing indexes + if (firing) { + if (index <= firingLength) { + firingLength--; + } + if (index <= firingIndex) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function(fn) { + return fn ? jQuery.inArray(fn, list) > -1 : !!(list && list.length); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if (!memory) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function(context, args) { + args = args || []; + args = [context, args.slice ? args.slice() : args]; + if (list && (!fired || stack)) { + if (firing) { + stack.push(args); + } else { + fire(args); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith(this, arguments); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + }, + }; + + return self; + }; + jQuery.extend({ + Deferred: function(func) { + var tuples = [ + // action, add listener, listener list, final state + ['resolve', 'done', jQuery.Callbacks('once memory'), 'resolved'], + ['reject', 'fail', jQuery.Callbacks('once memory'), 'rejected'], + ['notify', 'progress', jQuery.Callbacks('memory')], + ], + state = 'pending', + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done(arguments).fail(arguments); + return this; + }, + then: function(/* fnDone, fnFail, fnProgress */) { + var fns = arguments; + return jQuery + .Deferred(function(newDefer) { + jQuery.each(tuples, function(i, tuple) { + var action = tuple[0], + fn = jQuery.isFunction(fns[i]) && fns[i]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[tuple[1]](function() { + var returned = fn && fn.apply(this, arguments); + if (returned && jQuery.isFunction(returned.promise)) { + returned + .promise() + .done(newDefer.resolve) + .fail(newDefer.reject) + .progress(newDefer.notify); + } else { + newDefer[action + 'With']( + this === promise ? newDefer.promise() : this, + fn ? [returned] : arguments + ); + } + }); + }); + fns = null; + }) + .promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function(obj) { + return obj != null ? jQuery.extend(obj, promise) : promise; + }, + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each(tuples, function(i, tuple) { + var list = tuple[2], + stateString = tuple[3]; + + // promise[ done | fail | progress ] = list.add + promise[tuple[1]] = list.add; + + // Handle state + if (stateString) { + list.add( + function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, + tuples[i ^ 1][2].disable, + tuples[2][2].lock + ); + } + + // deferred[ resolve | reject | notify ] + deferred[tuple[0]] = function() { + deferred[tuple[0] + 'With']( + this === deferred ? promise : this, + arguments + ); + return this; + }; + deferred[tuple[0] + 'With'] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise(deferred); + + // Call given func if any + if (func) { + func.call(deferred, deferred); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function(subordinate /* , ..., subordinateN */) { + var i = 0, + resolveValues = core_slice.call(arguments), + length = resolveValues.length, + // the count of uncompleted subordinates + remaining = + length !== 1 || + (subordinate && jQuery.isFunction(subordinate.promise)) + ? length + : 0, + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + // Update function for both resolve and progress values + updateFunc = function(i, contexts, values) { + return function(value) { + contexts[i] = this; + values[i] = + arguments.length > 1 ? core_slice.call(arguments) : value; + if (values === progressValues) { + deferred.notifyWith(contexts, values); + } else if (!--remaining) { + deferred.resolveWith(contexts, values); + } + }; + }, + progressValues, + progressContexts, + resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if (length > 1) { + progressValues = new Array(length); + progressContexts = new Array(length); + resolveContexts = new Array(length); + for (; i < length; i++) { + if (resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)) { + resolveValues[i] + .promise() + .done(updateFunc(i, resolveContexts, resolveValues)) + .fail(deferred.reject) + .progress(updateFunc(i, progressContexts, progressValues)); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if (!remaining) { + deferred.resolveWith(resolveContexts, resolveValues); + } + + return deferred.promise(); + }, + }); + jQuery.support = (function(support) { + var input = document.createElement('input'), + fragment = document.createDocumentFragment(), + div = document.createElement('div'), + select = document.createElement('select'), + opt = select.appendChild(document.createElement('option')); + + // Finish early in limited environments + if (!input.type) { + return support; + } + + input.type = 'checkbox'; + + // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere) + support.checkOn = input.value === ''; + + // Must access the parent to make an option select properly + // Support: IE9, IE10 + support.optSelected = opt.selected; + + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode + support.boxModel = document.compatMode === 'CSS1Compat'; + + // Will be defined later + support.reliableMarginRight = true; + support.boxSizingReliable = true; + support.pixelPosition = false; + + // Make sure checked status is properly cloned + // Support: IE9, IE10 + input.checked = true; + support.noCloneChecked = input.cloneNode(true).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Check if an input maintains its value after becoming a radio + // Support: IE9, IE10, Opera + input = document.createElement('input'); + input.value = 't'; + input.type = 'radio'; + support.radioValue = input.value === 't'; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute('checked', 't'); + input.setAttribute('name', 't'); + + fragment.appendChild(input); + + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment + .cloneNode(true) + .cloneNode(true).lastChild.checked; + + // Support: Firefox 17+ + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + support.focusinBubbles = 'onfocusin' in window; + + div.style.backgroundClip = 'content-box'; + div.cloneNode(true).style.backgroundClip = ''; + support.clearCloneStyle = div.style.backgroundClip === 'content-box'; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, + marginDiv, + divReset = + 'padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;', + body = document.getElementsByTagName('body')[0]; + + if (!body) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement('div'); + container.style.cssText = + 'border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px'; + + // Check box-sizing and margin behavior + body.appendChild(container).appendChild(div); + div.innerHTML = ''; + div.style.cssText = + 'box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;'; + + support.boxSizing = div.offsetWidth === 4; + support.doesNotIncludeMarginInBodyOffset = body.offsetTop !== 1; + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if (window.getComputedStyle) { + support.pixelPosition = + (window.getComputedStyle(div, null) || {}).top !== '1%'; + support.boxSizingReliable = + (window.getComputedStyle(div, null) || { width: '4px' }).width === + '4px'; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild(document.createElement('div')); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = '0'; + div.style.width = '1px'; + + support.reliableMarginRight = !parseFloat( + (window.getComputedStyle(marginDiv, null) || {}).marginRight + ); + } + + body.removeChild(container); + }); + + return support; + })({}); + + /* + Implementation Summary + + 1. Enforce API surface and semantic compatibility with 1.9.x branch + 2. Improve the module's maintainability by reducing the storage + paths to a single mechanism. + 3. Use the same single mechanism to support "private" and "user" data. + 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) + 5. Avoid exposing implementation details on user objects (eg. expando properties) + 6. Provide a clear path for implementation upgrade to WeakMap in 2014 +*/ + var data_user, + data_priv, + rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + + function Data() { + this.cache = {}; + this.expando = jQuery.expando + Math.random(); + } + + Data.uid = 1; + + Data.prototype = { + key: function(owner) { + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[this.expando]; + + // If not, create one + if (!unlock) { + unlock = Data.uid++; + descriptor[this.expando] = { value: unlock }; + + // Secure it in a non-enumerable, non-writable property + try { + Object.defineProperties(owner, descriptor); + + // Support: Android<4 + // Fallback to a less secure definition + } catch (e) { + descriptor[this.expando] = unlock; + jQuery.extend(owner, descriptor); + } + } + + // Ensure the cache object + if (!this.cache[unlock]) { + this.cache[unlock] = {}; + } + + return unlock; + }, + set: function(owner, data, value) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key(owner), + cache = this.cache[unlock]; + + // Handle: [ owner, key, value ] args + if (typeof data === 'string') { + cache[data] = value; + + // Handle: [ owner, { properties } ] args + } else { + // Support an expectation from the old data system where plain + // objects used to initialize would be set to the cache by + // reference, instead of having properties and values copied. + // Note, this will kill the connection between + // "this.cache[ unlock ]" and "cache" + if (jQuery.isEmptyObject(cache)) { + this.cache[unlock] = data; + // Otherwise, copy the properties one-by-one to the cache object + } else { + for (prop in data) { + cache[prop] = data[prop]; + } + } + } + + return this; + }, + get: function(owner, key) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. + var cache = this.cache[this.key(owner)]; + + return key === undefined ? cache : cache[key]; + }, + access: function(owner, key, value) { + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( + key === undefined || + (key && typeof key === 'string' && value === undefined) + ) { + return this.get(owner, key); + } + + // [*]When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set(owner, key, value); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function(owner, key) { + var i, + name, + unlock = this.key(owner), + cache = this.cache[unlock]; + + if (key === undefined) { + this.cache[unlock] = {}; + } else { + // Support array or space separated string of keys + if (jQuery.isArray(key)) { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = key.concat(key.map(jQuery.camelCase)); + } else { + // Try the string as a key before any manipulation + if (key in cache) { + name = [key]; + } else { + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + name = jQuery.camelCase(key); + name = name in cache ? [name] : name.match(core_rnotwhite) || []; + } + } + + i = name.length; + while (i--) { + delete cache[name[i]]; + } + } + }, + hasData: function(owner) { + return !jQuery.isEmptyObject(this.cache[this.key(owner)]); + }, + discard: function(owner) { + delete this.cache[this.key(owner)]; + }, + }; + + // This will be used by remove()/cleanData() in manipulation to sever + // remaining references to node objects. One day we'll replace the dual + // arrays with a WeakMap and this won't be an issue. + // (Splices the data objects out of the internal cache arrays) + function data_discard(owner) { + data_user.discard(owner); + data_priv.discard(owner); + } + + // These may be used throughout the jQuery core codebase + data_user = new Data(); + data_priv = new Data(); + + jQuery.extend({ + // This is no longer relevant to jQuery core, but must remain + // supported for the sake of jQuery 1.9.x API surface compatibility. + acceptData: function() { + return true; + }, + + hasData: function(elem) { + return data_user.hasData(elem) || data_priv.hasData(elem); + }, + + data: function(elem, name, data) { + return data_user.access(elem, name, data); + }, + + removeData: function(elem, name) { + return data_user.remove(elem, name); + }, + + // TODO: Replace all calls to _data and _removeData with direct + // calls to + // + // data_priv.access( elem, name, data ); + // + // data_priv.remove( elem, name ); + // + _data: function(elem, name, data) { + return data_priv.access(elem, name, data); + }, + + _removeData: function(elem, name) { + return data_priv.remove(elem, name); + }, + }); + + jQuery.fn.extend({ + data: function(key, value) { + var attrs, + name, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if (key === undefined) { + if (this.length) { + data = data_user.get(elem); + + if (elem.nodeType === 1 && !data_priv.get(elem, 'hasDataAttrs')) { + attrs = elem.attributes; + for (; i < attrs.length; i++) { + name = attrs[i].name; + + if (name.indexOf('data-') === 0) { + name = jQuery.camelCase(name.substring(5)); + dataAttr(elem, name, data[name]); + } + } + data_priv.set(elem, 'hasDataAttrs', true); + } + } + + return data; + } + + // Sets multiple values + if (typeof key === 'object') { + return this.each(function() { + data_user.set(this, key); + }); + } + + return jQuery.access( + this, + function(value) { + var data, + camelKey = jQuery.camelCase(key); + + // Get the Data... + if (value === undefined) { + // Attempt to get data from the cache + // with the key as-is + data = data_user.get(elem, key); + if (data !== undefined) { + return data; + } + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr(elem, key, undefined); + if (data !== undefined) { + return data; + } + + // As a last resort, attempt to find + // the data by checking AGAIN, but with + // a camelCased key. + data = data_user.get(elem, camelKey); + if (data !== undefined) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return undefined; + } + + // Set the data... + this.each(function() { + // First, attempt to store a copy or reference of any + // data that might've been store with a camelCased key. + var data = data_user.get(this, camelKey); + + // For HTML5 data-* attribute interop, we have to + // store property names with dashes in a camelCase form. + // This might not apply to all properties...* + data_user.set(this, camelKey, value); + + // *... In the case of properties that might ACTUALLY + // have dashes, we need to also store a copy of that + // unchanged property. + if (/-/.test(key) && data !== undefined) { + data_user.set(this, key, value); + } + }); + }, + null, + value, + arguments.length > 1, + null, + true + ); + }, + + removeData: function(key) { + return this.each(function() { + data_user.remove(this, key); + }); + }, + }); + + function dataAttr(elem, key, data) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if (data === undefined && elem.nodeType === 1) { + name = 'data-' + key.replace(rmultiDash, '-$1').toLowerCase(); + data = elem.getAttribute(name); + + if (typeof data === 'string') { + try { + data = + data === 'true' + ? true + : data === 'false' + ? false + : data === 'null' + ? null + : // Only convert to a number if it doesn't change the string + +data + '' === data + ? +data + : rbrace.test(data) ? JSON.parse(data) : data; + } catch (e) {} + + // Make sure we set the data so it isn't changed later + data_user.set(elem, key, data); + } else { + data = undefined; + } + } + return data; + } + jQuery.extend({ + queue: function(elem, type, data) { + var queue; + + if (elem) { + type = (type || 'fx') + 'queue'; + queue = jQuery._data(elem, type); + + // Speed up dequeue by getting out quickly if this is just a lookup + if (data) { + if (!queue || jQuery.isArray(data)) { + queue = jQuery._data(elem, type, jQuery.makeArray(data)); + } else { + queue.push(data); + } + } + return queue || []; + } + }, + + dequeue: function(elem, type) { + type = type || 'fx'; + + var queue = jQuery.queue(elem, type), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks(elem, type), + next = function() { + jQuery.dequeue(elem, type); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if (fn === 'inprogress') { + fn = queue.shift(); + startLength--; + } + + hooks.cur = fn; + if (fn) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if (type === 'fx') { + queue.unshift('inprogress'); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call(elem, next, hooks); + } + + if (!startLength && hooks) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function(elem, type) { + var key = type + 'queueHooks'; + return ( + jQuery._data(elem, key) || + jQuery._data(elem, key, { + empty: jQuery.Callbacks('once memory').add(function() { + jQuery._removeData(elem, type + 'queue'); + jQuery._removeData(elem, key); + }), + }) + ); + }, + }); + + jQuery.fn.extend({ + queue: function(type, data) { + var setter = 2; + + if (typeof type !== 'string') { + data = type; + type = 'fx'; + setter--; + } + + if (arguments.length < setter) { + return jQuery.queue(this[0], type); + } + + return data === undefined + ? this + : this.each(function() { + var queue = jQuery.queue(this, type, data); + + // ensure a hooks for this queue + jQuery._queueHooks(this, type); + + if (type === 'fx' && queue[0] !== 'inprogress') { + jQuery.dequeue(this, type); + } + }); + }, + dequeue: function(type) { + return this.each(function() { + jQuery.dequeue(this, type); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function(time, type) { + time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; + type = type || 'fx'; + + return this.queue(type, function(next, hooks) { + var timeout = setTimeout(next, time); + hooks.stop = function() { + clearTimeout(timeout); + }; + }); + }, + clearQueue: function(type) { + return this.queue(type || 'fx', []); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function(type, obj) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if (!--count) { + defer.resolveWith(elements, [elements]); + } + }; + + if (typeof type !== 'string') { + obj = type; + type = undefined; + } + type = type || 'fx'; + + while (i--) { + tmp = jQuery._data(elements[i], type + 'queueHooks'); + if (tmp && tmp.empty) { + count++; + tmp.empty.add(resolve); + } + } + resolve(); + return defer.promise(obj); + }, + }); + var nodeHook, + boolHook, + rclass = /[\t\r\n]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i; + + jQuery.fn.extend({ + attr: function(name, value) { + return jQuery.access( + this, + jQuery.attr, + name, + value, + arguments.length > 1 + ); + }, + + removeAttr: function(name) { + return this.each(function() { + jQuery.removeAttr(this, name); + }); + }, + + prop: function(name, value) { + return jQuery.access( + this, + jQuery.prop, + name, + value, + arguments.length > 1 + ); + }, + + removeProp: function(name) { + name = jQuery.propFix[name] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[name] = undefined; + delete this[name]; + } catch (e) {} + }); + }, + + addClass: function(value) { + var classes, + elem, + cur, + clazz, + j, + i = 0, + len = this.length, + proceed = typeof value === 'string' && value; + + if (jQuery.isFunction(value)) { + return this.each(function(j) { + jQuery(this).addClass(value.call(this, j, this.className)); + }); + } + + if (proceed) { + // The disjunction here is for better compressibility (see removeClass) + classes = (value || '').match(core_rnotwhite) || []; + + for (; i < len; i++) { + elem = this[i]; + cur = + elem.nodeType === 1 && + (elem.className + ? (' ' + elem.className + ' ').replace(rclass, ' ') + : ' '); + + if (cur) { + j = 0; + while ((clazz = classes[j++])) { + if (cur.indexOf(' ' + clazz + ' ') < 0) { + cur += clazz + ' '; + } + } + elem.className = jQuery.trim(cur); + } + } + } + + return this; + }, + + removeClass: function(value) { + var classes, + elem, + cur, + clazz, + j, + i = 0, + len = this.length, + proceed = + arguments.length === 0 || (typeof value === 'string' && value); + + if (jQuery.isFunction(value)) { + return this.each(function(j) { + jQuery(this).removeClass(value.call(this, j, this.className)); + }); + } + if (proceed) { + classes = (value || '').match(core_rnotwhite) || []; + + for (; i < len; i++) { + elem = this[i]; + // This expression is here for better compressibility (see addClass) + cur = + elem.nodeType === 1 && + (elem.className + ? (' ' + elem.className + ' ').replace(rclass, ' ') + : ''); + + if (cur) { + j = 0; + while ((clazz = classes[j++])) { + // Remove *all* instances + while (cur.indexOf(' ' + clazz + ' ') >= 0) { + cur = cur.replace(' ' + clazz + ' ', ' '); + } + } + elem.className = value ? jQuery.trim(cur) : ''; + } + } + } + + return this; + }, + + toggleClass: function(value, stateVal) { + var type = typeof value, + isBool = typeof stateVal === 'boolean'; + + if (jQuery.isFunction(value)) { + return this.each(function(i) { + jQuery(this).toggleClass( + value.call(this, i, this.className, stateVal), + stateVal + ); + }); + } + + return this.each(function() { + if (type === 'string') { + // toggle individual class names + var className, + i = 0, + self = jQuery(this), + state = stateVal, + classNames = value.match(core_rnotwhite) || []; + + while ((className = classNames[i++])) { + // check each className given, space separated list + state = isBool ? state : !self.hasClass(className); + self[state ? 'addClass' : 'removeClass'](className); + } + + // Toggle whole class name + } else if (type === core_strundefined || type === 'boolean') { + if (this.className) { + // store className if set + jQuery._data(this, '__className__', this.className); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = + this.className || value === false + ? '' + : jQuery._data(this, '__className__') || ''; + } + }); + }, + + hasClass: function(selector) { + var className = ' ' + selector + ' ', + i = 0, + l = this.length; + for (; i < l; i++) { + if ( + this[i].nodeType === 1 && + (' ' + this[i].className + ' ') + .replace(rclass, ' ') + .indexOf(className) >= 0 + ) { + return true; + } + } + + return false; + }, + + val: function(value) { + var hooks, + ret, + isFunction, + elem = this[0]; + + if (!arguments.length) { + if (elem) { + hooks = + jQuery.valHooks[elem.type] || + jQuery.valHooks[elem.nodeName.toLowerCase()]; + + if ( + hooks && + 'get' in hooks && + (ret = hooks.get(elem, 'value')) !== undefined + ) { + return ret; + } + + ret = elem.value; + + return typeof ret === 'string' + ? // handle most common string cases + ret.replace(rreturn, '') + : // handle cases where value is null/undef or number + ret == null ? '' : ret; + } + + return; + } + + isFunction = jQuery.isFunction(value); + + return this.each(function(i) { + var val, + self = jQuery(this); + + if (this.nodeType !== 1) { + return; + } + + if (isFunction) { + val = value.call(this, i, self.val()); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if (val == null) { + val = ''; + } else if (typeof val === 'number') { + val += ''; + } else if (jQuery.isArray(val)) { + val = jQuery.map(val, function(value) { + return value == null ? '' : value + ''; + }); + } + + hooks = + jQuery.valHooks[this.type] || + jQuery.valHooks[this.nodeName.toLowerCase()]; + + // If set returns undefined, fall back to normal setting + if ( + !hooks || + !('set' in hooks) || + hooks.set(this, val, 'value') === undefined + ) { + this.value = val; + } + }); + }, + }); + + jQuery.extend({ + valHooks: { + option: { + get: function(elem) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + }, + }, + select: { + get: function(elem) { + var value, + option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === 'select-one' || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? max : one ? index : 0; + + // Loop through all the selected options + for (; i < max; i++) { + option = options[i]; + + // oldIE doesn't update selected after form reset (#2551) + if ( + (option.selected || i === index) && + // Don't return options that are disabled or in a disabled optgroup + (jQuery.support.optDisabled + ? !option.disabled + : option.getAttribute('disabled') === null) && + (!option.parentNode.disabled || + !jQuery.nodeName(option.parentNode, 'optgroup')) + ) { + // Get the specific value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if (one) { + return value; + } + + // Multi-Selects return an array + values.push(value); + } + } + + return values; + }, + + set: function(elem, value) { + var values = jQuery.makeArray(value); + + jQuery(elem) + .find('option') + .each(function() { + this.selected = jQuery.inArray(jQuery(this).val(), values) >= 0; + }); + + if (!values.length) { + elem.selectedIndex = -1; + } + return values; + }, + }, + }, + + attr: function(elem, name, value) { + var ret, + hooks, + notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if (!elem || nType === 3 || nType === 8 || nType === 2) { + return; + } + + // Fallback to prop when attributes are not supported + if (typeof elem.getAttribute === core_strundefined) { + return jQuery.prop(elem, name, value); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc(elem); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if (notxml) { + name = name.toLowerCase(); + hooks = + jQuery.attrHooks[name] || (rboolean.test(name) ? boolHook : nodeHook); + } + + if (value !== undefined) { + if (value === null) { + jQuery.removeAttr(elem, name); + } else if ( + hooks && + notxml && + 'set' in hooks && + (ret = hooks.set(elem, value, name)) !== undefined + ) { + return ret; + } else { + elem.setAttribute(name, value + ''); + return value; + } + } else if ( + hooks && + notxml && + 'get' in hooks && + (ret = hooks.get(elem, name)) !== null + ) { + return ret; + } else { + // In IE9+, Flash objects don't have .getAttribute (#12945) + // Support: IE9+ + if (typeof elem.getAttribute !== core_strundefined) { + ret = elem.getAttribute(name); + } + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + } + }, + + removeAttr: function(elem, value) { + var name, + propName, + i = 0, + attrNames = value && value.match(core_rnotwhite); + + if (attrNames && elem.nodeType === 1) { + while ((name = attrNames[i++])) { + propName = jQuery.propFix[name] || name; + + // Boolean attributes get special treatment (#10870) + // Set corresponding property to false for boolean attributes + if (rboolean.test(name)) { + elem[propName] = false; + } + + elem.removeAttribute(name); + } + } + }, + + attrHooks: { + type: { + set: function(elem, value) { + if ( + !jQuery.support.radioValue && + value === 'radio' && + jQuery.nodeName(elem, 'input') + ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute('type', value); + if (val) { + elem.value = val; + } + return value; + } + }, + }, + }, + + propFix: { + tabindex: 'tabIndex', + readonly: 'readOnly', + for: 'htmlFor', + class: 'className', + maxlength: 'maxLength', + cellspacing: 'cellSpacing', + cellpadding: 'cellPadding', + rowspan: 'rowSpan', + colspan: 'colSpan', + usemap: 'useMap', + frameborder: 'frameBorder', + contenteditable: 'contentEditable', + }, + + prop: function(elem, name, value) { + var ret, + hooks, + notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if (!elem || nType === 3 || nType === 8 || nType === 2) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc(elem); + + if (notxml) { + // Fix name and attach hooks + name = jQuery.propFix[name] || name; + hooks = jQuery.propHooks[name]; + } + + if (value !== undefined) { + if ( + hooks && + 'set' in hooks && + (ret = hooks.set(elem, value, name)) !== undefined + ) { + return ret; + } else { + return (elem[name] = value); + } + } else { + if (hooks && 'get' in hooks && (ret = hooks.get(elem, name)) !== null) { + return ret; + } else { + return elem[name]; + } + } + }, + + propHooks: { + tabIndex: { + get: function(elem) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode('tabindex'); + + return attributeNode && attributeNode.specified + ? parseInt(attributeNode.value, 10) + : rfocusable.test(elem.nodeName) || + (rclickable.test(elem.nodeName) && elem.href) + ? 0 + : undefined; + }, + }, + }, + }); + + // Hook for boolean attributes + boolHook = { + get: function(elem, name) { + return elem.getAttribute(name) !== null ? name.toLowerCase() : undefined; + }, + set: function(elem, value, name) { + if (value === false) { + // Remove boolean attributes when set to false + jQuery.removeAttr(elem, name); + } else { + elem.setAttribute(name, name); + } + return name; + }, + }; + + // Radios and checkboxes getter/setter + if (!jQuery.support.checkOn) { + jQuery.each(['radio', 'checkbox'], function() { + jQuery.valHooks[this] = { + get: function(elem) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute('value') === null ? 'on' : elem.value; + }, + }; + }); + } + jQuery.each(['radio', 'checkbox'], function() { + jQuery.valHooks[this] = jQuery.extend(jQuery.valHooks[this], { + set: function(elem, value) { + if (jQuery.isArray(value)) { + return (elem.checked = + jQuery.inArray(jQuery(elem).val(), value) >= 0); + } + }, + }); + }); + + // IE9/10 do not see a selected option inside an optgroup unless you access it + // Support: IE9, IE10 + if (!jQuery.support.optSelected) { + jQuery.propHooks.selected = jQuery.extend(jQuery.propHooks.selected, { + get: function(elem) { + var parent = elem.parentNode; + if (parent && parent.parentNode) { + parent.parentNode.selectedIndex; + } + return null; + }, + }); + } + var rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + + function returnTrue() { + return true; + } + + function returnFalse() { + return false; + } + + /* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ + jQuery.event = { + global: {}, + + add: function(elem, types, handler, data, selector) { + var handleObjIn, + eventHandle, + tmp, + events, + t, + handleObj, + special, + handlers, + type, + namespaces, + origType, + elemData = data_priv.get(elem); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if (!elemData) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if (handler.handler) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if (!handler.guid) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if (!(events = elemData.events)) { + events = elemData.events = {}; + } + if (!(eventHandle = elemData.handle)) { + eventHandle = elemData.handle = function(e) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && + (!e || jQuery.event.triggered !== e.type) + ? jQuery.event.dispatch.apply(eventHandle.elem, arguments) + : undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = (types || '').match(core_rnotwhite) || ['']; + t = types.length; + while (t--) { + tmp = rtypenamespace.exec(types[t]) || []; + type = origType = tmp[1]; + namespaces = (tmp[2] || '').split('.').sort(); + + // There *must* be a type, no attaching namespace-only handlers + if (!type) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[type] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = (selector ? special.delegateType : special.bindType) || type; + + // Update special based on newly reset type + special = jQuery.event.special[type] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( + { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: + selector && jQuery.expr.match.needsContext.test(selector), + namespace: namespaces.join('.'), + }, + handleObjIn + ); + + // Init the event handler queue if we're the first + if (!(handlers = events[type])) { + handlers = events[type] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( + !special.setup || + special.setup.call(elem, data, namespaces, eventHandle) === false + ) { + if (elem.addEventListener) { + elem.addEventListener(type, eventHandle, false); + } + } + } + + if (special.add) { + special.add.call(elem, handleObj); + + if (!handleObj.handler.guid) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if (selector) { + handlers.splice(handlers.delegateCount++, 0, handleObj); + } else { + handlers.push(handleObj); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[type] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function(elem, types, handler, selector, mappedTypes) { + var j, + origCount, + tmp, + events, + t, + handleObj, + special, + handlers, + type, + namespaces, + origType, + elemData = data_priv.hasData(elem) && data_priv.get(elem); + + if (!elemData || !(events = elemData.events)) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = (types || '').match(core_rnotwhite) || ['']; + t = types.length; + while (t--) { + tmp = rtypenamespace.exec(types[t]) || []; + type = origType = tmp[1]; + namespaces = (tmp[2] || '').split('.').sort(); + + // Unbind all events (on this namespace, if provided) for the element + if (!type) { + for (type in events) { + jQuery.event.remove(elem, type + types[t], handler, selector, true); + } + continue; + } + + special = jQuery.event.special[type] || {}; + type = (selector ? special.delegateType : special.bindType) || type; + handlers = events[type] || []; + tmp = + tmp[2] && + new RegExp('(^|\\.)' + namespaces.join('\\.(?:.*\\.|)') + '(\\.|$)'); + + // Remove matching events + origCount = j = handlers.length; + while (j--) { + handleObj = handlers[j]; + + if ( + (mappedTypes || origType === handleObj.origType) && + (!handler || handler.guid === handleObj.guid) && + (!tmp || tmp.test(handleObj.namespace)) && + (!selector || + selector === handleObj.selector || + (selector === '**' && handleObj.selector)) + ) { + handlers.splice(j, 1); + + if (handleObj.selector) { + handlers.delegateCount--; + } + if (special.remove) { + special.remove.call(elem, handleObj); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if (origCount && !handlers.length) { + if ( + !special.teardown || + special.teardown.call(elem, namespaces, elemData.handle) === false + ) { + jQuery.removeEvent(elem, type, elemData.handle); + } + + delete events[type]; + } + } + + // Remove the expando if it's no longer used + if (jQuery.isEmptyObject(events)) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData(elem, 'events'); + } + }, + + trigger: function(event, data, elem, onlyHandlers) { + var i, + cur, + tmp, + bubbleType, + ontype, + handle, + special, + eventPath = [elem || document], + type = core_hasOwn.call(event, 'type') ? event.type : event, + namespaces = core_hasOwn.call(event, 'namespace') + ? event.namespace.split('.') + : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if (elem.nodeType === 3 || elem.nodeType === 8) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if (rfocusMorph.test(type + jQuery.event.triggered)) { + return; + } + + if (type.indexOf('.') >= 0) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split('.'); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(':') < 0 && 'on' + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[jQuery.expando] + ? event + : new jQuery.Event(type, typeof event === 'object' && event); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join('.'); + event.namespace_re = event.namespace + ? new RegExp('(^|\\.)' + namespaces.join('\\.(?:.*\\.|)') + '(\\.|$)') + : null; + + // Clean up the event in case it is being reused + event.result = undefined; + if (!event.target) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? [event] : jQuery.makeArray(data, [event]); + + // Allow special events to draw outside the lines + special = jQuery.event.special[type] || {}; + if ( + !onlyHandlers && + special.trigger && + special.trigger.apply(elem, data) === false + ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if (!onlyHandlers && !special.noBubble && !jQuery.isWindow(elem)) { + bubbleType = special.delegateType || type; + if (!rfocusMorph.test(bubbleType + type)) { + cur = cur.parentNode; + } + for (; cur; cur = cur.parentNode) { + eventPath.push(cur); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if (tmp === (elem.ownerDocument || document)) { + eventPath.push(tmp.defaultView || tmp.parentWindow || window); + } + } + + // Fire handlers on the event path + i = 0; + while ((cur = eventPath[i++]) && !event.isPropagationStopped()) { + event.type = i > 1 ? bubbleType : special.bindType || type; + + // jQuery handler + handle = + (jQuery._data(cur, 'events') || {})[event.type] && + jQuery._data(cur, 'handle'); + if (handle) { + handle.apply(cur, data); + } + + // Native handler + handle = ontype && cur[ontype]; + if ( + handle && + jQuery.acceptData(cur) && + handle.apply && + handle.apply(cur, data) === false + ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if (!onlyHandlers && !event.isDefaultPrevented()) { + if ( + (!special._default || + special._default.apply(elem.ownerDocument, data) === false) && + !(type === 'click' && jQuery.nodeName(elem, 'a')) && + jQuery.acceptData(elem) + ) { + // Call a native DOM method on the target with the same name name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( + ontype && + jQuery.isFunction(elem[type]) && + !jQuery.isWindow(elem) + ) { + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ontype]; + + if (tmp) { + elem[ontype] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[type](); + jQuery.event.triggered = undefined; + + if (tmp) { + elem[ontype] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function(event) { + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix(event); + + var i, + j, + ret, + matched, + handleObj, + handlerQueue = [], + args = core_slice.call(arguments), + handlers = (jQuery._data(this, 'events') || {})[event.type] || [], + special = jQuery.event.special[event.type] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( + special.preDispatch && + special.preDispatch.call(this, event) === false + ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call(this, event, handlers); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) { + event.currentTarget = matched.elem; + + j = 0; + while ( + (handleObj = matched.handlers[j++]) && + !event.isImmediatePropagationStopped() + ) { + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( + !event.namespace_re || + event.namespace_re.test(handleObj.namespace) + ) { + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( + (jQuery.event.special[handleObj.origType] || {}).handle || + handleObj.handler + ).apply(matched.elem, args); + + if (ret !== undefined) { + if ((event.result = ret) === false) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if (special.postDispatch) { + special.postDispatch.call(this, event); + } + + return event.result; + }, + + handlers: function(event, handlers) { + var i, + matches, + sel, + handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( + delegateCount && + cur.nodeType && + (!event.button || event.type !== 'click') + ) { + for (; cur != this; cur = cur.parentNode || this) { + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if (cur.disabled !== true || event.type !== 'click') { + matches = []; + for (i = 0; i < delegateCount; i++) { + handleObj = handlers[i]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + ' '; + + if (matches[sel] === undefined) { + matches[sel] = handleObj.needsContext + ? jQuery(sel, this).index(cur) >= 0 + : jQuery.find(sel, this, null, [cur]).length; + } + if (matches[sel]) { + matches.push(handleObj); + } + } + if (matches.length) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if (delegateCount < handlers.length) { + handlerQueue.push({ + elem: this, + handlers: handlers.slice(delegateCount), + }); + } + + return handlerQueue; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: 'altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which'.split( + ' ' + ), + + fixHooks: {}, + + keyHooks: { + props: 'char charCode key keyCode'.split(' '), + filter: function(event, original) { + // Add which for key events + if (event.which == null) { + event.which = + original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + }, + }, + + mouseHooks: { + props: 'button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement'.split( + ' ' + ), + filter: function(event, original) { + var eventDoc, + doc, + body, + button = original.button; + + // Calculate pageX/Y if missing and clientX/Y available + if (event.pageX == null && original.clientX != null) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = + original.clientX + + ((doc && doc.scrollLeft) || (body && body.scrollLeft) || 0) - + ((doc && doc.clientLeft) || (body && body.clientLeft) || 0); + event.pageY = + original.clientY + + ((doc && doc.scrollTop) || (body && body.scrollTop) || 0) - + ((doc && doc.clientTop) || (body && body.clientTop) || 0); + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if (!event.which && button !== undefined) { + event.which = button & 1 ? 1 : button & 2 ? 3 : button & 4 ? 2 : 0; + } + + return event; + }, + }, + + fix: function(event) { + if (event[jQuery.expando]) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, + prop, + copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[type]; + + if (!fixHook) { + this.fixHooks[type] = fixHook = rmouseEvent.test(type) + ? this.mouseHooks + : rkeyEvent.test(type) ? this.keyHooks : {}; + } + copy = fixHook.props ? this.props.concat(fixHook.props) : this.props; + + event = new jQuery.Event(originalEvent); + + i = copy.length; + while (i--) { + prop = copy[i]; + event[prop] = originalEvent[prop]; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if (event.target.nodeType === 3) { + event.target = event.target.parentNode; + } + + return fixHook.filter ? fixHook.filter(event, originalEvent) : event; + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true, + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( + this.type === 'checkbox' && + this.click && + jQuery.nodeName(this, 'input') + ) { + this.click(); + return false; + } + }, + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if (this !== document.activeElement && this.focus) { + this.focus(); + return false; + } + }, + delegateType: 'focusin', + }, + blur: { + trigger: function() { + if (this === document.activeElement && this.blur) { + this.blur(); + return false; + } + }, + delegateType: 'focusout', + }, + + beforeunload: { + postDispatch: function(event) { + // Support: Firefox 10+ + if (event.result !== undefined) { + event.originalEvent.returnValue = event.result; + } + }, + }, + }, + + simulate: function(type, elem, event, bubble) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend(new jQuery.Event(), event, { + type: type, + isSimulated: true, + originalEvent: {}, + }); + if (bubble) { + jQuery.event.trigger(e, null, elem); + } else { + jQuery.event.dispatch.call(elem, e); + } + if (e.isDefaultPrevented()) { + event.preventDefault(); + } + }, + }; + + jQuery.removeEvent = function(elem, type, handle) { + if (elem.removeEventListener) { + elem.removeEventListener(type, handle, false); + } + }; + + jQuery.Event = function(src, props) { + // Allow instantiation without the 'new' keyword + if (!(this instanceof jQuery.Event)) { + return new jQuery.Event(src, props); + } + + // Event object + if (src && src.type) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = + src.defaultPrevented || + (src.getPreventDefault && src.getPreventDefault()) + ? returnTrue + : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if (props) { + jQuery.extend(this, props); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = (src && src.timeStamp) || jQuery.now(); + + // Mark it as fixed + this[jQuery.expando] = true; + }; + + // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding + // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html + jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if (e && e.preventDefault) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if (e && e.stopPropagation) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + }; + + // Create mouseenter/leave events using mouseover/out and event-time checks + // Support: Chrome 15+ + jQuery.each( + { + mouseenter: 'mouseover', + mouseleave: 'mouseout', + }, + function(orig, fix) { + jQuery.event.special[orig] = { + delegateType: fix, + bindType: fix, + + handle: function(event) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( + !related || + (related !== target && !jQuery.contains(target, related)) + ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply(this, arguments); + event.type = fix; + } + return ret; + }, + }; + } + ); + + // Create "bubbling" focus and blur events + // Support: Firefox 10+ + if (!jQuery.support.focusinBubbles) { + jQuery.each({ focus: 'focusin', blur: 'focusout' }, function(orig, fix) { + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function(event) { + jQuery.event.simulate( + fix, + event.target, + jQuery.event.fix(event), + true + ); + }; + + jQuery.event.special[fix] = { + setup: function() { + if (attaches++ === 0) { + document.addEventListener(orig, handler, true); + } + }, + teardown: function() { + if (--attaches === 0) { + document.removeEventListener(orig, handler, true); + } + }, + }; + }); + } + + jQuery.fn.extend({ + on: function(types, selector, data, fn, /*INTERNAL*/ one) { + var origFn, type; + + // Types can be a map of types/handlers + if (typeof types === 'object') { + // ( types-Object, selector, data ) + if (typeof selector !== 'string') { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for (type in types) { + this.on(type, selector, data, types[type], one); + } + return this; + } + + if (data == null && fn == null) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if (fn == null) { + if (typeof selector === 'string') { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if (fn === false) { + fn = returnFalse; + } else if (!fn) { + return this; + } + + if (one === 1) { + origFn = fn; + fn = function(event) { + // Can use an empty set, since event contains the info + jQuery().off(event); + return origFn.apply(this, arguments); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || (origFn.guid = jQuery.guid++); + } + return this.each(function() { + jQuery.event.add(this, types, fn, data, selector); + }); + }, + one: function(types, selector, data, fn) { + return this.on(types, selector, data, fn, 1); + }, + off: function(types, selector, fn) { + var handleObj, type; + if (types && types.preventDefault && types.handleObj) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery(types.delegateTarget).off( + handleObj.namespace + ? handleObj.origType + '.' + handleObj.namespace + : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if (typeof types === 'object') { + // ( types-object [, selector] ) + for (type in types) { + this.off(type, selector, types[type]); + } + return this; + } + if (selector === false || typeof selector === 'function') { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if (fn === false) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove(this, types, fn, selector); + }); + }, + + bind: function(types, data, fn) { + return this.on(types, null, data, fn); + }, + unbind: function(types, fn) { + return this.off(types, null, fn); + }, + + delegate: function(selector, types, data, fn) { + return this.on(types, selector, data, fn); + }, + undelegate: function(selector, types, fn) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 + ? this.off(selector, '**') + : this.off(types, selector || '**', fn); + }, + + trigger: function(type, data) { + return this.each(function() { + jQuery.event.trigger(type, data, this); + }); + }, + triggerHandler: function(type, data) { + var elem = this[0]; + if (elem) { + return jQuery.event.trigger(type, data, elem, true); + } + }, + }); + /*! + * Sizzle CSS Selector Engine + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ + (function(window, undefined) { + var i, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + recompare, + sortInput, + // Local document vars + setDocument, + document, + docElem, + documentIsXML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + // Instance-specific data + expando = 'sizzle' + -new Date(), + preferredDoc = window.document, + support = {}, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function() { + return 0; + }, + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + // Array methods + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = + arr.indexOf || + function(elem) { + var i = 0, + len = this.length; + for (; i < len; i++) { + if (this[i] === elem) { + return i; + } + } + return -1; + }, + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = '[\\x20\\t\\r\\n\\f]', + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+', + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace('w', 'w#'), + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = '([*^$|!~]?=)', + attributes = + '\\[' + + whitespace + + '*(' + + characterEncoding + + ')' + + whitespace + + '*(?:' + + operators + + whitespace + + '*(?:([\'"])((?:\\\\.|[^\\\\])*?)\\3|(' + + identifier + + ')|)|)' + + whitespace + + '*\\]', + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = + ':(' + + characterEncoding + + ')(?:\\((([\'"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|' + + attributes.replace(3, 8) + + ')*)|.*)\\)|)', + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( + '^' + whitespace + '+|((?:^|[^\\\\])(?:\\\\.)*)' + whitespace + '+$', + 'g' + ), + rcomma = new RegExp('^' + whitespace + '*,' + whitespace + '*'), + rcombinators = new RegExp( + '^' + whitespace + '*([\\x20\\t\\r\\n\\f>+~])' + whitespace + '*' + ), + rpseudo = new RegExp(pseudos), + ridentifier = new RegExp('^' + identifier + '$'), + matchExpr = { + ID: new RegExp('^#(' + characterEncoding + ')'), + CLASS: new RegExp('^\\.(' + characterEncoding + ')'), + NAME: new RegExp('^\\[name=[\'"]?(' + characterEncoding + ')[\'"]?\\]'), + TAG: new RegExp('^(' + characterEncoding.replace('w', 'w*') + ')'), + ATTR: new RegExp('^' + attributes), + PSEUDO: new RegExp('^' + pseudos), + CHILD: new RegExp( + '^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + + whitespace + + '*(even|odd|(([+-]|)(\\d*)n|)' + + whitespace + + '*(?:([+-]|)' + + whitespace + + '*(\\d+)|))' + + whitespace + + '*\\)|)', + 'i' + ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + needsContext: new RegExp( + '^' + + whitespace + + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + + whitespace + + '*((?:-\\d)?\\d*)' + + whitespace + + '*\\)|)(?=[^-]|$)', + 'i' + ), + }, + rsibling = /[\x20\t\r\n\f]*[+~]/, + rnative = /^[^{]+\{\s*\[native code/, + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, + funescape = function(_, escaped) { + var high = '0x' + escaped - 0x10000; + // NaN means non-codepoint + return high !== high + ? escaped + : // BMP codepoint + high < 0 + ? String.fromCharCode(high + 0x10000) + : // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( + (high >> 10) | 0xd800, + (high & 0x3ff) | 0xdc00 + ); + }; + + // Optimize for push.apply( _, NodeList ) + try { + push.apply( + (arr = slice.call(preferredDoc.childNodes)), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[preferredDoc.childNodes.length].nodeType; + } catch (e) { + push = { + apply: arr.length + ? // Leverage slice if possible + function(target, els) { + push_native.apply(target, slice.call(els)); + } + : // Support: IE<9 + // Otherwise append directly + function(target, els) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ((target[j++] = els[i++])) {} + target.length = j - 1; + }, + }; + } + + /** + * For feature detection + * @param {Function} fn The function to test for native support + */ + function isNative(fn) { + return rnative.test(fn + ''); + } + + /** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ + function createCache() { + var cache, + keys = []; + + return (cache = function(key, value) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if (keys.push((key += ' ')) > Expr.cacheLength) { + // Only keep the most recent entries + delete cache[keys.shift()]; + } + return (cache[key] = value); + }); + } + + /** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ + function markFunction(fn) { + fn[expando] = true; + return fn; + } + + /** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ + function assert(fn) { + var div = document.createElement('div'); + + try { + return !!fn(div); + } catch (e) { + return false; + } finally { + // release memory in IE + div = null; + } + } + + function Sizzle(selector, context, results, seed) { + var match, + elem, + m, + nodeType, + // QSA vars + i, + groups, + old, + nid, + newContext, + newSelector; + + if ( + (context ? context.ownerDocument || context : preferredDoc) !== document + ) { + setDocument(context); + } + + context = context || document; + results = results || []; + + if (!selector || typeof selector !== 'string') { + return results; + } + + if ((nodeType = context.nodeType) !== 1 && nodeType !== 9) { + return []; + } + + if (!documentIsXML && !seed) { + // Shortcuts + if ((match = rquickExpr.exec(selector))) { + // Speed-up: Sizzle("#ID") + if ((m = match[1])) { + if (nodeType === 9) { + elem = context.getElementById(m); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if (elem && elem.parentNode) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if (elem.id === m) { + results.push(elem); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( + context.ownerDocument && + (elem = context.ownerDocument.getElementById(m)) && + contains(context, elem) && + elem.id === m + ) { + results.push(elem); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if (match[2]) { + push.apply(results, context.getElementsByTagName(selector)); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( + (m = match[3]) && + support.getByClassName && + context.getElementsByClassName + ) { + push.apply(results, context.getElementsByClassName(m)); + return results; + } + } + + // QSA path + if (support.qsa && !rbuggyQSA.test(selector)) { + old = true; + nid = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if (nodeType === 1 && context.nodeName.toLowerCase() !== 'object') { + groups = tokenize(selector); + + if ((old = context.getAttribute('id'))) { + nid = old.replace(rescape, '\\$&'); + } else { + context.setAttribute('id', nid); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while (i--) { + groups[i] = nid + toSelector(groups[i]); + } + newContext = + (rsibling.test(selector) && context.parentNode) || context; + newSelector = groups.join(','); + } + + if (newSelector) { + try { + push.apply(results, newContext.querySelectorAll(newSelector)); + return results; + } catch (qsaError) { + } finally { + if (!old) { + context.removeAttribute('id'); + } + } + } + } + } + + // All others + return select(selector.replace(rtrim, '$1'), context, results, seed); + } + + /** + * Detect xml + * @param {Element|Object} elem An element or a document + */ + isXML = Sizzle.isXML = function(elem) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = + elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== 'HTML' : false; + }; + + /** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ + setDocument = Sizzle.setDocument = function(node) { + var doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if (doc === document || doc.nodeType !== 9 || !doc.documentElement) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsXML = isXML(doc); + + // Check if getElementsByTagName("*") returns only elements + support.tagNameNoComments = assert(function(div) { + div.appendChild(doc.createComment('')); + return !div.getElementsByTagName('*').length; + }); + + // Check if attributes should be retrieved by attribute nodes + support.attributes = assert(function(div) { + div.innerHTML = ''; + var type = typeof div.lastChild.getAttribute('multiple'); + // IE8 returns a string for some attributes even when not present + return type !== 'boolean' && type !== 'string'; + }); + + // Check if getElementsByClassName can be trusted + support.getByClassName = assert(function(div) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = + ""; + if ( + !div.getElementsByClassName || + !div.getElementsByClassName('e').length + ) { + return false; + } + + // Safari 3.2 caches class attributes and doesn't catch changes + div.lastChild.className = 'e'; + return div.getElementsByClassName('e').length === 2; + }); + + // Check if getElementsByName privileges form controls or returns elements by ID + // If so, assume (for broader support) that getElementById returns elements by name + support.getByName = assert(function(div) { + // Inject content + div.id = expando + 0; + // Support: Windows 8 Native Apps + // Assigning innerHTML with "name" attributes throws uncatchable exceptions + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx + div + .appendChild(document.createElement('a')) + .setAttribute('name', expando); + div + .appendChild(document.createElement('i')) + .setAttribute('name', expando); + docElem.appendChild(div); + + // Test + var pass = + doc.getElementsByName && + // buggy browsers will return fewer than the correct 2 + doc.getElementsByName(expando).length === + 2 + + // buggy browsers will return more than the correct 0 + doc.getElementsByName(expando + 0).length; + + // Cleanup + docElem.removeChild(div); + + return pass; + }); + + // Support: Webkit<537.32 + // Detached nodes confoundingly follow *each other* + support.sortDetached = assert(function(div1) { + return ( + div1.compareDocumentPosition && + // Should return 1, but Webkit returns 4 (following) + div1.compareDocumentPosition(document.createElement('div')) & 1 + ); + }); + + // IE6/7 return modified attributes + Expr.attrHandle = assert(function(div) { + div.innerHTML = ""; + return ( + div.firstChild && + typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute('href') === '#' + ); + }) + ? {} + : { + href: function(elem) { + return elem.getAttribute('href', 2); + }, + type: function(elem) { + return elem.getAttribute('type'); + }, + }; + + // ID find and filter + if (support.getByName) { + Expr.find['ID'] = function(id, context) { + if ( + typeof context.getElementById !== strundefined && + !documentIsXML + ) { + var m = context.getElementById(id); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter['ID'] = function(id) { + var attrId = id.replace(runescape, funescape); + return function(elem) { + return elem.getAttribute('id') === attrId; + }; + }; + } else { + Expr.find['ID'] = function(id, context) { + if ( + typeof context.getElementById !== strundefined && + !documentIsXML + ) { + var m = context.getElementById(id); + + return m + ? m.id === id || + (typeof m.getAttributeNode !== strundefined && + m.getAttributeNode('id').value === id) + ? [m] + : undefined + : []; + } + }; + Expr.filter['ID'] = function(id) { + var attrId = id.replace(runescape, funescape); + return function(elem) { + var node = + typeof elem.getAttributeNode !== strundefined && + elem.getAttributeNode('id'); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find['TAG'] = support.tagNameNoComments + ? function(tag, context) { + if (typeof context.getElementsByTagName !== strundefined) { + return context.getElementsByTagName(tag); + } + } + : function(tag, context) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName(tag); + + // Filter out possible comments + if (tag === '*') { + while ((elem = results[i++])) { + if (elem.nodeType === 1) { + tmp.push(elem); + } + } + + return tmp; + } + return results; + }; + + // Name + Expr.find['NAME'] = + support.getByName && + function(tag, context) { + if (typeof context.getElementsByName !== strundefined) { + return context.getElementsByName(name); + } + }; + + // Class + Expr.find['CLASS'] = + support.getByClassName && + function(className, context) { + if ( + typeof context.getElementsByClassName !== strundefined && + !documentIsXML + ) { + return context.getElementsByClassName(className); + } + }; + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21), + // no need to also add to buggyMatches since matches checks buggyQSA + // A support test would require too much code (would include document ready) + rbuggyQSA = [':focus']; + + if ((support.qsa = isNative(doc.querySelectorAll))) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function(div) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explictly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if (!div.querySelectorAll('[selected]').length) { + rbuggyQSA.push( + '\\[' + + whitespace + + '*(?:checked|disabled|ismap|multiple|readonly|selected|value)' + ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if (!div.querySelectorAll(':checked').length) { + rbuggyQSA.push(':checked'); + } + }); + + assert(function(div) { + // Opera 10-12/IE8 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = ""; + if (div.querySelectorAll("[i^='']").length) { + rbuggyQSA.push('[*^$]=' + whitespace + '*(?:""|\'\')'); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if (!div.querySelectorAll(':enabled').length) { + rbuggyQSA.push(':enabled', ':disabled'); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll('*,:x'); + rbuggyQSA.push(',.*:'); + }); + } + + if ( + (support.matchesSelector = isNative( + (matches = + docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) + )) + ) { + assert(function(div) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call(div, 'div'); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call(div, "[s!='']:x"); + rbuggyMatches.push('!=', pseudos); + }); + } + + rbuggyQSA = new RegExp(rbuggyQSA.join('|')); + rbuggyMatches = + rbuggyMatches.length && new RegExp(rbuggyMatches.join('|')); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = + isNative(docElem.contains) || docElem.compareDocumentPosition + ? function(a, b) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return ( + a === bup || + !!( + bup && + bup.nodeType === 1 && + (adown.contains + ? adown.contains(bup) + : a.compareDocumentPosition && + a.compareDocumentPosition(bup) & 16) + ) + ); + } + : function(a, b) { + if (b) { + while ((b = b.parentNode)) { + if (b === a) { + return true; + } + } + } + return false; + }; + + // Document order sorting + sortOrder = docElem.compareDocumentPosition + ? function(a, b) { + // Flag for duplicate removal + if (a === b) { + hasDuplicate = true; + return 0; + } + + var compare = + b.compareDocumentPosition && + a.compareDocumentPosition && + a.compareDocumentPosition(b); + + if (compare) { + // Disconnected nodes + if ( + compare & 1 || + (recompare && b.compareDocumentPosition(a) === compare) + ) { + // Choose the first element that is related to our preferred document + if (a === doc || contains(preferredDoc, a)) { + return -1; + } + if (b === doc || contains(preferredDoc, b)) { + return 1; + } + + // Maintain original order + return sortInput + ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) + : 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } + : function(a, b) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [a], + bp = [b]; + + // Exit early if the nodes are identical + if (a === b) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if (!aup || !bup) { + return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : 0; + + // If the nodes are siblings, we can do a quick check + } else if (aup === bup) { + return siblingCheck(a, b); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ((cur = cur.parentNode)) { + ap.unshift(cur); + } + cur = b; + while ((cur = cur.parentNode)) { + bp.unshift(cur); + } + + // Walk down the tree looking for a discrepancy + while (ap[i] === bp[i]) { + i++; + } + + return i + ? // Do a sibling check if the nodes have a common ancestor + siblingCheck(ap[i], bp[i]) + : // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; + }; + + return document; + }; + + Sizzle.matches = function(expr, elements) { + return Sizzle(expr, null, null, elements); + }; + + Sizzle.matchesSelector = function(elem, expr) { + // Set document vars if needed + if ((elem.ownerDocument || elem) !== document) { + setDocument(elem); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace(rattributeQuotes, "='$1']"); + + // rbuggyQSA always contains :focus, so no need for an existence check + if ( + support.matchesSelector && + !documentIsXML && + (!rbuggyMatches || !rbuggyMatches.test(expr)) && + !rbuggyQSA.test(expr) + ) { + try { + var ret = matches.call(elem, expr); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( + ret || + support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + (elem.document && elem.document.nodeType !== 11) + ) { + return ret; + } + } catch (e) {} + } + + return Sizzle(expr, document, null, [elem]).length > 0; + }; + + Sizzle.contains = function(context, elem) { + // Set document vars if needed + if ((context.ownerDocument || context) !== document) { + setDocument(context); + } + return contains(context, elem); + }; + + Sizzle.attr = function(elem, name) { + var val; + + // Set document vars if needed + if ((elem.ownerDocument || elem) !== document) { + setDocument(elem); + } + + if (!documentIsXML) { + name = name.toLowerCase(); + } + if ((val = Expr.attrHandle[name])) { + return val(elem); + } + if (documentIsXML || support.attributes) { + return elem.getAttribute(name); + } + return ((val = elem.getAttributeNode(name)) || elem.getAttribute(name)) && + elem[name] === true + ? name + : val && val.specified ? val.value : null; + }; + + Sizzle.error = function(msg) { + throw new Error('Syntax error, unrecognized expression: ' + msg); + }; + + // Document sorting and removing duplicates + Sizzle.uniqueSort = function(results) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + // Compensate for sort limitations + recompare = !support.sortDetached; + sortInput = !support.sortStable && results.slice(0); + results.sort(sortOrder); + + if (hasDuplicate) { + while ((elem = results[i++])) { + if (elem === results[i]) { + j = duplicates.push(i); + } + } + while (j--) { + results.splice(duplicates[j], 1); + } + } + + return results; + }; + + /** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns Returns -1 if a precedes b, 1 if a follows b + */ + function siblingCheck(a, b) { + var cur = b && a, + diff = + cur && + (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE); + + // Use IE sourceIndex if available on both nodes + if (diff) { + return diff; + } + + // Check if b follows a + if (cur) { + while ((cur = cur.nextSibling)) { + if (cur === b) { + return -1; + } + } + } + + return a ? 1 : -1; + } + + // Returns a function to use in pseudos for input types + function createInputPseudo(type) { + return function(elem) { + var name = elem.nodeName.toLowerCase(); + return name === 'input' && elem.type === type; + }; + } + + // Returns a function to use in pseudos for buttons + function createButtonPseudo(type) { + return function(elem) { + var name = elem.nodeName.toLowerCase(); + return (name === 'input' || name === 'button') && elem.type === type; + }; + } + + // Returns a function to use in pseudos for positionals + function createPositionalPseudo(fn) { + return markFunction(function(argument) { + argument = +argument; + return markFunction(function(seed, matches) { + var j, + matchIndexes = fn([], seed.length, argument), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while (i--) { + if (seed[(j = matchIndexes[i])]) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); + } + + /** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ + getText = Sizzle.getText = function(elem) { + var node, + ret = '', + i = 0, + nodeType = elem.nodeType; + + if (!nodeType) { + // If no nodeType, this is expected to be an array + for (; (node = elem[i]); i++) { + // Do not traverse comment nodes + ret += getText(node); + } + } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if (typeof elem.textContent === 'string') { + return elem.textContent; + } else { + // Traverse its children + for (elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText(elem); + } + } + } else if (nodeType === 3 || nodeType === 4) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; + }; + + Expr = Sizzle.selectors = { + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + find: {}, + + relative: { + '>': { dir: 'parentNode', first: true }, + ' ': { dir: 'parentNode' }, + '+': { dir: 'previousSibling', first: true }, + '~': { dir: 'previousSibling' }, + }, + + preFilter: { + ATTR: function(match) { + match[1] = match[1].replace(runescape, funescape); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = (match[4] || match[5] || '').replace(runescape, funescape); + + if (match[2] === '~=') { + match[3] = ' ' + match[3] + ' '; + } + + return match.slice(0, 4); + }, + + CHILD: function(match) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if (match[1].slice(0, 3) === 'nth') { + // nth-* requires argument + if (!match[3]) { + Sizzle.error(match[0]); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +(match[4] + ? match[5] + (match[6] || 1) + : 2 * (match[3] === 'even' || match[3] === 'odd')); + match[5] = +(match[7] + match[8] || match[3] === 'odd'); + + // other types prohibit arguments + } else if (match[3]) { + Sizzle.error(match[0]); + } + + return match; + }, + + PSEUDO: function(match) { + var excess, + unquoted = !match[5] && match[2]; + + if (matchExpr['CHILD'].test(match[0])) { + return null; + } + + // Accept quoted arguments as-is + if (match[4]) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( + unquoted && + rpseudo.test(unquoted) && + // Get excess from tokenize (recursively) + (excess = tokenize(unquoted, true)) && + // advance to the next closing parenthesis + (excess = + unquoted.indexOf(')', unquoted.length - excess) - unquoted.length) + ) { + // excess is a negative index + match[0] = match[0].slice(0, excess); + match[2] = unquoted.slice(0, excess); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice(0, 3); + }, + }, + + filter: { + TAG: function(nodeName) { + if (nodeName === '*') { + return function() { + return true; + }; + } + + nodeName = nodeName.replace(runescape, funescape).toLowerCase(); + return function(elem) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + CLASS: function(className) { + var pattern = classCache[className + ' ']; + + return ( + pattern || + ((pattern = new RegExp( + '(^|' + whitespace + ')' + className + '(' + whitespace + '|$)' + )) && + classCache(className, function(elem) { + return pattern.test( + elem.className || + (typeof elem.getAttribute !== strundefined && + elem.getAttribute('class')) || + '' + ); + })) + ); + }, + + ATTR: function(name, operator, check) { + return function(elem) { + var result = Sizzle.attr(elem, name); + + if (result == null) { + return operator === '!='; + } + if (!operator) { + return true; + } + + result += ''; + + return operator === '=' + ? result === check + : operator === '!=' + ? result !== check + : operator === '^=' + ? check && result.indexOf(check) === 0 + : operator === '*=' + ? check && result.indexOf(check) > -1 + : operator === '$=' + ? check && result.slice(-check.length) === check + : operator === '~=' + ? (' ' + result + ' ').indexOf(check) > -1 + : operator === '|=' + ? result === check || + result.slice(0, check.length + 1) === check + '-' + : false; + }; + }, + + CHILD: function(type, what, argument, first, last) { + var simple = type.slice(0, 3) !== 'nth', + forward = type.slice(-4) !== 'last', + ofType = what === 'of-type'; + + return first === 1 && last === 0 + ? // Shortcut for :nth-*(n) + function(elem) { + return !!elem.parentNode; + } + : function(elem, context, xml) { + var cache, + outerCache, + node, + diff, + nodeIndex, + start, + dir = simple !== forward ? 'nextSibling' : 'previousSibling', + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if (parent) { + // :(first|last|only)-(child|of-type) + if (simple) { + while (dir) { + node = elem; + while ((node = node[dir])) { + if ( + ofType + ? node.nodeName.toLowerCase() === name + : node.nodeType === 1 + ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === 'only' && !start && 'nextSibling'; + } + return true; + } + + start = [forward ? parent.firstChild : parent.lastChild]; + + // non-xml :nth-child(...) stores cache data on `parent` + if (forward && useCache) { + // Seek `elem` from a previously-cached index + outerCache = parent[expando] || (parent[expando] = {}); + cache = outerCache[type] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[nodeIndex]; + + while ( + (node = + (++nodeIndex && node && node[dir]) || + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || + start.pop()) + ) { + // When found, cache indexes on `parent` and break + if (node.nodeType === 1 && ++diff && node === elem) { + outerCache[type] = [dirruns, nodeIndex, diff]; + break; + } + } + + // Use previously-cached element index if available + } else if ( + useCache && + (cache = (elem[expando] || (elem[expando] = {}))[type]) && + cache[0] === dirruns + ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( + (node = + (++nodeIndex && node && node[dir]) || + (diff = nodeIndex = 0) || + start.pop()) + ) { + if ( + (ofType + ? node.nodeName.toLowerCase() === name + : node.nodeType === 1) && + ++diff + ) { + // Cache the index of each encountered element + if (useCache) { + (node[expando] || (node[expando] = {}))[type] = [ + dirruns, + diff, + ]; + } + + if (node === elem) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return ( + diff === first || (diff % first === 0 && diff / first >= 0) + ); + } + }; + }, + + PSEUDO: function(pseudo, argument) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = + Expr.pseudos[pseudo] || + Expr.setFilters[pseudo.toLowerCase()] || + Sizzle.error('unsupported pseudo: ' + pseudo); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if (fn[expando]) { + return fn(argument); + } + + // But maintain support for old signatures + if (fn.length > 1) { + args = [pseudo, pseudo, '', argument]; + return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) + ? markFunction(function(seed, matches) { + var idx, + matched = fn(seed, argument), + i = matched.length; + while (i--) { + idx = indexOf.call(seed, matched[i]); + seed[idx] = !(matches[idx] = matched[i]); + } + }) + : function(elem) { + return fn(elem, 0, args); + }; + } + + return fn; + }, + }, + + pseudos: { + // Potentially complex pseudos + not: markFunction(function(selector) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile(selector.replace(rtrim, '$1')); + + return matcher[expando] + ? markFunction(function(seed, matches, context, xml) { + var elem, + unmatched = matcher(seed, null, xml, []), + i = seed.length; + + // Match elements unmatched by `matcher` + while (i--) { + if ((elem = unmatched[i])) { + seed[i] = !(matches[i] = elem); + } + } + }) + : function(elem, context, xml) { + input[0] = elem; + matcher(input, null, xml, results); + return !results.pop(); + }; + }), + + has: markFunction(function(selector) { + return function(elem) { + return Sizzle(selector, elem).length > 0; + }; + }), + + contains: markFunction(function(text) { + return function(elem) { + return ( + (elem.textContent || elem.innerText || getText(elem)).indexOf( + text + ) > -1 + ); + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + lang: markFunction(function(lang) { + // lang value must be a valid identifider + if (!ridentifier.test(lang || '')) { + Sizzle.error('unsupported lang: ' + lang); + } + lang = lang.replace(runescape, funescape).toLowerCase(); + return function(elem) { + var elemLang; + do { + if ( + (elemLang = documentIsXML + ? elem.getAttribute('xml:lang') || elem.getAttribute('lang') + : elem.lang) + ) { + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf(lang + '-') === 0; + } + } while ((elem = elem.parentNode) && elem.nodeType === 1); + return false; + }; + }), + + // Miscellaneous + target: function(elem) { + var hash = window.location && window.location.hash; + return hash && hash.slice(1) === elem.id; + }, + + root: function(elem) { + return elem === docElem; + }, + + focus: function(elem) { + return ( + elem === document.activeElement && + (!document.hasFocus || document.hasFocus()) && + !!(elem.type || elem.href || ~elem.tabIndex) + ); + }, + + // Boolean properties + enabled: function(elem) { + return elem.disabled === false; + }, + + disabled: function(elem) { + return elem.disabled === true; + }, + + checked: function(elem) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( + (nodeName === 'input' && !!elem.checked) || + (nodeName === 'option' && !!elem.selected) + ); + }, + + selected: function(elem) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if (elem.parentNode) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + empty: function(elem) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for (elem = elem.firstChild; elem; elem = elem.nextSibling) { + if ( + elem.nodeName > '@' || + elem.nodeType === 3 || + elem.nodeType === 4 + ) { + return false; + } + } + return true; + }, + + parent: function(elem) { + return !Expr.pseudos['empty'](elem); + }, + + // Element/input types + header: function(elem) { + return rheader.test(elem.nodeName); + }, + + input: function(elem) { + return rinputs.test(elem.nodeName); + }, + + button: function(elem) { + var name = elem.nodeName.toLowerCase(); + return ( + (name === 'input' && elem.type === 'button') || name === 'button' + ); + }, + + text: function(elem) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return ( + elem.nodeName.toLowerCase() === 'input' && + elem.type === 'text' && + ((attr = elem.getAttribute('type')) == null || + attr.toLowerCase() === elem.type) + ); + }, + + // Position-in-collection + first: createPositionalPseudo(function() { + return [0]; + }), + + last: createPositionalPseudo(function(matchIndexes, length) { + return [length - 1]; + }), + + eq: createPositionalPseudo(function(matchIndexes, length, argument) { + return [argument < 0 ? argument + length : argument]; + }), + + even: createPositionalPseudo(function(matchIndexes, length) { + var i = 0; + for (; i < length; i += 2) { + matchIndexes.push(i); + } + return matchIndexes; + }), + + odd: createPositionalPseudo(function(matchIndexes, length) { + var i = 1; + for (; i < length; i += 2) { + matchIndexes.push(i); + } + return matchIndexes; + }), + + lt: createPositionalPseudo(function(matchIndexes, length, argument) { + var i = argument < 0 ? argument + length : argument; + for (; --i >= 0; ) { + matchIndexes.push(i); + } + return matchIndexes; + }), + + gt: createPositionalPseudo(function(matchIndexes, length, argument) { + var i = argument < 0 ? argument + length : argument; + for (; ++i < length; ) { + matchIndexes.push(i); + } + return matchIndexes; + }), + }, + }; + + // Add button/input type pseudos + for (i in { + radio: true, + checkbox: true, + file: true, + password: true, + image: true, + }) { + Expr.pseudos[i] = createInputPseudo(i); + } + for (i in { submit: true, reset: true }) { + Expr.pseudos[i] = createButtonPseudo(i); + } + + function tokenize(selector, parseOnly) { + var matched, + match, + tokens, + type, + soFar, + groups, + preFilters, + cached = tokenCache[selector + ' ']; + + if (cached) { + return parseOnly ? 0 : cached.slice(0); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while (soFar) { + // Comma and first run + if (!matched || (match = rcomma.exec(soFar))) { + if (match) { + // Don't consume trailing commas as valid + soFar = soFar.slice(match[0].length) || soFar; + } + groups.push((tokens = [])); + } + + matched = false; + + // Combinators + if ((match = rcombinators.exec(soFar))) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace(rtrim, ' '), + }); + soFar = soFar.slice(matched.length); + } + + // Filters + for (type in Expr.filter) { + if ( + (match = matchExpr[type].exec(soFar)) && + (!preFilters[type] || (match = preFilters[type](match))) + ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match, + }); + soFar = soFar.slice(matched.length); + } + } + + if (!matched) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly + ? soFar.length + : soFar + ? Sizzle.error(selector) + : // Cache the tokens + tokenCache(selector, groups).slice(0); + } + + function toSelector(tokens) { + var i = 0, + len = tokens.length, + selector = ''; + for (; i < len; i++) { + selector += tokens[i].value; + } + return selector; + } + + function addCombinator(matcher, combinator, base) { + var dir = combinator.dir, + checkNonElements = base && dir === 'parentNode', + doneName = done++; + + return combinator.first + ? // Check against closest ancestor/preceding element + function(elem, context, xml) { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + return matcher(elem, context, xml); + } + } + } + : // Check against all ancestor/preceding elements + function(elem, context, xml) { + var data, + cache, + outerCache, + dirkey = dirruns + ' ' + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if (xml) { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + if (matcher(elem, context, xml)) { + return true; + } + } + } + } else { + while ((elem = elem[dir])) { + if (elem.nodeType === 1 || checkNonElements) { + outerCache = elem[expando] || (elem[expando] = {}); + if ((cache = outerCache[dir]) && cache[0] === dirkey) { + if ((data = cache[1]) === true || data === cachedruns) { + return data === true; + } + } else { + cache = outerCache[dir] = [dirkey]; + cache[1] = matcher(elem, context, xml) || cachedruns; + if (cache[1] === true) { + return true; + } + } + } + } + } + }; + } + + function elementMatcher(matchers) { + return matchers.length > 1 + ? function(elem, context, xml) { + var i = matchers.length; + while (i--) { + if (!matchers[i](elem, context, xml)) { + return false; + } + } + return true; + } + : matchers[0]; + } + + function condense(unmatched, map, filter, context, xml) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for (; i < len; i++) { + if ((elem = unmatched[i])) { + if (!filter || filter(elem, context, xml)) { + newUnmatched.push(elem); + if (mapped) { + map.push(i); + } + } + } + } + + return newUnmatched; + } + + function setMatcher( + preFilter, + selector, + matcher, + postFilter, + postFinder, + postSelector + ) { + if (postFilter && !postFilter[expando]) { + postFilter = setMatcher(postFilter); + } + if (postFinder && !postFinder[expando]) { + postFinder = setMatcher(postFinder, postSelector); + } + return markFunction(function(seed, results, context, xml) { + var temp, + i, + elem, + preMap = [], + postMap = [], + preexisting = results.length, + // Get initial elements from seed or context + elems = + seed || + multipleContexts( + selector || '*', + context.nodeType ? [context] : context, + [] + ), + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = + preFilter && (seed || !selector) + ? condense(elems, preMap, preFilter, context, xml) + : elems, + matcherOut = matcher + ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || (seed ? preFilter : preexisting || postFilter) + ? // ...intermediate processing is necessary + [] + : // ...otherwise use results directly + results + : matcherIn; + + // Find primary matches + if (matcher) { + matcher(matcherIn, matcherOut, context, xml); + } + + // Apply postFilter + if (postFilter) { + temp = condense(matcherOut, postMap); + postFilter(temp, [], context, xml); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while (i--) { + if ((elem = temp[i])) { + matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem); + } + } + } + + if (seed) { + if (postFinder || preFilter) { + if (postFinder) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while (i--) { + if ((elem = matcherOut[i])) { + // Restore matcherIn since elem is not yet a final match + temp.push((matcherIn[i] = elem)); + } + } + postFinder(null, (matcherOut = []), temp, xml); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while (i--) { + if ( + (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call(seed, elem) : preMap[i]) > -1 + ) { + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results + ? matcherOut.splice(preexisting, matcherOut.length) + : matcherOut + ); + if (postFinder) { + postFinder(null, results, matcherOut, xml); + } else { + push.apply(results, matcherOut); + } + } + }); + } + + function matcherFromTokens(tokens) { + var checkContext, + matcher, + j, + len = tokens.length, + leadingRelative = Expr.relative[tokens[0].type], + implicitRelative = leadingRelative || Expr.relative[' '], + i = leadingRelative ? 1 : 0, + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( + function(elem) { + return elem === checkContext; + }, + implicitRelative, + true + ), + matchAnyContext = addCombinator( + function(elem) { + return indexOf.call(checkContext, elem) > -1; + }, + implicitRelative, + true + ), + matchers = [ + function(elem, context, xml) { + return ( + (!leadingRelative && (xml || context !== outermostContext)) || + ((checkContext = context).nodeType + ? matchContext(elem, context, xml) + : matchAnyContext(elem, context, xml)) + ); + }, + ]; + + for (; i < len; i++) { + if ((matcher = Expr.relative[tokens[i].type])) { + matchers = [addCombinator(elementMatcher(matchers), matcher)]; + } else { + matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches); + + // Return special upon seeing a positional matcher + if (matcher[expando]) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for (; j < len; j++) { + if (Expr.relative[tokens[j].type]) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher(matchers), + i > 1 && toSelector(tokens.slice(0, i - 1)).replace(rtrim, '$1'), + matcher, + i < j && matcherFromTokens(tokens.slice(i, j)), + j < len && matcherFromTokens((tokens = tokens.slice(j))), + j < len && toSelector(tokens) + ); + } + matchers.push(matcher); + } + } + + return elementMatcher(matchers); + } + + function matcherFromGroupMatchers(elementMatchers, setMatchers) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function(seed, context, xml, results, expandContext) { + var elem, + j, + matcher, + setMatched = [], + matchedCount = 0, + i = '0', + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = + seed || + (byElement && + Expr.find['TAG']( + '*', + (expandContext && context.parentNode) || context + )), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += + contextBackup == null ? 1 : Math.random() || 0.1); + + if (outermost) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for (; (elem = elems[i]) != null; i++) { + if (byElement && elem) { + j = 0; + while ((matcher = elementMatchers[j++])) { + if (matcher(elem, context, xml)) { + results.push(elem); + break; + } + } + if (outermost) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if (bySet) { + // They will have gone through all possible matchers + if ((elem = !matcher && elem)) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if (seed) { + unmatched.push(elem); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if (bySet && i !== matchedCount) { + j = 0; + while ((matcher = setMatchers[j++])) { + matcher(unmatched, setMatched, context, xml); + } + + if (seed) { + // Reintegrate element matches to eliminate the need for sorting + if (matchedCount > 0) { + while (i--) { + if (!(unmatched[i] || setMatched[i])) { + setMatched[i] = pop.call(results); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense(setMatched); + } + + // Add matches to results + push.apply(results, setMatched); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( + outermost && + !seed && + setMatched.length > 0 && + matchedCount + setMatchers.length > 1 + ) { + Sizzle.uniqueSort(results); + } + } + + // Override manipulation of globals by nested matchers + if (outermost) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? markFunction(superMatcher) : superMatcher; + } + + compile = Sizzle.compile = function( + selector, + group /* Internal Use Only */ + ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[selector + ' ']; + + if (!cached) { + // Generate a function of recursive functions that can be used to check each element + if (!group) { + group = tokenize(selector); + } + i = group.length; + while (i--) { + cached = matcherFromTokens(group[i]); + if (cached[expando]) { + setMatchers.push(cached); + } else { + elementMatchers.push(cached); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers(elementMatchers, setMatchers) + ); + } + return cached; + }; + + function multipleContexts(selector, contexts, results) { + var i = 0, + len = contexts.length; + for (; i < len; i++) { + Sizzle(selector, contexts[i], results); + } + return results; + } + + function select(selector, context, results, seed) { + var i, + tokens, + token, + type, + find, + match = tokenize(selector); + + if (!seed) { + // Try to minimize operations if there is only one group + if (match.length === 1) { + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice(0); + if ( + tokens.length > 2 && + (token = tokens[0]).type === 'ID' && + context.nodeType === 9 && + !documentIsXML && + Expr.relative[tokens[1].type] + ) { + context = (Expr.find['ID']( + token.matches[0].replace(runescape, funescape), + context + ) || [])[0]; + if (!context) { + return results; + } + + selector = selector.slice(tokens.shift().value.length); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr['needsContext'].test(selector) ? 0 : tokens.length; + while (i--) { + token = tokens[i]; + + // Abort if we hit a combinator + if (Expr.relative[(type = token.type)]) { + break; + } + if ((find = Expr.find[type])) { + // Search, expanding context for leading sibling combinators + if ( + (seed = find( + token.matches[0].replace(runescape, funescape), + (rsibling.test(tokens[0].type) && context.parentNode) || + context + )) + ) { + // If seed is empty or no tokens remain, we can return early + tokens.splice(i, 1); + selector = seed.length && toSelector(tokens); + if (!selector) { + push.apply(results, seed); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile(selector, match)( + seed, + context, + documentIsXML, + results, + rsibling.test(selector) + ); + return results; + } + + // Deprecated + Expr.pseudos['nth'] = Expr.pseudos['eq']; + + // Easy API for creating new setFilters + function setFilters() {} + setFilters.prototype = Expr.filters = Expr.pseudos; + Expr.setFilters = new setFilters(); + + // Check sort stability + support.sortStable = + expando + .split('') + .sort(sortOrder) + .join('') === expando; + + // Initialize with the default document + setDocument(); + + // Always assume the presence of duplicates if sort doesn't + // pass them to our comparison function (as in Google Chrome). + [0, 0].sort(sortOrder); + support.detectDuplicates = hasDuplicate; + + // Override sizzle attribute retrieval + Sizzle.attr = jQuery.attr; + jQuery.find = Sizzle; + jQuery.expr = Sizzle.selectors; + jQuery.expr[':'] = jQuery.expr.pseudos; + jQuery.unique = Sizzle.uniqueSort; + jQuery.text = Sizzle.getText; + jQuery.isXMLDoc = Sizzle.isXML; + jQuery.contains = Sizzle.contains; + })(window); + var runtil = /Until$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + isSimple = /^.[^:#\[\.,]*$/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true, + }; + + jQuery.fn.extend({ + find: function(selector) { + var self, + matched, + i, + l = this.length; + + if (typeof selector !== 'string') { + self = this; + return this.pushStack( + jQuery(selector).filter(function() { + for (i = 0; i < l; i++) { + if (jQuery.contains(self[i], this)) { + return true; + } + } + }) + ); + } + + matched = []; + for (i = 0; i < l; i++) { + jQuery.find(selector, this[i], matched); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + matched = this.pushStack(l > 1 ? jQuery.unique(matched) : matched); + matched.selector = (this.selector ? this.selector + ' ' : '') + selector; + return matched; + }, + + has: function(target) { + var targets = jQuery(target, this), + l = targets.length; + + return this.filter(function() { + var i = 0; + for (; i < l; i++) { + if (jQuery.contains(this, targets[i])) { + return true; + } + } + }); + }, + + not: function(selector) { + return this.pushStack(winnow(this, selector, false)); + }, + + filter: function(selector) { + return this.pushStack(winnow(this, selector, true)); + }, + + is: function(selector) { + return ( + !!selector && + (typeof selector === 'string' + ? // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + rneedsContext.test(selector) + ? jQuery(selector, this.context).index(this[0]) >= 0 + : jQuery.filter(selector, this).length > 0 + : this.filter(selector).length > 0) + ); + }, + + closest: function(selectors, context) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = + rneedsContext.test(selectors) || typeof selectors !== 'string' + ? jQuery(selectors, context || this.context) + : 0; + + for (; i < l; i++) { + for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) { + // Always skip document fragments + if ( + cur.nodeType < 11 && + (pos + ? pos.index(cur) > -1 + : // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) + ) { + cur = matched.push(cur); + break; + } + } + } + + return this.pushStack( + matched.length > 1 ? jQuery.unique(matched) : matched + ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function(elem) { + // No argument, return index in parent + if (!elem) { + return this[0] && this[0].parentNode + ? this.first().prevAll().length + : -1; + } + + // index in selector + if (typeof elem === 'string') { + return core_indexOf.call(jQuery(elem), this[0]); + } + + // Locate the position of the desired element + return core_indexOf.call( + this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem + ); + }, + + add: function(selector, context) { + var set = + typeof selector === 'string' + ? jQuery(selector, context) + : jQuery.makeArray( + selector && selector.nodeType ? [selector] : selector + ), + all = jQuery.merge(this.get(), set); + + return this.pushStack(jQuery.unique(all)); + }, + + addBack: function(selector) { + return this.add( + selector == null ? this.prevObject : this.prevObject.filter(selector) + ); + }, + }); + + function sibling(cur, dir) { + while ((cur = cur[dir]) && cur.nodeType !== 1) {} + + return cur; + } + + jQuery.each( + { + parent: function(elem) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function(elem) { + return jQuery.dir(elem, 'parentNode'); + }, + parentsUntil: function(elem, i, until) { + return jQuery.dir(elem, 'parentNode', until); + }, + next: function(elem) { + return sibling(elem, 'nextSibling'); + }, + prev: function(elem) { + return sibling(elem, 'previousSibling'); + }, + nextAll: function(elem) { + return jQuery.dir(elem, 'nextSibling'); + }, + prevAll: function(elem) { + return jQuery.dir(elem, 'previousSibling'); + }, + nextUntil: function(elem, i, until) { + return jQuery.dir(elem, 'nextSibling', until); + }, + prevUntil: function(elem, i, until) { + return jQuery.dir(elem, 'previousSibling', until); + }, + siblings: function(elem) { + return jQuery.sibling((elem.parentNode || {}).firstChild, elem); + }, + children: function(elem) { + return jQuery.sibling(elem.firstChild); + }, + contents: function(elem) { + return jQuery.nodeName(elem, 'iframe') + ? elem.contentDocument || elem.contentWindow.document + : jQuery.merge([], elem.childNodes); + }, + }, + function(name, fn) { + jQuery.fn[name] = function(until, selector) { + var matched = jQuery.map(this, fn, until); + + if (!runtil.test(name)) { + selector = until; + } + + if (selector && typeof selector === 'string') { + matched = jQuery.filter(selector, matched); + } + + if (this.length > 1) { + if (!guaranteedUnique[name]) { + jQuery.unique(matched); + } + + if (rparentsprev.test(name)) { + matched.reverse(); + } + } + + return this.pushStack(matched); + }; + } + ); + + jQuery.extend({ + filter: function(expr, elems, not) { + if (not) { + expr = ':not(' + expr + ')'; + } + + return elems.length === 1 + ? jQuery.find.matchesSelector(elems[0], expr) ? [elems[0]] : [] + : jQuery.find.matches(expr, elems); + }, + + dir: function(elem, dir, until) { + var matched = [], + truncate = until !== undefined; + + while ((elem = elem[dir]) && elem.nodeType !== 9) { + if (elem.nodeType === 1) { + if (truncate && jQuery(elem).is(until)) { + break; + } + matched.push(elem); + } + } + return matched; + }, + + sibling: function(n, elem) { + var matched = []; + + for (; n; n = n.nextSibling) { + if (n.nodeType === 1 && n !== elem) { + matched.push(n); + } + } + + return matched; + }, + }); + + // Implement the identical functionality for filter and not + function winnow(elements, qualifier, keep) { + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + var filtered; + + if (jQuery.isFunction(qualifier)) { + return jQuery.grep(elements, function(elem, i) { + var retVal = !!qualifier.call(elem, i, elem); + return retVal === keep; + }); + } + + if (qualifier.nodeType) { + return jQuery.grep(elements, function(elem) { + return (elem === qualifier) === keep; + }); + } + + if (typeof qualifier === 'string') { + filtered = jQuery.grep(elements, function(elem) { + return elem.nodeType === 1; + }); + + if (isSimple.test(qualifier)) { + return jQuery.filter(qualifier, filtered, !keep); + } + + qualifier = jQuery.filter(qualifier, filtered); + } + + return jQuery.grep(elements, function(elem) { + return core_indexOf.call(qualifier, elem) >= 0 === keep; + }); + } + var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + manipulation_rcheckableType = /^(?:checkbox|radio)$/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*\s*$/g, + // We have to close these tags to support XHTML (#13200) + wrapMap = { + // Support: IE 9 + option: [1, "'], + + thead: [1, '', '
    '], + tr: [2, '', '
    '], + td: [3, '', '
    '], + + _default: [0, '', ''], + }; + + // Support: IE 9 + wrapMap.optgroup = wrapMap.option; + + wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.col = + wrapMap.thead; + wrapMap.th = wrapMap.td; + + jQuery.fn.extend({ + text: function(value) { + return jQuery.access( + this, + function(value) { + return value === undefined + ? jQuery.text(this) + : this.empty().append( + ((this[0] && this[0].ownerDocument) || document).createTextNode( + value + ) + ); + }, + null, + value, + arguments.length + ); + }, + + wrapAll: function(html) { + var wrap; + + if (jQuery.isFunction(html)) { + return this.each(function(i) { + jQuery(this).wrapAll(html.call(this, i)); + }); + } + + if (this[0]) { + // The elements to wrap the target around + wrap = jQuery(html, this[0].ownerDocument) + .eq(0) + .clone(true); + + if (this[0].parentNode) { + wrap.insertBefore(this[0]); + } + + wrap + .map(function() { + var elem = this; + + while (elem.firstElementChild) { + elem = elem.firstElementChild; + } + + return elem; + }) + .append(this); + } + + return this; + }, + + wrapInner: function(html) { + if (jQuery.isFunction(html)) { + return this.each(function(i) { + jQuery(this).wrapInner(html.call(this, i)); + }); + } + + return this.each(function() { + var self = jQuery(this), + contents = self.contents(); + + if (contents.length) { + contents.wrapAll(html); + } else { + self.append(html); + } + }); + }, + + wrap: function(html) { + var isFunction = jQuery.isFunction(html); + + return this.each(function(i) { + jQuery(this).wrapAll(isFunction ? html.call(this, i) : html); + }); + }, + + unwrap: function() { + return this.parent() + .each(function() { + if (!jQuery.nodeName(this, 'body')) { + jQuery(this).replaceWith(this.childNodes); + } + }) + .end(); + }, + + append: function() { + return this.domManip(arguments, true, function(elem) { + if ( + this.nodeType === 1 || + this.nodeType === 11 || + this.nodeType === 9 + ) { + this.appendChild(elem); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem) { + if ( + this.nodeType === 1 || + this.nodeType === 11 || + this.nodeType === 9 + ) { + this.insertBefore(elem, this.firstChild); + } + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem) { + if (this.parentNode) { + this.parentNode.insertBefore(elem, this); + } + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem) { + if (this.parentNode) { + this.parentNode.insertBefore(elem, this.nextSibling); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function(selector, keepData) { + var elem, + i = 0, + l = this.length; + + for (; i < l; i++) { + elem = this[i]; + + if (!selector || jQuery.filter(selector, [elem]).length > 0) { + if (!keepData && elem.nodeType === 1) { + jQuery.cleanData(getAll(elem)); + } + + if (elem.parentNode) { + if (keepData && jQuery.contains(elem.ownerDocument, elem)) { + setGlobalEval(getAll(elem, 'script')); + } + elem.parentNode.removeChild(elem); + } + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0, + l = this.length; + + for (; i < l; i++) { + elem = this[i]; + + if (elem.nodeType === 1) { + // Prevent memory leaks + jQuery.cleanData(getAll(elem, false)); + + // Remove any remaining nodes + elem.textContent = ''; + } + } + + return this; + }, + + clone: function(dataAndEvents, deepDataAndEvents) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = + deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function() { + return jQuery.clone(this, dataAndEvents, deepDataAndEvents); + }); + }, + + html: function(value) { + return jQuery.access( + this, + function(value) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if (value === undefined && elem.nodeType === 1) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( + typeof value === 'string' && + !rnoInnerhtml.test(value) && + !wrapMap[(rtagName.exec(value) || ['', ''])[1].toLowerCase()] + ) { + value = value.replace(rxhtmlTag, '<$1>'); + + try { + for (; i < l; i++) { + elem = this[i] || {}; + + // Remove element nodes and prevent memory leaks + if (elem.nodeType === 1) { + jQuery.cleanData(getAll(elem, false)); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch (e) {} + } + + if (elem) { + this.empty().append(value); + } + }, + null, + value, + arguments.length + ); + }, + + replaceWith: function(value) { + var isFunction = jQuery.isFunction(value); + + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if (!isFunction && typeof value !== 'string') { + value = jQuery(value) + .not(this) + .detach(); + } + + return value !== '' + ? this.domManip([value], true, function(elem) { + var next = this.nextSibling, + parent = this.parentNode; + + if (parent) { + jQuery(this).remove(); + parent.insertBefore(elem, next); + } + }) + : this.remove(); + }, + + detach: function(selector) { + return this.remove(selector, true); + }, + + domManip: function(args, table, callback) { + // Flatten any nested arrays + args = core_concat.apply([], args); + + var fragment, + first, + scripts, + hasScripts, + node, + doc, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction(value); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( + isFunction || + !( + l <= 1 || + typeof value !== 'string' || + jQuery.support.checkClone || + !rchecked.test(value) + ) + ) { + return this.each(function(index) { + var self = set.eq(index); + if (isFunction) { + args[0] = value.call(this, index, table ? self.html() : undefined); + } + self.domManip(args, table, callback); + }); + } + + if (l) { + fragment = jQuery.buildFragment( + args, + this[0].ownerDocument, + false, + this + ); + first = fragment.firstChild; + + if (fragment.childNodes.length === 1) { + fragment = first; + } + + if (first) { + table = table && jQuery.nodeName(first, 'tr'); + scripts = jQuery.map(getAll(fragment, 'script'), disableScript); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for (; i < l; i++) { + node = fragment; + + if (i !== iNoClone) { + node = jQuery.clone(node, true, true); + + // Keep references to cloned scripts for later restoration + if (hasScripts) { + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge(scripts, getAll(node, 'script')); + } + } + + callback.call( + table && jQuery.nodeName(this[i], 'table') + ? findOrAppend(this[i], 'tbody') + : this[i], + node, + i + ); + } + + if (hasScripts) { + doc = scripts[scripts.length - 1].ownerDocument; + + // Reenable scripts + jQuery.map(scripts, restoreScript); + + // Evaluate executable scripts on first document insertion + for (i = 0; i < hasScripts; i++) { + node = scripts[i]; + if ( + rscriptType.test(node.type || '') && + !data_priv.access(node, 'globalEval') && + jQuery.contains(doc, node) + ) { + if (node.src) { + // Hope ajax is available... + jQuery.ajax({ + url: node.src, + type: 'GET', + dataType: 'script', + async: false, + global: false, + throws: true, + }); + } else { + jQuery.globalEval(node.textContent.replace(rcleanScript, '')); + } + } + } + } + } + } + + return this; + }, + }); + + jQuery.each( + { + appendTo: 'append', + prependTo: 'prepend', + insertBefore: 'before', + insertAfter: 'after', + replaceAll: 'replaceWith', + }, + function(name, original) { + jQuery.fn[name] = function(selector) { + var elems, + ret = [], + insert = jQuery(selector), + last = insert.length - 1, + i = 0; + + for (; i <= last; i++) { + elems = i === last ? this : this.clone(true); + jQuery(insert[i])[original](elems); + + // Support: QtWebKit + // .get() because core_push.apply(_, arraylike) throws + core_push.apply(ret, elems.get()); + } + + return this.pushStack(ret); + }; + } + ); + + jQuery.extend({ + clone: function(elem, dataAndEvents, deepDataAndEvents) { + var i, + l, + srcElements, + destElements, + clone = elem.cloneNode(true), + inPage = jQuery.contains(elem.ownerDocument, elem); + + // Support: IE >=9 + // Fix Cloning issues + if ( + !jQuery.support.noCloneChecked && + (elem.nodeType === 1 || elem.nodeType === 11) && + !jQuery.isXMLDoc(elem) + ) { + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll(clone); + srcElements = getAll(elem); + + for (i = 0, l = srcElements.length; i < l; i++) { + fixInput(srcElements[i], destElements[i]); + } + } + + // Copy the events from the original to the clone + if (dataAndEvents) { + if (deepDataAndEvents) { + srcElements = srcElements || getAll(elem); + destElements = destElements || getAll(clone); + + for (i = 0, l = srcElements.length; i < l; i++) { + cloneCopyEvent(srcElements[i], destElements[i]); + } + } else { + cloneCopyEvent(elem, clone); + } + } + + // Preserve script evaluation history + destElements = getAll(clone, 'script'); + if (destElements.length > 0) { + setGlobalEval(destElements, !inPage && getAll(elem, 'script')); + } + + // Return the cloned set + return clone; + }, + + buildFragment: function(elems, context, scripts, selection) { + var elem, + tmp, + tag, + wrap, + contains, + j, + i = 0, + l = elems.length, + fragment = context.createDocumentFragment(), + nodes = []; + + for (; i < l; i++) { + elem = elems[i]; + + if (elem || elem === 0) { + // Add nodes directly + if (jQuery.type(elem) === 'object') { + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge(nodes, elem.nodeType ? [elem] : elem); + + // Convert non-html into a text node + } else if (!rhtml.test(elem)) { + nodes.push(context.createTextNode(elem)); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild(context.createElement('div')); + + // Deserialize a standard representation + tag = (rtagName.exec(elem) || ['', ''])[1].toLowerCase(); + wrap = wrapMap[tag] || wrapMap._default; + tmp.innerHTML = + wrap[1] + elem.replace(rxhtmlTag, '<$1>') + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while (j--) { + tmp = tmp.firstChild; + } + + // Support: QtWebKit + // jQuery.merge because core_push.apply(_, arraylike) throws + jQuery.merge(nodes, tmp.childNodes); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Fixes #12346 + // Support: Webkit, IE + tmp.textContent = ''; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ''; + + i = 0; + while ((elem = nodes[i++])) { + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if (selection && jQuery.inArray(elem, selection) !== -1) { + continue; + } + + contains = jQuery.contains(elem.ownerDocument, elem); + + // Append to fragment + tmp = getAll(fragment.appendChild(elem), 'script'); + + // Preserve script evaluation history + if (contains) { + setGlobalEval(tmp); + } + + // Capture executables + if (scripts) { + j = 0; + while ((elem = tmp[j++])) { + if (rscriptType.test(elem.type || '')) { + scripts.push(elem); + } + } + } + } + + return fragment; + }, + + cleanData: function(elems, /* internal */ acceptData) { + var data, + elem, + type, + l = elems.length, + i = 0, + special = jQuery.event.special; + + for (; i < l; i++) { + elem = elems[i]; + + if (acceptData || jQuery.acceptData(elem)) { + data = data_priv.access(elem); + + if (data) { + for (type in data.events) { + if (special[type]) { + jQuery.event.remove(elem, type); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent(elem, type, data.handle); + } + } + } + } + // Discard any remaining `private` and `user` data + data_discard(elem); + } + }, + }); + + function findOrAppend(elem, tag) { + return ( + elem.getElementsByTagName(tag)[0] || + elem.appendChild(elem.ownerDocument.createElement(tag)) + ); + } + + // Replace/restore the type attribute of script elements for safe DOM manipulation + function disableScript(elem) { + var attr = elem.getAttributeNode('type'); + elem.type = (attr && attr.specified) + '/' + elem.type; + return elem; + } + function restoreScript(elem) { + var match = rscriptTypeMasked.exec(elem.type); + + if (match) { + elem.type = match[1]; + } else { + elem.removeAttribute('type'); + } + + return elem; + } + + // Mark scripts as having already been evaluated + function setGlobalEval(elems, refElements) { + var l = elems.length, + i = 0; + + for (; i < l; i++) { + data_priv.set( + elems[i], + 'globalEval', + !refElements || data_priv.get(refElements[i], 'globalEval') + ); + } + } + + function cloneCopyEvent(src, dest) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if (dest.nodeType !== 1) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if (data_priv.hasData(src)) { + pdataOld = data_priv.access(src); + pdataCur = jQuery.extend({}, pdataOld); + events = pdataOld.events; + + data_priv.set(dest, pdataCur); + + if (events) { + delete pdataCur.handle; + pdataCur.events = {}; + + for (type in events) { + for (i = 0, l = events[type].length; i < l; i++) { + jQuery.event.add(dest, type, events[type][i]); + } + } + } + } + + // 2. Copy user data + if (data_user.hasData(src)) { + udataOld = data_user.access(src); + udataCur = jQuery.extend({}, udataOld); + + data_user.set(dest, udataCur); + } + } + + function getAll(context, tag) { + var ret = context.getElementsByTagName + ? context.getElementsByTagName(tag || '*') + : context.querySelectorAll ? context.querySelectorAll(tag || '*') : []; + + return tag === undefined || (tag && jQuery.nodeName(context, tag)) + ? jQuery.merge([context], ret) + : ret; + } + + // Support: IE >= 9 + function fixInput(src, dest) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if (nodeName === 'input' && manipulation_rcheckableType.test(src.type)) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if (nodeName === 'input' || nodeName === 'textarea') { + dest.defaultValue = src.defaultValue; + } + } + var curCSS, + iframe, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp('^(' + core_pnum + ')(.*)$', 'i'), + rnumnonpx = new RegExp('^(' + core_pnum + ')(?!px)[a-z%]+$', 'i'), + rrelNum = new RegExp('^([+-])=(' + core_pnum + ')', 'i'), + elemdisplay = { BODY: 'block' }, + cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400, + }, + cssExpand = ['Top', 'Right', 'Bottom', 'Left'], + cssPrefixes = ['Webkit', 'O', 'Moz', 'ms']; + + // return a css property mapped to a potentially vendor prefixed property + function vendorPropName(style, name) { + // shortcut for names that are not vendor prefixed + if (name in style) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while (i--) { + name = cssPrefixes[i] + capName; + if (name in style) { + return name; + } + } + + return origName; + } + + function isHidden(elem, el) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return ( + jQuery.css(elem, 'display') === 'none' || + !jQuery.contains(elem.ownerDocument, elem) + ); + } + + // NOTE: we've included the "window" in window.getComputedStyle + // because jsdom on node.js will break without it. + function getStyles(elem) { + return window.getComputedStyle(elem, null); + } + + function showHide(elements, show) { + var display, + elem, + hidden, + values = [], + index = 0, + length = elements.length; + + for (; index < length; index++) { + elem = elements[index]; + if (!elem.style) { + continue; + } + + values[index] = jQuery._data(elem, 'olddisplay'); + display = elem.style.display; + if (show) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if (!values[index] && display === 'none') { + elem.style.display = ''; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if (elem.style.display === '' && isHidden(elem)) { + values[index] = jQuery._data( + elem, + 'olddisplay', + css_defaultDisplay(elem.nodeName) + ); + } + } else { + if (!values[index]) { + hidden = isHidden(elem); + + if ((display && display !== 'none') || !hidden) { + jQuery._data( + elem, + 'olddisplay', + hidden ? display : jQuery.css(elem, 'display') + ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for (index = 0; index < length; index++) { + elem = elements[index]; + if (!elem.style) { + continue; + } + if (!show || elem.style.display === 'none' || elem.style.display === '') { + elem.style.display = show ? values[index] || '' : 'none'; + } + } + + return elements; + } + + jQuery.fn.extend({ + css: function(name, value) { + return jQuery.access( + this, + function(elem, name, value) { + var styles, + len, + map = {}, + i = 0; + + if (jQuery.isArray(name)) { + styles = getStyles(elem); + len = name.length; + + for (; i < len; i++) { + map[name[i]] = jQuery.css(elem, name[i], false, styles); + } + + return map; + } + + return value !== undefined + ? jQuery.style(elem, name, value) + : jQuery.css(elem, name); + }, + name, + value, + arguments.length > 1 + ); + }, + show: function() { + return showHide(this, true); + }, + hide: function() { + return showHide(this); + }, + toggle: function(state) { + var bool = typeof state === 'boolean'; + + return this.each(function() { + if (bool ? state : isHidden(this)) { + jQuery(this).show(); + } else { + jQuery(this).hide(); + } + }); + }, + }); + + jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function(elem, computed) { + if (computed) { + // We should always get a number back from opacity + var ret = curCSS(elem, 'opacity'); + return ret === '' ? '1' : ret; + } + }, + }, + }, + + // Exclude the following css properties to add px + cssNumber: { + columnCount: true, + fillOpacity: true, + fontWeight: true, + lineHeight: true, + opacity: true, + orphans: true, + widows: true, + zIndex: true, + zoom: true, + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + float: 'cssFloat', + }, + + // Get and set the style property on a DOM Node + style: function(elem, name, value, extra) { + // Don't set styles on text and comment nodes + if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) { + return; + } + + // Make sure that we're working with the right name + var ret, + type, + hooks, + origName = jQuery.camelCase(name), + style = elem.style; + + name = + jQuery.cssProps[origName] || + (jQuery.cssProps[origName] = vendorPropName(style, origName)); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; + + // Check if we're setting a value + if (value !== undefined) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if (type === 'string' && (ret = rrelNum.exec(value))) { + value = (ret[1] + 1) * ret[2] + parseFloat(jQuery.css(elem, name)); + // Fixes bug #9237 + type = 'number'; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if (value == null || (type === 'number' && isNaN(value))) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if (type === 'number' && !jQuery.cssNumber[origName]) { + value += 'px'; + } + + // Fixes #8908, it can be done more correctly by specifying setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( + !jQuery.support.clearCloneStyle && + value === '' && + name.indexOf('background') === 0 + ) { + style[name] = 'inherit'; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( + !hooks || + !('set' in hooks) || + (value = hooks.set(elem, value, extra)) !== undefined + ) { + style[name] = value; + } + } else { + // If a hook was provided get the non-computed value from there + if ( + hooks && + 'get' in hooks && + (ret = hooks.get(elem, false, extra)) !== undefined + ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[name]; + } + }, + + css: function(elem, name, extra, styles) { + var val, + num, + hooks, + origName = jQuery.camelCase(name); + + // Make sure that we're working with the right name + name = + jQuery.cssProps[origName] || + (jQuery.cssProps[origName] = vendorPropName(elem.style, origName)); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName]; + + // If a hook was provided get the computed value from there + if (hooks && 'get' in hooks) { + val = hooks.get(elem, true, extra); + } + + // Otherwise, if a way to get the computed value exists, use that + if (val === undefined) { + val = curCSS(elem, name, styles); + } + + //convert "normal" to computed value + if (val === 'normal' && name in cssNormalTransform) { + val = cssNormalTransform[name]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if (extra === '' || extra) { + num = parseFloat(val); + return extra === true || jQuery.isNumeric(num) ? num || 0 : val; + } + return val; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function(elem, options, callback, args) { + var ret, + name, + old = {}; + + // Remember the old values, and insert the new ones + for (name in options) { + old[name] = elem.style[name]; + elem.style[name] = options[name]; + } + + ret = callback.apply(elem, args || []); + + // Revert the old values + for (name in options) { + elem.style[name] = old[name]; + } + + return ret; + }, + }); + + curCSS = function(elem, name, _computed) { + var width, + minWidth, + maxWidth, + computed = _computed || getStyles(elem), + // Support: IE9 + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed + ? computed.getPropertyValue(name) || computed[name] + : undefined, + style = elem.style; + + if (computed) { + if (ret === '' && !jQuery.contains(elem.ownerDocument, elem)) { + ret = jQuery.style(elem, name); + } + + // Support: Chrome <17, Safari 5.1 + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if (rnumnonpx.test(ret) && rmargin.test(name)) { + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; + + function setPositiveNumber(elem, value, subtract) { + var matches = rnumsplit.exec(value); + return matches + ? // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max(0, matches[1] - (subtract || 0)) + (matches[2] || 'px') + : value; + } + + function augmentWidthOrHeight(elem, name, extra, isBorderBox, styles) { + var i = + extra === (isBorderBox ? 'border' : 'content') + ? // If we already have the right measurement, avoid augmentation + 4 + : // Otherwise initialize for horizontal or vertical properties + name === 'width' ? 1 : 0, + val = 0; + + for (; i < 4; i += 2) { + // both box models exclude margin, so add it if we want it + if (extra === 'margin') { + val += jQuery.css(elem, extra + cssExpand[i], true, styles); + } + + if (isBorderBox) { + // border-box includes padding, so remove it if we want content + if (extra === 'content') { + val -= jQuery.css(elem, 'padding' + cssExpand[i], true, styles); + } + + // at this point, extra isn't border nor margin, so remove border + if (extra !== 'margin') { + val -= jQuery.css( + elem, + 'border' + cssExpand[i] + 'Width', + true, + styles + ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css(elem, 'padding' + cssExpand[i], true, styles); + + // at this point, extra isn't content nor padding, so add border + if (extra !== 'padding') { + val += jQuery.css( + elem, + 'border' + cssExpand[i] + 'Width', + true, + styles + ); + } + } + } + + return val; + } + + function getWidthOrHeight(elem, name, extra) { + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === 'width' ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles(elem), + isBorderBox = + jQuery.support.boxSizing && + jQuery.css(elem, 'boxSizing', false, styles) === 'border-box'; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if (val <= 0 || val == null) { + // Fall back to computed then uncomputed css if necessary + val = curCSS(elem, name, styles); + if (val < 0 || val == null) { + val = elem.style[name]; + } + + // Computed unit is not pixels. Stop here and return. + if (rnumnonpx.test(val)) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = + isBorderBox && + (jQuery.support.boxSizingReliable || val === elem.style[name]); + + // Normalize "", auto, and prepare for extra + val = parseFloat(val) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( + val + + augmentWidthOrHeight( + elem, + name, + extra || (isBorderBox ? 'border' : 'content'), + valueIsBorderBox, + styles + ) + + 'px' + ); + } + + // Try to determine the default display value of an element + function css_defaultDisplay(nodeName) { + var doc = document, + display = elemdisplay[nodeName]; + + if (!display) { + display = actualDisplay(nodeName, doc); + + // If the simple way fails, read from inside an iframe + if (display === 'none' || !display) { + // Use the already-created iframe if possible + iframe = ( + iframe || + jQuery(" - -
    - -
    - -
    - -
    - -
    - -
    -
    -
    -
    - -
    - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/uikit-workshop/dist/styleguide/bower_components/EventEmitter.min.js b/packages/uikit-workshop/dist/styleguide/bower_components/EventEmitter.min.js deleted file mode 100644 index 04dabbb66..000000000 --- a/packages/uikit-workshop/dist/styleguide/bower_components/EventEmitter.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var r=e.prototype,i=this,s=i.EventEmitter;r.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp){t={};for(n in r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n])}else t=r[e]||(r[e]=[]);return t},r.flattenListeners=function(e){var t,n=[];for(t=0;t=0;c--)if(a=e[c],s=n(t,a,u),void 0!==s){o=!0;break}return o?(r||"function"!=typeof s||(s=this.mv(s,e,i)),s):!r&&""},ls:function(t,n,e,r,s){var a=this.options.delimiters;return this.options.delimiters=s,this.b(this.ct(i(t.call(n,r)),n,e)),this.options.delimiters=a,!1},ct:function(t,n,e){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(n,e)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,n,e,i,r,s,a){var o,u=n[n.length-1],c=t.call(u);return"function"==typeof c?!!i||(o=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,e,o.substring(r,s),a)):c},mv:function(t,n,e){var r=n[n.length-1],s=t.call(r);return"function"==typeof s?this.ct(i(s.call(r)),r,e):s},sub:function(t,n,e,i){var r=this.subs[t];r&&(this.activeSub=t,r(n,e,this,i),this.activeSub=!1)}};var s=/&/g,a=//g,u=/\'/g,c=/\"/g,l=/[&<>\"\']/,f=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}("undefined"!=typeof exports?exports:Hogan),function(t){function n(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function e(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function i(t,n,e){if(n.charAt(e)!=t.charAt(0))return!1;for(var i=1,r=t.length;i0;){if(f=n.shift(),l&&"<"==l.tag&&!(f.tag in k))throw new Error("Illegal content in < super tag.");if(t.tags[f.tag]<=t.tags.$||s(f,o))i.push(f),f.nodes=r(n,f.tag,i,o);else{if("/"==f.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+f.n);if(c=i.pop(),f.n!=c.n&&!a(f.n,c.n,o))throw new Error("Nesting error: "+c.n+" vs. "+f.n);return c.end=f.i,u}"\n"==f.tag&&(f.last=0==n.length||"\n"==n[0].tag)}u.push(f)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return u}function s(t,n){for(var e=0,i=n.length;e":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(r,s){function a(){m.length>0&&(x.push({tag:"_t",text:new String(m)}),m="")}function o(){for(var n=!0,e=y;e"==e.tag&&(e.indent=x[i].text.toString()),x.splice(i,1));else n||x.push({tag:"\n"});w=!1,y=x.length}function c(t,n){var i="="+S,r=t.indexOf(i,n),s=e(t.substring(t.indexOf("=",n)+1,r)).split(" ");return T=s[0],S=s[s.length-1],r+i.length-1}var l=r.length,f=0,h=1,p=2,v=f,b=null,d=null,m="",x=[],w=!1,k=0,y=0,T="{{",S="}}";for(s&&(s=s.split(" "),T=s[0],S=s[1]),k=0;k":f,"<":function(n,e){var i={partials:{},code:"",subs:{},inPartial:!0};t.walk(n.nodes,i);var r=e.partials[f(n,e)];r.subs=i.subs,r.partials=i.partials},$:function(n,e){var i={subs:{},code:"",partials:e.partials,prefix:n.n};t.walk(n.nodes,i),e.subs[n.n]=i.code,e.inPartial||(e.code+='t.sub("'+c(n.n)+'",c,p,i);')},"\n":function(t,n){n.code+=p('"\\n"'+(t.last?"":" + i"))},_v:function(t,n){n.code+="t.b(t.v(t."+l(t.n)+'("'+c(t.n)+'",c,p,0)));'},_t:function(t,n){n.code+=p('"'+c(t.text)+'"')},"{":h,"&":h},t.walk=function(n,e){for(var i,r=0,s=n.length;r0&&t-1 in e))}function r(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return U.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=he[e]={};return Z.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function s(){J.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),Z.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+a.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(be,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:xe.test(n)?Z.parseJSON(n):n)}catch(i){}ye.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return J.activeElement}catch(e){}}function p(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;n")).appendTo(t.documentElement),t=We[0].contentDocument,t.write(),t.close(),n=x(e,t),We.detach()),$e[e]=n),n}function w(e,t,n){var r,i,o,s,a=e.style;return n=n||_e(e),n&&(s=n.getPropertyValue(t)||n[t]),n&&(""!==s||Z.contains(e.ownerDocument,e)||(s=Z.style(e,t)),Be.test(s)&&Ie.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function T(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,i=Ge.length;i--;)if(t=Ge[i]+n,t in e)return t;return r}function N(e,t,n){var r=Xe.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=Z.css(e,n+Te[o],!0,i)),r?("content"===n&&(s-=Z.css(e,"padding"+Te[o],!0,i)),"margin"!==n&&(s-=Z.css(e,"border"+Te[o]+"Width",!0,i))):(s+=Z.css(e,"padding"+Te[o],!0,i),"padding"!==n&&(s+=Z.css(e,"border"+Te[o]+"Width",!0,i)));return s}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=_e(e),s="border-box"===Z.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(i=w(e,t,o),(i<0||null==i)&&(i=e.style[t]),Be.test(i))return i;r=s&&(Q.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(s?"border":"content"),r,o)+"px"}function S(e,t){for(var n,r,i,o=[],s=0,a=e.length;s=0&&n=0},isPlainObject:function(e){return"object"===Z.type(e)&&!e.nodeType&&!Z.isWindow(e)&&!(e.constructor&&!G.call(e.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?V[Y.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Z.trim(e),e&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,re)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,s=e.length,a=n(e);if(r){if(a)for(;oT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[W]=!0,e}function i(e){var t=q.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)T.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function p(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(s[l]=f))}}else x=m(x===s?x.splice(h,x.length):x),o?o(null,s,x,u):K.apply(s,x)})}function y(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],s=o||T.relative[" "],a=o?1:0,u=d(function(e){return e===t},s,!0),l=d(function(e){return ee(t,e)>-1},s,!0),c=[function(e,n,r){var i=!o&&(r||n!==D)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];a1&&h(c),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ue,"$1"),n,a0,o=e.length>0,s=function(r,s,a,u,l){var c,f,p,d=0,h="0",g=r&&[],v=[],y=D,x=r||o&&T.find.TAG("*",l),b=I+=null==y?1:Math.random()||.1,w=x.length;for(l&&(D=s!==q&&s);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0;p=e[f++];)if(p(c,s,a)){u.push(c);break}l&&(I=b)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,v,s,a);if(r){if(d>0)for(;h--;)g[h]||v[h]||(v[h]=Q.call(u));v=m(v)}K.apply(u,v),l&&!r&&v.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&(I=b,D=y),g};return i?r(s):s}var b,w,T,C,N,k,E,S,D,j,A,L,q,H,O,F,P,R,M,W="sizzle"+1*new Date,$=e.document,I=0,B=0,_=n(),z=n(),X=n(),U=function(e,t){return e===t&&(A=!0),0},V=1<<31,Y={}.hasOwnProperty,G=[],Q=G.pop,J=G.push,K=G.push,Z=G.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),fe=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),pe=new RegExp(se),de=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xe=/[+~]/,be=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),Te=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Ce=function(){L()};try{K.apply(G=Z.call($.childNodes),$.childNodes),G[$.childNodes.length].nodeType}catch(Ne){K={apply:G.length?function(e,t){J.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},N=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:$;return r!==q&&9===r.nodeType&&r.documentElement?(q=r,H=r.documentElement,n=r.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),O=!N(r),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ve.test(r.getElementsByClassName),w.getById=i(function(e){return H.appendChild(e).id=W,!r.getElementsByName||!r.getElementsByName(W).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&O){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(we,Te);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(we,Te);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if(O)return t.getElementsByClassName(e)},P=[],F=[],(w.qsa=ve.test(r.querySelectorAll))&&(i(function(e){H.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+W+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+W+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=ve.test(R=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&i(function(e){w.disconnectedMatch=R.call(e,"div"),R.call(e,"[s!='']:x"),P.push("!=",se)}),F=F.length&&new RegExp(F.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(H.compareDocumentPosition),M=t||ve.test(H.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===$&&M($,e)?-1:t===r||t.ownerDocument===$&&M($,t)?1:j?ee(j,e)-ee(j,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:j?ee(j,e)-ee(j,t):0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===$?-1:l[i]===$?1:0},r):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&L(e),n=n.replace(fe,"='$1']"),w.matchesSelector&&O&&(!P||!P.test(n))&&(!F||!F.test(n)))try{var r=R.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&L(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==r?r:w.attributes||!O?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!w.detectDuplicates,j=!w.sortStable&&e.slice(0),e.sort(U),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return j=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,Te),e[3]=(e[3]||e[4]||e[5]||"").replace(we,Te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pe.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,Te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&_(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&y){for(c=m[W]||(m[W]={}),l=c[e]||[],d=l[0]===I&&l[1],p=l[0]===I&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[I,d,p];break}}else if(y&&(l=(t[W]||(t[W]={}))[e])&&l[0]===I)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((a?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++p||(y&&((f[W]||(f[W]={}))[e]=[I,p]),f!==t)););return p-=i,p===r||p%r===0&&p/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[W]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=ee(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(ue,"$1"));return i[W]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(we,Te),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,Te).toLowerCase(),function(t){var n;do if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return ge.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=o[0]).type&&w.getById&&9===t.nodeType&&O&&T.relative[o[1].type]){if(t=(T.find.ID(s.matches[0].replace(we,Te),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(s=o[i],!T.relative[a=s.type]);)if((u=T.find[a])&&(r=u(s.matches[0].replace(we,Te),xe.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return K.apply(n,r),n;break}}return(l||E(e,f))(r,t,!O,n,xe.test(e)&&c(t.parentNode)||t),n},w.sortStable=W.split("").sort(U).join("")===W,w.detectDuplicates=!!A,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);Z.find=ie,Z.expr=ie.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=ie.uniqueSort,Z.text=ie.getText,Z.isXMLDoc=ie.isXML,Z.contains=ie.contains;var oe=Z.expr.match.needsContext,se=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/;Z.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Z.find.matchesSelector(r,e)?[r]:[]:Z.find.matches(e,Z.grep(t,function(e){return 1===e.nodeType}))},Z.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(Z(e).filter(function(){ -for(t=0;t1?Z.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&oe.test(e)?Z(e):e||[],!1).length}});var ue,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=Z.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ue).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Z?t[0]:t,Z.merge(this,Z.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),se.test(n[1])&&Z.isPlainObject(t))for(n in t)Z.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=J.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Z.isFunction(e)?"undefined"!=typeof ue.ready?ue.ready(e):e(Z):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))};ce.prototype=Z.fn,ue=Z(J);var fe=/^(?:parents|prev(?:Until|All))/,pe={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Z(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Z.fn.extend({has:function(e){var t=Z(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&Z.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(e){return e?"string"==typeof e?U.call(Z(e),this[0]):U.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Z.unique(Z.merge(this.get(),Z(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Z.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Z.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z.dir(e,"previousSibling",n)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(n,r){var i=Z.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Z.filter(r,i)),this.length>1&&(pe[e]||Z.unique(i),fe.test(e)&&i.reverse()),this.pushStack(i)}});var de=/\S+/g,he={};Z.Callbacks=function(e){e="string"==typeof e?he[e]||o(e):Z.extend({},e);var t,n,r,i,s,a,u=[],l=!e.once&&[],c=function(o){for(t=e.memory&&o,n=!0,a=i||0,i=0,s=u.length,r=!0;u&&a-1;)u.splice(n,1),r&&(n<=s&&s--,n<=a&&a--)}),this},has:function(e){return e?Z.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],s=0,this},disable:function(){return u=l=t=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!u||n&&!l||(t=t||[],t=[e,t.slice?t.slice():t],r?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(n){Z.each(t,function(t,o){var s=Z.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Z.extend(e,r):r}},i={};return r.pipe=r.then,Z.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=_.call(arguments),s=o.length,a=1!==s||e&&Z.isFunction(e.promise)?s:0,u=1===a?e:Z.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?_.call(arguments):i,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);i0||(ge.resolveWith(J,[Z]),Z.fn.triggerHandler&&(Z(J).triggerHandler("ready"),Z(J).off("ready"))))}}),Z.ready.promise=function(t){return ge||(ge=Z.Deferred(),"complete"===J.readyState?setTimeout(Z.ready):(J.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1))),ge.promise(t)},Z.ready.promise();var me=Z.access=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===Z.type(n)){i=!0;for(a in n)Z.access(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,Z.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(Z(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){ye.remove(this,e)})}}),Z.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ve.get(e,t),n&&(!r||Z.isArray(n)?r=ve.access(e,t,Z.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Z.queue(e,t),r=n.length,i=n.shift(),o=Z._queueHooks(e,t),s=function(){Z.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ve.get(e,n)||ve.access(e,n,{empty:Z.Callbacks("once memory").add(function(){ve.remove(e,[t+"queue",n])})})}}),Z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.lengthx",Q.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var ke="undefined";Q.focusinBubbles="onfocusin"in e;var Ee=/^key/,Se=/^(?:mouse|pointer|contextmenu)|click/,De=/^(?:focusinfocus|focusoutblur)$/,je=/^([^.]*)(?:\.(.+)|)$/;Z.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ve.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=Z.guid++),(u=m.events)||(u=m.events={}),(s=m.handle)||(s=m.handle=function(t){return typeof Z!==ke&&Z.event.triggered!==t.type?Z.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(de)||[""],l=t.length;l--;)a=je.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d&&(f=Z.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=Z.event.special[d]||{},c=Z.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Z.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(d,s,!1)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),Z.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ve.hasData(e)&&ve.get(e);if(m&&(u=m.events)){for(t=(t||"").match(de)||[""],l=t.length;l--;)if(a=je.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d){for(f=Z.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||Z.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)Z.event.remove(e,d+t[l],n,r,!0);Z.isEmptyObject(u)&&(delete m.handle,ve.remove(e,"events"))}},trigger:function(t,n,r,i){var o,s,a,u,l,c,f,p=[r||J],d=G.call(t,"type")?t.type:t,h=G.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||J,3!==r.nodeType&&8!==r.nodeType&&!De.test(d+Z.event.triggered)&&(d.indexOf(".")>=0&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexOf(":")<0&&"on"+d,t=t[Z.expando]?t:new Z.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Z.makeArray(n,[t]),f=Z.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!Z.isWindow(r)){for(u=f.delegateType||d,De.test(u+d)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||J)&&p.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||d,c=(ve.get(s,"events")||{})[t.type]&&ve.get(s,"handle"),c&&c.apply(s,n),c=l&&s[l],c&&c.apply&&Z.acceptData(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),n)!==!1||!Z.acceptData(r)||l&&Z.isFunction(r[d])&&!Z.isWindow(r)&&(a=r[l],a&&(r[l]=null),Z.event.triggered=d,r[d](),Z.event.triggered=void 0,a&&(r[l]=a)),t.result}},dispatch:function(e){e=Z.event.fix(e);var t,n,r,i,o,s=[],a=_.call(arguments),u=(ve.get(this,"events")||{})[e.type]||[],l=Z.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(s=Z.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((Z.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;n=0:Z.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return a]*)\/>/gi,Le=/<([\w:]+)/,qe=/<|&#?\w+;/,He=/<(?:script|style|link)/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Fe=/^$|\/(?:java|ecma)script/i,Pe=/^true\/(.*)/,Re=/^\s*\s*$/g,Me={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};Me.optgroup=Me.option,Me.tbody=Me.tfoot=Me.colgroup=Me.caption=Me.thead,Me.th=Me.td,Z.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=Z.contains(e.ownerDocument,e);if(!(Q.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(s=v(a),o=v(e),r=0,i=o.length;r0&&g(s,!u&&v(e,"script")),a},buildFragment:function(e,t,n,r){for(var i,o,s,a,u,l,c=t.createDocumentFragment(),f=[],p=0,d=e.length;p")+a[2],l=a[0];l--;)o=o.lastChild;Z.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(i));for(c.textContent="",p=0;i=f[p++];)if((!r||Z.inArray(i,r)===-1)&&(u=Z.contains(i.ownerDocument,i),o=v(c.appendChild(i),"script"),u&&g(o),n))for(l=0;i=o[l++];)Fe.test(i.type||"")&&n.push(i);return c},cleanData:function(e){for(var t,n,r,i,o=Z.event.special,s=0;void 0!==(n=e[s]);s++){if(Z.acceptData(n)&&(i=n[ve.expando],i&&(t=ve.cache[i]))){if(t.events)for(r in t.events)o[r]?Z.event.remove(n,r):Z.removeEvent(n,r,t.handle);ve.cache[i]&&delete ve.cache[i]}delete ye.cache[n[ye.expando]]}}}),Z.fn.extend({text:function(e){return me(this,function(e){return void 0===e?Z.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?Z.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||Z.cleanData(v(n)),n.parentNode&&(t&&Z.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Z.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Z.clone(this,e,t)})},html:function(e){return me(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!He.test(e)&&!Me[(Le.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ae,"<$1>");try{for(;n1&&"string"==typeof p&&!Q.checkClone&&Oe.test(p))return this.each(function(n){var r=c.eq(n);g&&(e[0]=p.call(this,n,r.html())),r.domManip(e,t)});if(l&&(n=Z.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=Z.map(v(n,"script"),d),o=i.length;u1)},show:function(){return S(this,!0)},hide:function(){return S(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ce(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=D,D.prototype={constructor:D,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var e=D.propHooks[this.prop];return e&&e.get?e.get(this):D.propHooks._default.get(this)},run:function(e){var t,n=D.propHooks[this.prop];return this.options.duration?this.pos=t=Z.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):D.propHooks._default.set(this),this}},D.prototype.init.prototype=D.prototype,D.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},D.propHooks.scrollTop=D.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.fx=D.prototype.init,Z.fx.step={};var Qe,Je,Ke=/^(?:toggle|show|hide)$/,Ze=new RegExp("^(?:([+-])=|)("+we+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[q],nt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Ze.exec(t),o=i&&i[3]||(Z.cssNumber[e]?"":"px"),s=(Z.cssNumber[e]||"px"!==o&&+r)&&Ze.exec(Z.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,Z.style(n.elem,e,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};Z.Animation=Z.extend(O,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})}}),Z.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===ke?Z.prop(e,t,n):(1===o&&Z.isXMLDoc(e)||(t=t.toLowerCase(),r=Z.attrHooks[t]||(Z.expr.match.bool.test(t)?it:rt)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=Z.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void Z.removeAttr(e,t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(de);if(o&&1===e.nodeType)for(;n=o[i++];)r=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!Q.radioValue&&"radio"===t&&Z.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),it={set:function(e,t,n){return t===!1?Z.removeAttr(e,n):e.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||Z.find.attr;ot[t]=function(e,t,r){var i,o;return r||(o=ot[t],ot[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ot[t]=o),i}});var st=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(e,t){return me(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Z.propFix[e]||e]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return o=1!==s||!Z.isXMLDoc(e),o&&(t=Z.propFix[t]||t,i=Z.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||st.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),Q.optSelected||(Z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var at=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(e){var t,n,r,i,o,s,a="string"==typeof e&&e,u=0,l=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(de)||[];u=0;)r=r.replace(" "+i+" "," ");s=e?Z.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):Z.isFunction(e)?this.each(function(n){Z(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,r=0,i=Z(this),o=e.match(de)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else n!==ke&&"boolean"!==n||(this.className&&ve.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ve.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;n=0)return!0;return!1}});var ut=/\r/g;Z.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=Z.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,Z(this).val()):e,null==i?i="":"number"==typeof i?i+="":Z.isArray(i)&&(i=Z.map(i,function(e){return null==e?"":e+""})),t=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=Z.valHooks[i.type]||Z.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(ut,""):null==n?"":n)}}}),Z.extend({valHooks:{option:{get:function(e){var t=Z.find.attr(e,"value");return null!=t?t:Z.trim(Z.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:r.length,u=i<0?a:o?i:0;u=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(e,t){if(Z.isArray(t))return e.checked=Z.inArray(Z(e).val(),t)>=0}},Q.checkOn||(Z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Z.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Z.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Z.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var lt=Z.now(),ct=/\?/;Z.parseJSON=function(e){return JSON.parse(e+"")},Z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||Z.error("Invalid XML: "+e),t};var ft=/#.*$/,pt=/([?&])_=[^&]*/,dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,ht=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gt=/^(?:GET|HEAD)$/,mt=/^\/\//,vt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,yt={},xt={},bt="*/".concat("*"),wt=e.location.href,Tt=vt.exec(wt.toLowerCase())||[];Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt,type:"GET",isLocal:ht.test(Tt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?R(R(e,Z.ajaxSettings),t):R(Z.ajaxSettings,e)},ajaxPrefilter:F(yt),ajaxTransport:F(xt),ajax:function(e,t){function n(e,t,n,s){var u,c,v,y,b,T=t;2!==x&&(x=2,a&&clearTimeout(a),r=void 0,o=s||"",w.readyState=e>0?4:0,u=e>=200&&e<300||304===e,n&&(y=M(f,w,n)),y=W(f,y,w,u),u?(f.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(Z.lastModified[i]=b),b=w.getResponseHeader("etag"),b&&(Z.etag[i]=b)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=y.state,c=y.data,v=y.error,u=!v)):(v=T,!e&&T||(T="error",e<0&&(e=0))),w.status=e,w.statusText=(t||T)+"",u?h.resolveWith(p,[c,T,w]):h.rejectWith(p,[w,T,v]),w.statusCode(m),m=void 0,l&&d.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?c:v]),g.fireWith(p,[w,T]),l&&(d.trigger("ajaxComplete",[w,f]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,a,u,l,c,f=Z.ajaxSetup({},t),p=f.context||f,d=f.context&&(p.nodeType||p.jquery)?Z(p):Z.event,h=Z.Deferred(),g=Z.Callbacks("once memory"),m=f.statusCode||{},v={},y={},x=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=dt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(x<2)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return r&&r.abort(t),n(0,t),this}};if(h.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||wt)+"").replace(ft,"").replace(mt,Tt[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=Z.trim(f.dataType||"*").toLowerCase().match(de)||[""],null==f.crossDomain&&(u=vt.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===Tt[1]&&u[2]===Tt[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(Tt[3]||("http:"===Tt[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=Z.param(f.data,f.traditional)),P(yt,f,t,w),2===x)return w;l=Z.event&&f.global,l&&0===Z.active++&&Z.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!gt.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(ct.test(i)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=pt.test(i)?i.replace(pt,"$1_="+lt++):i+(ct.test(i)?"&":"?")+"_="+lt++)),f.ifModified&&(Z.lastModified[i]&&w.setRequestHeader("If-Modified-Since",Z.lastModified[i]),Z.etag[i]&&w.setRequestHeader("If-None-Match",Z.etag[i])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+bt+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)w.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(f.beforeSend.call(p,w,f)===!1||2===x))return w.abort();b="abort";for(c in{success:1,error:1,complete:1})w[c](f[c]);if(r=P(xt,f,t,w)){w.readyState=1,l&&d.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(a=setTimeout(function(){w.abort("timeout")},f.timeout));try{x=1,r.send(v,n)}catch(T){if(!(x<2))throw T;n(-1,T)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return Z.get(e,t,n,"json")},getScript:function(e,t){return Z.get(e,void 0,t,"script")}}),Z.each(["get","post"],function(e,t){Z[t]=function(e,n,r,i){return Z.isFunction(n)&&(i=i||r,r=n,n=void 0),Z.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),Z._evalUrl=function(e){return Z.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Z.fn.extend({wrapAll:function(e){var t;return Z.isFunction(e)?this.each(function(t){Z(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Z(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return Z.isFunction(e)?this.each(function(t){Z(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Z(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Z.isFunction(e);return this.each(function(n){Z(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()}}),Z.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Z.expr.filters.visible=function(e){return!Z.expr.filters.hidden(e)};var Ct=/%20/g,Nt=/\[\]$/,kt=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;Z.param=function(e,t){var n,r=[],i=function(e,t){t=Z.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(e)||e.jquery&&!Z.isPlainObject(e))Z.each(e,function(){i(this.name,this.value)});else for(n in e)$(n,e[n],t,i);return r.join("&").replace(Ct,"+")},Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Z.prop(this,"elements");return e?Z.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Z(this).is(":disabled")&&St.test(this.nodeName)&&!Et.test(e)&&(this.checked||!Ne.test(e))}).map(function(e,t){var n=Z(this).val();return null==n?null:Z.isArray(n)?Z.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}}),Z.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Dt=0,jt={},At={0:200,1223:204},Lt=Z.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in jt)jt[e]()}),Q.cors=!!Lt&&"withCredentials"in Lt,Q.ajax=Lt=!!Lt,Z.ajaxTransport(function(e){var t;if(Q.cors||Lt&&!e.crossDomain)return{send:function(n,r){var i,o=e.xhr(),s=++Dt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete jt[s],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(At[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=jt[s]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Z.globalEval(e),e}}}),Z.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Z.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=Z(" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Pattern Lab + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/packages/uikit-workshop/src/html/partials/base-template.html b/packages/uikit-workshop/src/html/partials/base-template.html old mode 100644 new mode 100755 index 025683798..2fbe8ae72 --- a/packages/uikit-workshop/src/html/partials/base-template.html +++ b/packages/uikit-workshop/src/html/partials/base-template.html @@ -1,121 +1,176 @@ {{# descBlockExists }} -
    - - {{# isPatternView }} - -
    - -
      - - {{# patternBreadcrumb }} - -
    • {{ patternType }}
    • - - {{# patternSubtype }} -
    • {{ patternSubtype }}
    • - {{/ patternSubtype }} - - {{/ patternBreadcrumb }} - -
    - -

    - {{ patternName }} - - {{# patternState }} - - {{/ patternState }} -

    - -
    - {{/ isPatternView }} - - {{# patternDescExists }} -
    - {{{ patternDesc }}} {{# patternDescAdditions }} {{{ patternDescAdditions }}} {{/ patternDescAdditions }} -
    - {{/ patternDescExists }} - - {{# lineageExists }} -

    - The {{ patternName }} pattern contains the following patterns: - {{# lineage }} - - {{ lineagePattern }} - {{# lineageState }}{{/ lineageState }} - - {{# hasComma }}, {{/ hasComma }} - {{/ lineage }} - -

    - {{/ lineageExists }} - - {{# lineageRExists }} -

    - The {{ patternName }} pattern is included in the following patterns: - {{# lineageR }} - - {{ lineagePattern }} - {{# lineageState }}{{/ lineageState }} - - {{# hasComma }}, {{/ hasComma }} - {{/ lineageR }} -

    - {{/ lineageRExists }} - - {{# annotationExists }} -
    -

    Annotations

    -
      - - {{# annotations }} -
    1. - -

      {{ title }}

      - -
      - {{{ comment }}} -
      - -
    2. - {{/ annotations }} - -
    - -
    - {{/ annotationExists }} - -
    +
    + {{# isPatternView }} + +
    +
      + {{# patternBreadcrumb }} + +
    • {{ patternType }}
    • + + {{# patternSubtype }} +
    • {{ patternSubtype }}
    • + {{/ patternSubtype }} {{/ patternBreadcrumb }} +
    + + +

    + {{ patternName }} {{# patternState }} + + {{/ patternState }} +

    + +
    + + {{/ isPatternView }} {{# patternDescExists }} +
    + {{{ patternDesc }}} {{# patternDescAdditions }} {{{ patternDescAdditions }}} + {{/ patternDescAdditions }} +
    + + {{/ patternDescExists }} {{# lineageExists }} +

    + The + {{ patternName }} + pattern contains the following patterns: {{# lineage }} + + {{ lineagePattern }} {{# lineageState }} + {{/ lineageState }} + + + {{# hasComma }}, {{/ hasComma }} {{/ lineage }} +

    + + {{/ lineageExists }} {{# lineageRExists }} +

    + The + {{ patternName }} + pattern is included in the following patterns: {{# lineageR }} + + {{ lineagePattern }} {{# lineageState }} + {{/ lineageState }} + + + {{# hasComma }}, {{/ hasComma }} {{/ lineageR }} +

    + + {{/ lineageRExists }} {{# annotationExists }} +
    +

    Annotations

    +
      + {{# annotations }} +
    1. +

      {{ title }}

      + +
      + {{{ comment }}} +
      + +
    2. + + {{/ annotations }} +
    + +
    + + {{/ annotationExists }} +
    + {{/ descBlockExists }}
    - -
    -
    -
      - {{# panels }} -
    • - {{ name }} -
    • - {{/ panels }} -
    -
    - -
    - - {{# panels }} -
    - - - {{{ content }}} -
    - {{/ panels }} - -
    - -
    - -
    +
    +
    +
      + {{# panels }} +
    • + {{ name }} +
    • + + {{/ panels }} +
    + +
    + + +
    + {{# panels }} +
    + + {{{ content }}} +
    + + {{/ panels }} +
    + +
    + +
    + diff --git a/packages/uikit-workshop/src/html/partials/controls.html b/packages/uikit-workshop/src/html/partials/controls.html deleted file mode 100644 index 020e7da53..000000000 --- a/packages/uikit-workshop/src/html/partials/controls.html +++ /dev/null @@ -1,80 +0,0 @@ - -
    - - -
    - -
      - {{^ ishControlsHide.s }} -
    • - -
    • - {{/ ishControlsHide.s }} - - {{^ ishControlsHide.m }} -
    • - -
    • - {{/ ishControlsHide.m }} - - {{^ ishControlsHide.l }} -
    • - -
    • - {{/ ishControlsHide.l }} - - {{^ ishControlsHide.full }} -
    • - -
    • - {{/ ishControlsHide.full }} - - {{^ ishControlsHide.random }} -
    • - -
    • - {{/ ishControlsHide.random }} - - {{^ ishControlsHide.disco }} -
    • - -
    • - {{/ ishControlsHide.disco }} - - {{^ ishControlsHide.hay }} -
    • - -
    • - {{/ ishControlsHide.hay }} -
    - -{{^ ishControlsHide.tools-all }} -
    - - -
      -
    • - -
    • - {{^ ishControlsHide.views-new }} -
    • - Open In New Window -
    • - {{/ ishControlsHide.views-new }} - - {{^ ishControlsHide.tools-docs }} -
    • - Pattern Lab Docs -
    • - {{/ ishControlsHide.tools-docs }} - -
    -
    -{{/ ishControlsHide.tools-all }} \ No newline at end of file diff --git a/packages/uikit-workshop/src/html/partials/header.html b/packages/uikit-workshop/src/html/partials/header.html deleted file mode 100644 index 3f94d6f11..000000000 --- a/packages/uikit-workshop/src/html/partials/header.html +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/packages/uikit-workshop/src/html/partials/iframe.html b/packages/uikit-workshop/src/html/partials/iframe.html deleted file mode 100644 index 3b91bde97..000000000 --- a/packages/uikit-workshop/src/html/partials/iframe.html +++ /dev/null @@ -1,17 +0,0 @@ -
    - -
    - -
    - - - -
    - -
    - -
    - -
    - -
    \ No newline at end of file diff --git a/packages/uikit-workshop/src/html/partials/modal.html b/packages/uikit-workshop/src/html/partials/modal.html deleted file mode 100644 index febc7cc17..000000000 --- a/packages/uikit-workshop/src/html/partials/modal.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -
    -
    -
    - -
    - -
    - -
    diff --git a/packages/uikit-workshop/src/html/partials/panel-code-template.html b/packages/uikit-workshop/src/html/partials/panel-code-template.html index 10aed4319..d8e59fb4d 100644 --- a/packages/uikit-workshop/src/html/partials/panel-code-template.html +++ b/packages/uikit-workshop/src/html/partials/panel-code-template.html @@ -1,3 +1,3 @@
    -	{{{ code }}}
    +{{{ code }}}
     
    diff --git a/packages/uikit-workshop/src/html/partials/pattern-nav.html b/packages/uikit-workshop/src/html/partials/pattern-nav.html deleted file mode 100644 index 972ef434b..000000000 --- a/packages/uikit-workshop/src/html/partials/pattern-nav.html +++ /dev/null @@ -1,59 +0,0 @@ -{{# patternTypes }} -
  • - - {{ patternTypeUC }} - -
      - - {{# patternTypeItems }} -
    1. - - {{ patternSubtypeUC }} - -
        - - {{# patternSubtypeItems }} -
      1. - - - {{ patternName }} - - {{# patternState }} - - {{/ patternState }} - - - -
      2. - {{/ patternSubtypeItems }} - -
      - -
    2. - {{/ patternTypeItems }} - {{# patternItems }} -
    3. - - - {{ patternName }} - - {{# patternState }} - - {{/ patternState }} - - - -
    4. - {{/ patternItems }} - -
    - -
  • -{{/ patternTypes }} - -
  • - - All - -
  • - diff --git a/packages/uikit-workshop/src/icons/arrow-down.svg b/packages/uikit-workshop/src/icons/arrow-down.svg new file mode 100644 index 000000000..510ce6bdc --- /dev/null +++ b/packages/uikit-workshop/src/icons/arrow-down.svg @@ -0,0 +1,5 @@ + + +arrow_drop_down + + diff --git a/packages/uikit-workshop/src/icons/close.svg b/packages/uikit-workshop/src/icons/close.svg new file mode 100644 index 000000000..efa3715ff --- /dev/null +++ b/packages/uikit-workshop/src/icons/close.svg @@ -0,0 +1,5 @@ + + +close + + diff --git a/packages/uikit-workshop/src/icons/code-collapse.svg b/packages/uikit-workshop/src/icons/code-collapse.svg new file mode 100644 index 000000000..10e66e73a --- /dev/null +++ b/packages/uikit-workshop/src/icons/code-collapse.svg @@ -0,0 +1,6 @@ + +hide-code + + + + diff --git a/packages/uikit-workshop/src/icons/code-expand.svg b/packages/uikit-workshop/src/icons/code-expand.svg new file mode 100644 index 000000000..feb7446ce --- /dev/null +++ b/packages/uikit-workshop/src/icons/code-expand.svg @@ -0,0 +1,5 @@ + +show-code + + + \ No newline at end of file diff --git a/packages/uikit-workshop/src/icons/copy.svg b/packages/uikit-workshop/src/icons/copy.svg new file mode 100644 index 000000000..5354f8d85 --- /dev/null +++ b/packages/uikit-workshop/src/icons/copy.svg @@ -0,0 +1,4 @@ + +copy + + \ No newline at end of file diff --git a/packages/uikit-workshop/src/icons/desktop.svg b/packages/uikit-workshop/src/icons/desktop.svg new file mode 100644 index 000000000..48c9f6f11 --- /dev/null +++ b/packages/uikit-workshop/src/icons/desktop.svg @@ -0,0 +1,5 @@ + + +desktop_mac + + diff --git a/packages/uikit-workshop/src/icons/disco-ball.svg b/packages/uikit-workshop/src/icons/disco-ball.svg new file mode 100644 index 000000000..6ec7b3bfb --- /dev/null +++ b/packages/uikit-workshop/src/icons/disco-ball.svg @@ -0,0 +1,15 @@ + + + + Artboard + Created with Sketch. + + + + + + + + + + diff --git a/packages/uikit-workshop/src/icons/help.svg b/packages/uikit-workshop/src/icons/help.svg new file mode 100644 index 000000000..016e9271a --- /dev/null +++ b/packages/uikit-workshop/src/icons/help.svg @@ -0,0 +1,5 @@ + + +help_outline + + diff --git a/packages/uikit-workshop/src/icons/hide.svg b/packages/uikit-workshop/src/icons/hide.svg new file mode 100644 index 000000000..f9513c403 --- /dev/null +++ b/packages/uikit-workshop/src/icons/hide.svg @@ -0,0 +1,5 @@ + + +view-hide + + diff --git a/packages/uikit-workshop/src/icons/laptop.svg b/packages/uikit-workshop/src/icons/laptop.svg new file mode 100644 index 000000000..23da41cca --- /dev/null +++ b/packages/uikit-workshop/src/icons/laptop.svg @@ -0,0 +1,5 @@ + + +laptop_mac + + diff --git a/packages/uikit-workshop/src/icons/layout-h.svg b/packages/uikit-workshop/src/icons/layout-h.svg new file mode 100644 index 000000000..4878499d2 --- /dev/null +++ b/packages/uikit-workshop/src/icons/layout-h.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/uikit-workshop/src/icons/layout-v.svg b/packages/uikit-workshop/src/icons/layout-v.svg new file mode 100644 index 000000000..9110dfa84 --- /dev/null +++ b/packages/uikit-workshop/src/icons/layout-v.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/uikit-workshop/src/icons/menu.svg b/packages/uikit-workshop/src/icons/menu.svg new file mode 100644 index 000000000..98be1018e --- /dev/null +++ b/packages/uikit-workshop/src/icons/menu.svg @@ -0,0 +1,5 @@ + + +menu + + diff --git a/packages/uikit-workshop/src/icons/new-tab.svg b/packages/uikit-workshop/src/icons/new-tab.svg new file mode 100644 index 000000000..9c0db76d1 --- /dev/null +++ b/packages/uikit-workshop/src/icons/new-tab.svg @@ -0,0 +1,5 @@ + + +open_in_new + + diff --git a/packages/uikit-workshop/src/icons/phone.svg b/packages/uikit-workshop/src/icons/phone.svg new file mode 100644 index 000000000..82b40fe84 --- /dev/null +++ b/packages/uikit-workshop/src/icons/phone.svg @@ -0,0 +1,5 @@ + + +phone_iphone + + diff --git a/packages/uikit-workshop/src/icons/random.svg b/packages/uikit-workshop/src/icons/random.svg new file mode 100644 index 000000000..c42db187a --- /dev/null +++ b/packages/uikit-workshop/src/icons/random.svg @@ -0,0 +1,11 @@ + + + + casino + Created with Sketch. + + + + + + \ No newline at end of file diff --git a/packages/uikit-workshop/src/icons/settings.svg b/packages/uikit-workshop/src/icons/settings.svg new file mode 100644 index 000000000..49197cb34 --- /dev/null +++ b/packages/uikit-workshop/src/icons/settings.svg @@ -0,0 +1,5 @@ + + +settings + + diff --git a/packages/uikit-workshop/src/icons/show.svg b/packages/uikit-workshop/src/icons/show.svg new file mode 100644 index 000000000..3377c33bf --- /dev/null +++ b/packages/uikit-workshop/src/icons/show.svg @@ -0,0 +1,5 @@ + + +view-show + + diff --git a/packages/uikit-workshop/src/icons/tablet.svg b/packages/uikit-workshop/src/icons/tablet.svg new file mode 100644 index 000000000..d85d35301 --- /dev/null +++ b/packages/uikit-workshop/src/icons/tablet.svg @@ -0,0 +1,5 @@ + + +tablet_mac + + diff --git a/packages/uikit-workshop/src/icons/theme-dark.svg b/packages/uikit-workshop/src/icons/theme-dark.svg new file mode 100644 index 000000000..9589bfd5d --- /dev/null +++ b/packages/uikit-workshop/src/icons/theme-dark.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/packages/uikit-workshop/src/icons/theme-light.svg b/packages/uikit-workshop/src/icons/theme-light.svg new file mode 100644 index 000000000..e8f54f0a9 --- /dev/null +++ b/packages/uikit-workshop/src/icons/theme-light.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/uikit-workshop/src/images/pattern-lab-logo--on-dark.svg b/packages/uikit-workshop/src/images/pattern-lab-logo--on-dark.svg new file mode 100644 index 000000000..59cc46b0a --- /dev/null +++ b/packages/uikit-workshop/src/images/pattern-lab-logo--on-dark.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/uikit-workshop/src/images/pattern-lab-logo--on-light.svg b/packages/uikit-workshop/src/images/pattern-lab-logo--on-light.svg new file mode 100644 index 000000000..549f60c02 --- /dev/null +++ b/packages/uikit-workshop/src/images/pattern-lab-logo--on-light.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/uikit-workshop/src/js/clipboard.min.js b/packages/uikit-workshop/src/js/clipboard.min.js deleted file mode 100644 index ee5770348..000000000 --- a/packages/uikit-workshop/src/js/clipboard.min.js +++ /dev/null @@ -1,9 +0,0 @@ -// jshint ignore: start - -/*! - * clipboard.js v1.7.1 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n||t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function t(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function t(){var e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=o+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function t(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function t(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function t(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function t(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function t(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function t(){this.removeFake()}},{key:"action",set:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function t(){return this._action}},{key:"target",set:function t(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function t(){return this._target}}]),t}();t.exports=c})},{select:5}],8:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if(void 0!==o)r(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var s=i(e),u=i(n),f=i(o),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function t(e){var n=this;this.listener=(0,f.default)(e,"click",function(t){return n.onClick(t)})}},{key:"onClick",value:function t(e){var n=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(n),target:this.target(n),text:this.text(n),container:this.container,trigger:n,emitter:this})}},{key:"defaultAction",value:function t(e){return l("action",e)}},{key:"defaultTarget",value:function t(e){var n=l("target",e);if(n)return document.querySelector(n)}},{key:"defaultText",value:function t(e){return l("text",e)}},{key:"destroy",value:function t(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],n="string"==typeof e?[e]:e,o=!!document.queryCommandSupported;return n.forEach(function(t){o=o&&!!document.queryCommandSupported(t)}),o}}]),e}(u.default);t.exports=p})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}); diff --git a/packages/uikit-workshop/src/js/data-saver.js b/packages/uikit-workshop/src/js/data-saver.js deleted file mode 100644 index 2120f1d1b..000000000 --- a/packages/uikit-workshop/src/js/data-saver.js +++ /dev/null @@ -1,163 +0,0 @@ -/*! - * jQuery Cookie Plugin v1.3 - * https://github.com/carhartl/jquery-cookie - * - * Copyright 2011, Klaus Hartl - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://www.opensource.org/licenses/mit-license.php - * http://www.opensource.org/licenses/GPL-2.0 - */ -(function($, document, undefined) { - var pluses = /\+/g; - - function raw(s) { - return s; - } - - function decoded(s) { - return decodeURIComponent(s.replace(pluses, ' ')); - } - - var config = ($.cookie = function(key, value, options) { - // write - if (value !== undefined) { - options = $.extend({}, config.defaults, options); - - if (value === null) { - options.expires = -1; - } - - if (typeof options.expires === 'number') { - var days = options.expires, - t = (options.expires = new Date()); - t.setDate(t.getDate() + days); - } - - value = config.json ? JSON.stringify(value) : String(value); - - return (document.cookie = [ - encodeURIComponent(key), - '=', - config.raw ? value : encodeURIComponent(value), - options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE - options.path ? '; path=' + options.path : '', - options.domain ? '; domain=' + options.domain : '', - options.secure ? '; secure' : '', - ].join('')); - } - - // read - var decode = config.raw ? raw : decoded; - var cookies = document.cookie.split('; '); - for (var i = 0, l = cookies.length; i < l; i++) { - var parts = cookies[i].split('='); - if (decode(parts.shift()) === key) { - var cookie = decode(parts.join('=')); - return config.json ? JSON.parse(cookie) : cookie; - } - } - - return null; - }); - - config.defaults = {}; - - $.removeCookie = function(key, options) { - if ($.cookie(key) !== null) { - $.cookie(key, null, options); - return true; - } - return false; - }; -})(jQuery, document); - -/*! - * Data Saver - * - * Copyright (c) 2013-2014 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - */ - -var DataSaver = { - // the name of the cookie to store the data in - cookieName: 'patternlab', - - /** - * Add a given value to the cookie - * @param {String} the name of the key - * @param {String} the value - */ - addValue: function(name, val) { - var cookieVal = $.cookie(this.cookieName); - cookieVal = - cookieVal === null || cookieVal === '' - ? name + '~' + val - : cookieVal + '|' + name + '~' + val; - $.cookie(this.cookieName, cookieVal); - }, - - /** - * Update a value found in the cookie. If the key doesn't exist add the value - * @param {String} the name of the key - * @param {String} the value - */ - updateValue: function(name, val) { - if (this.findValue(name)) { - var updateCookieVals = ''; - var cookieVals = $.cookie(this.cookieName).split('|'); - for (var i = 0; i < cookieVals.length; i++) { - var fieldVals = cookieVals[i].split('~'); - if (fieldVals[0] == name) { - fieldVals[1] = val; - } - updateCookieVals += - i > 0 - ? '|' + fieldVals[0] + '~' + fieldVals[1] - : fieldVals[0] + '~' + fieldVals[1]; - } - $.cookie(this.cookieName, updateCookieVals); - } else { - this.addValue(name, val); - } - }, - - /** - * Remove the given key - * @param {String} the name of the key - */ - removeValue: function(name) { - var updateCookieVals = ''; - var cookieVals = $.cookie(this.cookieName).split('|'); - var k = 0; - for (var i = 0; i < cookieVals.length; i++) { - var fieldVals = cookieVals[i].split('~'); - if (fieldVals[0] != name) { - updateCookieVals += - k === 0 - ? fieldVals[0] + '~' + fieldVals[1] - : '|' + fieldVals[0] + '~' + fieldVals[1]; - k++; - } - } - $.cookie(this.cookieName, updateCookieVals); - }, - - /** - * Find the value using the given key - * @param {String} the name of the key - * - * @return {String} the value of the key or false if the value isn't found - */ - findValue: function(name) { - if ($.cookie(this.cookieName)) { - var cookieVals = $.cookie(this.cookieName).split('|'); - for (var i = 0; i < cookieVals.length; i++) { - var fieldVals = cookieVals[i].split('~'); - if (fieldVals[0] == name) { - return fieldVals[1]; - } - } - } - return false; - }, -}; diff --git a/packages/uikit-workshop/src/js/layout.js b/packages/uikit-workshop/src/js/layout.js deleted file mode 100644 index b3ea67dec..000000000 --- a/packages/uikit-workshop/src/js/layout.js +++ /dev/null @@ -1,25 +0,0 @@ -/*! - * Simple Layout Rendering for Pattern Lab - * - * Copyright (c) 2014 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - */ - -try { - /* load pattern nav */ - var template = document.querySelector('.pl-js-pattern-nav-template'); - var templateCompiled = Hogan.compile(template.innerHTML); - var templateRendered = templateCompiled.render(navItems); - document.querySelector( - '.pl-js-pattern-nav-target' - ).innerHTML = templateRendered; - - /* load ish controls */ - var template = document.querySelector('.pl-js-ish-controls-template'); - var templateCompiled = Hogan.compile(template.innerHTML); - var templateRendered = templateCompiled.render(ishControls); - document.querySelector('.pl-js-controls').innerHTML = templateRendered; -} catch (e) { - var message = '

    Please generate your site before trying to view it.

    '; - document.querySelector('.pl-js-pattern-nav-target').innerHTML = message; -} diff --git a/packages/uikit-workshop/src/js/modal-viewer.js b/packages/uikit-workshop/src/js/modal-viewer.js deleted file mode 100644 index 0870b339d..000000000 --- a/packages/uikit-workshop/src/js/modal-viewer.js +++ /dev/null @@ -1,316 +0,0 @@ -/*! - * Modal for the Viewer Layer - * For both annotations and code/info - * - * Copyright (c) 2016 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - * - * @requires url-handler.js - * @requires data-saver.js - * - */ - -var modalViewer = { - // set up some defaults - active: false, - switchText: true, - template: 'info', - patternData: {}, - targetOrigin: - window.location.protocol === 'file:' - ? '*' - : window.location.protocol + '//' + window.location.host, - - /** - * initialize the modal window - */ - onReady: function() { - // make sure the listener for checkpanels is set-up - Dispatcher.addListener('insertPanels', modalViewer.insert); - - // add the info/code panel onclick handler - $('.pl-js-pattern-info-toggle').click(function(e) { - modalViewer.toggle(); - }); - - // make sure the close button handles the click - $('.pl-js-modal-close-btn').on('click', function(e) { - // hide any open annotations - obj = JSON.stringify({ - event: 'patternLab.annotationsHighlightHide', - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, modalViewer.targetOrigin); - - // hide the viewer - modalViewer.close(); - }); - - // see if the modal is already active, if so update attributes as appropriate - if (DataSaver.findValue('modalActive') === 'true') { - modalViewer.active = true; - $('.pl-js-pattern-info-toggle').html('Hide Pattern Info'); - } - - // make sure the modal viewer is not viewable, it's always hidden by default. the pageLoad event determines when it actually opens - modalViewer.hide(); - - // review the query strings in case there is something the modal viewer is supposed to handle by default - var queryStringVars = urlHandler.getRequestVars(); - - // show the modal if code view is called via query string - if ( - queryStringVars.view !== undefined && - (queryStringVars.view === 'code' || queryStringVars.view === 'c') - ) { - modalViewer.queryPattern(); - } - - // show the modal if the old annotations view is called via query string - if ( - queryStringVars.view !== undefined && - (queryStringVars.view === 'annotations' || queryStringVars.view === 'a') - ) { - modalViewer.queryPattern(); - } - }, - - /** - * toggle the modal window open and closed - */ - toggle: function() { - if (modalViewer.active === false) { - modalViewer.queryPattern(); - } else { - obj = JSON.stringify({ - event: 'patternLab.annotationsHighlightHide', - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, modalViewer.targetOrigin); - modalViewer.close(); - } - }, - - /** - * open the modal window - */ - open: function() { - // make sure the modal viewer and other options are off just in case - modalViewer.close(); - - // note it's turned on in the viewer - DataSaver.updateValue('modalActive', 'true'); - modalViewer.active = true; - - // show the modal - modalViewer.show(); - }, - - /** - * close the modal window - */ - close: function() { - var obj; - - // note that the modal viewer is no longer active - DataSaver.updateValue('modalActive', 'false'); - modalViewer.active = false; - - //Remove active class to modal - $('.pl-js-modal').removeClass('pl-is-active'); - - // update the wording - $('.pl-js-pattern-info-toggle').html('Show Pattern Info'); - - // tell the styleguide to close - obj = JSON.stringify({ - event: 'patternLab.patternModalClose', - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, modalViewer.targetOrigin); - }, - - /** - * hide the modal window - */ - hide: function() { - $('.pl-js-modal').removeClass('pl-is-active'); - }, - - /** - * insert the copy for the modal window. if it's meant to be sent back to the iframe, do that. - * @param {String} the rendered template that should be inserted - * @param {String} the patternPartial that the rendered template is related to - * @param {Boolean} if the refresh is of a view-all view and the content should be sent back - * @param {Boolean} if the text in the dropdown should be switched - */ - insert: function( - templateRendered, - patternPartial, - iframePassback, - switchText - ) { - if (iframePassback) { - // send a message to the pattern - var obj = JSON.stringify({ - event: 'patternLab.patternModalInsert', - patternPartial: patternPartial, - modalContent: templateRendered.outerHTML, - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, modalViewer.targetOrigin); - } else { - // insert the panels and open the viewer - $('.pl-js-modal-content').html(templateRendered); - modalViewer.open(); - } - - // update the wording unless this is a default viewall opening - if (switchText === true) { - $('.pl-js-pattern-info-toggle').html('Hide Pattern Info'); - } - }, - - /** - * refresh the modal if a new pattern is loaded and the modal is active - * @param {Object} the patternData sent back from the query - * @param {Boolean} if the refresh is of a view-all view and the content should be sent back - * @param {Boolean} if the text in the dropdown should be switched - */ - refresh: function(patternData, iframePassback, switchText) { - // if this is a styleguide view close the modal - if (iframePassback) { - modalViewer.hide(); - } - - // gather the data that will fill the modal window - panelsViewer.gatherPanels(patternData, iframePassback, switchText); - }, - - /** - * slides the modal window into or out of view - * @param {Integer} where the modal window should be slide to - */ - slide: function(pos) { - $('.pl-js-modal').toggleClass('pl-is-active'); - }, - - /** - * slides the modal window to a particular annotation - * @param {Integer} the number for the element that should be highlighted - */ - slideToAnnotation: function(pos) { - // remove active class - els = document.querySelectorAll('.pl-js-annotations li'); - for (i = 0; i < els.length; ++i) { - els[i].classList.remove('pl-is-active'); - } - - // add active class to called element and scroll to it - for (i = 0; i < els.length; ++i) { - if (i + 1 == pos) { - els[i].classList.add('pl-is-active'); - $('.pl-js-pattern-info').animate( - { - scrollTop: els[i].offsetTop - 10, - }, - 600 - ); - } - } - }, - - /** - * Show modal - */ - show: function() { - $('.pl-js-modal').addClass('pl-is-active'); - }, - - /** - * ask the pattern for info so we can open the modal window and populate it - * @param {Boolean} if the dropdown text should be changed - */ - queryPattern: function(switchText) { - // note that the modal is active and set switchText - if (switchText === undefined || switchText) { - switchText = true; - DataSaver.updateValue('modalActive', 'true'); - modalViewer.active = true; - } - - // send a message to the pattern - var obj = JSON.stringify({ - event: 'patternLab.patternQuery', - switchText: switchText, - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, modalViewer.targetOrigin); - }, - - /** - * toggle the comment pop-up based on a user clicking on the pattern - * based on the great MDN docs at https://developer.mozilla.org/en-US/docs/Web/API/window.postMessage - * @param {Object} event info - */ - receiveIframeMessage: function(event) { - var els, i; - - // does the origin sending the message match the current host? if not dev/null the request - if ( - window.location.protocol !== 'file:' && - event.origin !== window.location.protocol + '//' + window.location.host - ) { - return; - } - - var data = {}; - - try { - data = - typeof event.data !== 'string' ? event.data : JSON.parse(event.data); - } catch (e) {} - - if (data.event !== undefined && data.event == 'patternLab.pageLoad') { - if ( - modalViewer.active === false && - data.patternpartial !== undefined && - data.patternpartial.indexOf('viewall-') === 0 && - config.defaultShowPatternInfo !== undefined && - config.defaultShowPatternInfo - ) { - modalViewer.queryPattern(false); - } else if (modalViewer.active === true) { - modalViewer.queryPattern(); - } - } else if ( - data.event !== undefined && - data.event == 'patternLab.patternQueryInfo' - ) { - // refresh the modal if a new pattern is loaded and the modal is active - modalViewer.refresh( - data.patternData, - data.iframePassback, - data.switchText - ); - } else if ( - data.event !== undefined && - data.event == 'patternLab.annotationNumberClicked' - ) { - // slide to a given annoation - modalViewer.slideToAnnotation(data.displayNumber); - } - }, -}; - -// when the document is ready make sure the modal is ready -$(document).ready(function() { - modalViewer.onReady(); -}); - -window.addEventListener('message', modalViewer.receiveIframeMessage, false); diff --git a/packages/uikit-workshop/src/js/panels-util.js b/packages/uikit-workshop/src/js/panels-util.js deleted file mode 100644 index 990219c34..000000000 --- a/packages/uikit-workshop/src/js/panels-util.js +++ /dev/null @@ -1,67 +0,0 @@ -/*! - * Panels Util - * For both styleguide and viewer - * - * Copyright (c) 2013-16 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - * - * @requires url-handler.js - * - */ - -var panelsUtil = { - /** - * Add click events to the template that was rendered - * @param {String} the rendered template for the modal - * @param {String} the pattern partial for the modal - */ - addClickEvents: function(templateRendered, patternPartial) { - var els = templateRendered.querySelectorAll('.pl-js-tab-link'); - for (var i = 0; i < els.length; ++i) { - els[i].onclick = function(e) { - e.preventDefault(); - - var patternPartial = this.getAttribute('data-patternpartial'); - var panelID = this.getAttribute('data-panelid'); - panelsUtil.show(patternPartial, panelID); - }; - } - - return templateRendered; - }, - - /** - * Show a specific modal - * @param {String} the pattern partial for the modal - * @param {String} the ID of the panel to be shown - */ - show: function(patternPartial, panelID) { - var els; - - // turn off all of the active tabs - els = document.querySelectorAll( - '#pl-' + patternPartial + '-tabs .pl-js-tab-link' - ); - for (i = 0; i < els.length; ++i) { - els[i].classList.remove('pl-is-active-tab'); - } - - // hide all of the panels - els = document.querySelectorAll( - '#pl-' + patternPartial + '-panels .pl-js-tab-panel' - ); - for (i = 0; i < els.length; ++i) { - els[i].classList.remove('pl-is-active-tab'); - } - - // add active tab class - document - .getElementById('pl-' + patternPartial + '-' + panelID + '-tab') - .classList.add('pl-is-active-tab'); - - // show the panel - document - .getElementById('pl-' + patternPartial + '-' + panelID + '-panel') - .classList.add('pl-is-active-tab'); - }, -}; diff --git a/packages/uikit-workshop/src/js/panels.js b/packages/uikit-workshop/src/js/panels.js deleted file mode 100644 index 14fe57ebd..000000000 --- a/packages/uikit-workshop/src/js/panels.js +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * Default Panels for Pattern Lab plus Panel related events - * - * Copyright (c) 2016 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - * - * config is coming from the default viewer and is passed through from PL's config - * - * @requires prism-languages.js - */ - -var Panels = { - panels: [], - - count: function() { - return this.panels.length; - }, - - get: function() { - return JSON.parse(JSON.stringify(this.panels)); - }, - - add: function(panel) { - // if ID already exists in panels array ignore the add() - for (var i = 0; i < this.panels.length; ++i) { - if (panel.id === this.panels[i].id) { - return; - } - } - - // it wasn't found so push the tab onto the tabs - this.panels.push(panel); - }, - - remove: function(id) { - var panels = this.panels; - for (var i = panels.length - 1; i >= 0; i--) { - if (panels[i].id === id) { - var panelToRemove = panels[i]; - panels.splice(i, 1); - //if removed panel was default, set first panel as new default, if exists - if (panelToRemove.default && panels.length) { - panels[0].default = true; - } - return; //should be no more panels with the same id - } - } - }, -}; - -var fileSuffixPattern = - config.outputFileSuffixes !== undefined && - config.outputFileSuffixes.rawTemplate !== undefined - ? config.outputFileSuffixes.rawTemplate - : ''; -var fileSuffixMarkup = - config.outputFileSuffixes !== undefined && - config.outputFileSuffixes.markupOnly !== undefined - ? config.outputFileSuffixes.markupOnly - : '.markup-only'; - -// add the default panels -// Panels.add({ 'id': 'pl-panel-info', 'name': 'info', 'default': true, 'templateID': 'pl-panel-template-info', 'httpRequest': false, 'prismHighlight': false, 'keyCombo': '' }); -// TODO: sort out pl-panel-html -Panels.add({ - id: 'pl-panel-pattern', - name: config.patternExtension.toUpperCase(), - default: true, - templateID: 'pl-panel-template-code', - httpRequest: true, - httpRequestReplace: fileSuffixPattern, - httpRequestCompleted: false, - prismHighlight: true, - language: PrismLanguages.get(config.patternExtension), - keyCombo: 'ctrl+shift+u', -}); - -Panels.add({ - id: 'pl-panel-html', - name: 'HTML', - default: false, - templateID: 'pl-panel-template-code', - httpRequest: true, - httpRequestReplace: fileSuffixMarkup + '.html', - httpRequestCompleted: false, - prismHighlight: true, - language: 'markup', - keyCombo: 'ctrl+shift+y', -}); - -// gather panels from plugins -Dispatcher.trigger('setupPanels'); diff --git a/packages/uikit-workshop/src/js/pattern-finder.js b/packages/uikit-workshop/src/js/pattern-finder.js deleted file mode 100644 index 24f522347..000000000 --- a/packages/uikit-workshop/src/js/pattern-finder.js +++ /dev/null @@ -1,129 +0,0 @@ -/*! - * Pattern Finder - * - * Copyright (c) 2014 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - * - * @requires url-handler.js - * - */ - -var patternFinder = { - data: [], - active: false, - - init: function() { - for (var patternType in patternPaths) { - if (patternPaths.hasOwnProperty(patternType)) { - for (var pattern in patternPaths[patternType]) { - var obj = {}; - obj.patternPartial = patternType + '-' + pattern; - obj.patternPath = patternPaths[patternType][pattern]; - this.data.push(obj); - } - } - } - - // instantiate the bloodhound suggestion engine - var patterns = new Bloodhound({ - datumTokenizer: function(d) { - return Bloodhound.tokenizers.nonword(d.patternPartial); - }, - queryTokenizer: Bloodhound.tokenizers.nonword, - limit: 10, - local: this.data, - }); - - // initialize the bloodhound suggestion engine - patterns.initialize(); - - $('.pl-js-typeahead') - .typeahead( - { - highlight: true, - }, - { - displayKey: 'patternPartial', - source: patterns.ttAdapter(), - } - ) - .on('typeahead:selected', patternFinder.onSelected) - .on('typeahead:autocompleted', patternFinder.onAutocompleted); - }, - - passPath: function(item) { - // update the iframe via the history api handler - patternFinder.closeFinder(); - var obj = JSON.stringify({ - event: 'patternLab.updatePath', - path: urlHandler.getFileName(item.patternPartial), - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, urlHandler.targetOrigin); - }, - - onSelected: function(e, item) { - patternFinder.passPath(item); - }, - - onAutocompleted: function(e, item) { - patternFinder.passPath(item); - }, - - toggleFinder: function() { - if (!patternFinder.active) { - patternFinder.openFinder(); - } else { - patternFinder.closeFinder(); - } - }, - - openFinder: function() { - patternFinder.active = true; - $('.pl-js-typeahead').val(''); - }, - - closeFinder: function() { - patternFinder.active = false; - document.activeElement.blur(); - $('.pl-js-typeahead').val(''); - }, - - receiveIframeMessage: function(event) { - // does the origin sending the message match the current host? if not dev/null the request - if ( - window.location.protocol !== 'file:' && - event.origin !== window.location.protocol + '//' + window.location.host - ) { - return; - } - - var data = {}; - try { - data = - typeof event.data !== 'string' ? event.data : JSON.parse(event.data); - } catch (e) {} - - if (data.event !== undefined && data.event == 'patternLab.keyPress') { - if (data.keyPress == 'ctrl+shift+f') { - patternFinder.toggleFinder(); - return false; - } - } - }, -}; - -patternFinder.init(); - -window.addEventListener('message', patternFinder.receiveIframeMessage, false); - -$('.pl-js-typeahead').focus(function() { - if (!patternFinder.active) { - patternFinder.openFinder(); - } -}); - -$('.pl-js-typeahead').blur(function() { - patternFinder.closeFinder(); -}); diff --git a/packages/uikit-workshop/src/js/plugin-loader.js b/packages/uikit-workshop/src/js/plugin-loader.js deleted file mode 100644 index 9dc0caa33..000000000 --- a/packages/uikit-workshop/src/js/plugin-loader.js +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * Plugin Loader - * - * Copyright (c) 2015 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - * - * Takes the assets they can be loaded for plugins and adds them to the DOM - * - * @requires styleguide.js - * - */ - -var pluginLoader = { - init: function() { - var s, t, l, c, n; - - for (var i = 0; i < plugins.length; ++i) { - var plugin = plugins[i]; - - // load the templates - for (var key in plugin.templates) { - if (plugin.templates.hasOwnProperty(key)) { - t = document.getElementsByTagName('script'); - l = t.length - 1; - s = t[l]; - n = document.createElement('script'); - n.type = 'text/mustache'; - n.id = plugin.name.replace('/', '-') + '-' + key + '-template'; - n.innerHTML = plugin.templates[key]; - s.parentNode.insertBefore(n, s.nextSibling); - } - } - - // load the stylesheets - for (var k = 0; k < plugin.stylesheets.length; ++k) { - s = plugin.stylesheets[k]; - t = document.getElementsByTagName('link'); - l = t.length - 1; - c = t[l]; - n = document.createElement('link'); - n.type = 'text/css'; - n.rel = 'stylesheet'; - n.href = 'patternlab-components/' + plugin.name + '/' + s; - n.media = 'screen'; - c.parentNode.insertBefore(n, c.nextSibling); - } - - // load the javascript - // $script.path('patternlab-components/'+plugin.name+'/'); - $script( - plugin.javascripts, - plugin.name, - eval('(function() { ' + plugin.callback + ' })') - ); - $script.ready( - [plugin.name], - eval('(function() { ' + plugin.onready + ' })') - ); - } - }, -}; - -pluginLoader.init(); diff --git a/packages/uikit-workshop/src/js/prism-languages.js b/packages/uikit-workshop/src/js/prism-languages.js deleted file mode 100644 index 56a5bdfe4..000000000 --- a/packages/uikit-workshop/src/js/prism-languages.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * Default languages for Prism to match rendering capability - * - * Copyright (c) 2016 Dave Olsen, http://dmolsen.com - * Licensed under the MIT license - * - */ -var PrismLanguages = { - languages: [], - - get: function(key) { - var language; - - for (i = 0; i < this.languages.length; ++i) { - language = this.languages[i]; - if (language[key] !== undefined) { - return language[key]; - } - } - - return 'markup'; - }, - - add: function(language) { - // see if the language already exists, overwrite if it does - for (var key in language) { - if (language.hasOwnProperty(key)) { - for (i = 0; i < this.languages.length; ++i) { - if (this.languages[i][key] !== undefined) { - this.languages[i][key] = language[key]; - return; - } - } - } - } - - this.languages.push(language); - }, -}; - -// this shouldn't get hardcoded, also need to think about including Prism's real lang libraries (e.g. handlebars & twig) -PrismLanguages.add({ - twig: 'markup', -}); -PrismLanguages.add({ - mustache: 'markup', -}); diff --git a/packages/uikit-workshop/src/js/styleguide.js b/packages/uikit-workshop/src/js/styleguide.js deleted file mode 100644 index fcfdfd74d..000000000 --- a/packages/uikit-workshop/src/js/styleguide.js +++ /dev/null @@ -1,679 +0,0 @@ -/** - * @requires data-saver.js - * @requires url-handler.js - * @requires postmessage.js - */ - -(function(w) { - var sw = document.body.clientWidth, //Viewport Width - sh = $(document).height(); //Viewport Height - - var minViewportWidth = 240; - var maxViewportWidth = 2600; - - //set minimum and maximum viewport based on confg - if (config.ishMinimum !== undefined) { - minViewportWidth = parseInt(config.ishMinimum); //Minimum Size for Viewport - } - if (config.ishMaximum !== undefined) { - maxViewportWidth = parseInt(config.ishMaximum); //Maxiumum Size for Viewport - } - - //alternatively, use the ishViewportRange object - if (config.ishViewportRange !== undefined) { - minViewportWidth = config.ishViewportRange.s[0]; - maxViewportWidth = config.ishViewportRange.l[1]; - } - - //if both are set, then let's use the larger one. - if (config.ishViewportRange && config.ishMaximum) { - var largeRange = parseInt(config.ishViewportRange.l[1]); - var ishMaximum = parseInt(config.ishMaximum); - maxViewportWidth = largeRange > ishMaximum ? largeRange : ishMaximum; - } - - var viewportResizeHandleWidth = 14, //Width of the viewport drag-to-resize handle - $sgIframe = $('.pl-js-iframe'), //Viewport element - $sizePx = $('#pl-size-px'), //Px size input element in toolbar - $sizeEms = $('#pl-size-em'), //Em size input element in toolbar - $bodySize = - config.ishFontSize !== undefined - ? parseInt(config.ishFontSize) - : parseInt($('body').css('font-size')), //Body size of the document - discoID = false, - discoMode = false, - fullMode = true, - hayMode = false; - - //Update dimensions on resize - $(w).resize(function() { - sw = document.body.clientWidth; - sh = $(document).height(); - - if (fullMode === true) { - sizeiframe(sw, false); - } - }); - - // Nav menu button on small screens - $('.pl-js-nav-trigger').on('click', function(e) { - e.preventDefault(); - $('.pl-js-nav-target').toggleClass('pl-is-active'); - }); - - // Accordion dropdown - $('.pl-js-acc-handle').on('click', function(e) { - e.preventDefault(); - - var $this = $(this), - $panel = $this.next('.pl-js-acc-panel'), - subnav = $this - .parent() - .parent() - .hasClass('pl-js-acc-panel'); - - //Close other panels if link isn't a subnavigation item - if (!subnav) { - $('.pl-js-acc-handle') - .not($this) - .removeClass('pl-is-active'); - $('.pl-js-acc-panel') - .not($panel) - .removeClass('pl-is-active'); - } - - //Activate selected panel - $this.toggleClass('pl-is-active'); - $panel.toggleClass('pl-is-active'); - }); - - //Size View Events - - // handle small button - function goSmall() { - killDisco(); - killHay(); - fullMode = false; - sizeiframe(getRandom(minViewportWidth, 500)); - } - - $('#pl-size-s').on('click', function(e) { - e.preventDefault(); - goSmall(); - }); - - jwerty.key('ctrl+shift+s', function(e) { - goSmall(); - return false; - }); - - // handle medium button - function goMedium() { - killDisco(); - killHay(); - fullMode = false; - sizeiframe( - getRandom( - minViewportWidth, - config.ishViewportRange !== undefined - ? parseInt(config.ishViewportRange.s[1]) - : 500 - ) - ); - } - - $('#pl-size-m').on('click', function(e) { - e.preventDefault(); - goMedium(); - }); - - jwerty.key('ctrl+shift+m', function(e) { - goLarge(); - return false; - }); - - // handle large button - function goLarge() { - killDisco(); - killHay(); - fullMode = false; - sizeiframe( - getRandom( - config.ishViewportRange !== undefined - ? parseInt(config.ishViewportRange.l[0]) - : 800, - config.ishViewportRange !== undefined - ? parseInt(config.ishViewportRange.l[1]) - : 1200 - ) - ); - } - - $('#pl-size-l').on('click', function(e) { - e.preventDefault(); - goLarge(); - }); - - jwerty.key('ctrl+shift+l', function(e) { - goLarge(); - return false; - }); - - //Click Full Width Button - $('#pl-size-full').on('click', function(e) { - //Resets - e.preventDefault(); - killDisco(); - killHay(); - fullMode = true; - sizeiframe(sw); - }); - - //Click Random Size Button - $('#pl-size-random').on('click', function(e) { - e.preventDefault(); - killDisco(); - killHay(); - fullMode = false; - sizeiframe(getRandom(minViewportWidth, sw)); - }); - - //Click for Disco Mode, which resizes the viewport randomly - $('#pl-size-disco').on('click', function(e) { - e.preventDefault(); - killHay(); - fullMode = false; - - if (discoMode) { - killDisco(); - } else { - startDisco(); - } - }); - - // Disco Mode - function disco() { - sizeiframe(getRandom(minViewportWidth, sw)); - } - - function killDisco() { - discoMode = false; - clearInterval(discoID); - discoID = false; - } - - function startDisco() { - discoMode = true; - discoID = setInterval(disco, 800); - } - - jwerty.key('ctrl+shift+d', function(e) { - if (!discoMode) { - startDisco(); - } else { - killDisco(); - } - return false; - }); - - //Stephen Hay Mode - "Start with the small screen first, then expand until it looks like shit. Time for a breakpoint!" - $('#pl-size-hay').on('click', function(e) { - e.preventDefault(); - killDisco(); - if (hayMode) { - killHay(); - } else { - startHay(); - } - }); - - //Stop Hay! Mode - function killHay() { - var currentWidth = $sgIframe.width(); - hayMode = false; - $sgIframe.removeClass('hay-mode'); - $('.pl-js-vp-iframe-container').removeClass('hay-mode'); - sizeiframe(Math.floor(currentWidth)); - } - - // start Hay! mode - function startHay() { - hayMode = true; - $('.pl-js-vp-iframe-container') - .removeClass('vp-animate') - .width(minViewportWidth + viewportResizeHandleWidth); - $sgIframe.removeClass('vp-animate').width(minViewportWidth); - - var timeoutID = window.setTimeout(function() { - $('.pl-js-vp-iframe-container') - .addClass('hay-mode') - .width(maxViewportWidth + viewportResizeHandleWidth); - $sgIframe.addClass('hay-mode').width(maxViewportWidth); - - setInterval(function() { - var vpSize = $sgIframe.width(); - updateSizeReading(vpSize); - }, 100); - }, 200); - } - - // start hay from a keyboard shortcut - jwerty.key('ctrl+shift+h', function(e) { - if (!hayMode) { - startHay(); - } else { - killHay(); - } - }); - - //Pixel input - $sizePx.on('keydown', function(e) { - var val = Math.floor($(this).val()); - - if (e.keyCode === 38) { - //If the up arrow key is hit - val++; - sizeiframe(val, false); - } else if (e.keyCode === 40) { - //If the down arrow key is hit - val--; - sizeiframe(val, false); - } else if (e.keyCode === 13) { - //If the Enter key is hit - e.preventDefault(); - sizeiframe(val); //Size Iframe to value of text box - $(this).blur(); - } - }); - - $sizePx.on('keyup', function() { - var val = Math.floor($(this).val()); - updateSizeReading(val, 'px', 'updateEmInput'); - }); - - //Em input - $sizeEms.on('keydown', function(e) { - var val = parseFloat($(this).val()); - - if (e.keyCode === 38) { - //If the up arrow key is hit - val++; - sizeiframe(Math.floor(val * $bodySize), false); - } else if (e.keyCode === 40) { - //If the down arrow key is hit - val--; - sizeiframe(Math.floor(val * $bodySize), false); - } else if (e.keyCode === 13) { - //If the Enter key is hit - e.preventDefault(); - sizeiframe(Math.floor(val * $bodySize)); //Size Iframe to value of text box - } - }); - - $sizeEms.on('keyup', function() { - var val = parseFloat($(this).val()); - updateSizeReading(val, 'em', 'updatePxInput'); - }); - - // set 0 to 320px as a default - jwerty.key('ctrl+shift+0', function(e) { - e.preventDefault(); - sizeiframe(320, true); - return false; - }); - - //Resize the viewport - //'size' is the target size of the viewport - //'animate' is a boolean for switching the CSS animation on or off. 'animate' is true by default, but can be set to false for things like nudging and dragging - function sizeiframe(size, animate) { - var theSize; - - if (size > maxViewportWidth) { - //If the entered size is larger than the max allowed viewport size, cap value at max vp size - theSize = maxViewportWidth; - } else if (size < minViewportWidth) { - //If the entered size is less than the minimum allowed viewport size, cap value at min vp size - theSize = minViewportWidth; - } else { - theSize = size; - } - - //Conditionally remove CSS animation class from viewport - if (animate === false) { - $('.pl-js-vp-iframe-container, .pl-js-iframe').removeClass('vp-animate'); //If aninate is set to false, remove animate class from viewport - } else { - $('.pl-js-vp-iframe-container, .pl-js-iframe').addClass('vp-animate'); - } - - $('.pl-js-vp-iframe-container').width(theSize + viewportResizeHandleWidth); //Resize viewport wrapper to desired size + size of drag resize handler - $sgIframe.width(theSize); //Resize viewport to desired size - - var targetOrigin = - window.location.protocol === 'file:' - ? '*' - : window.location.protocol + '//' + window.location.host; - var obj = JSON.stringify({ - event: 'patternLab.resize', - resize: 'true', - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, targetOrigin); - - updateSizeReading(theSize); //Update values in toolbar - saveSize(theSize); //Save current viewport to cookie - } - - $('.pl-js-vp-iframe-container').on( - 'transitionend webkitTransitionEnd', - function(e) { - var targetOrigin = - window.location.protocol === 'file:' - ? '*' - : window.location.protocol + '//' + window.location.host; - var obj = JSON.stringify({ - event: 'patternLab.resize', - resize: 'true', - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, targetOrigin); - } - ); - - function saveSize(size) { - if (!DataSaver.findValue('vpWidth')) { - DataSaver.addValue('vpWidth', size); - } else { - DataSaver.updateValue('vpWidth', size); - } - } - - //Update Pixel and Em inputs - //'size' is the input number - //'unit' is the type of unit: either px or em. Default is px. Accepted values are 'px' and 'em' - //'target' is what inputs to update. Defaults to both - function updateSizeReading(size, unit, target) { - var emSize, pxSize; - - if (unit === 'em') { - //If size value is in em units - emSize = size; - pxSize = Math.floor(size * $bodySize); - } else { - //If value is px or absent - pxSize = size; - emSize = size / $bodySize; - } - - if (target === 'updatePxInput') { - $sizePx.val(pxSize); - } else if (target === 'updateEmInput') { - $sizeEms.val(emSize.toFixed(2)); - } else { - $sizeEms.val(emSize.toFixed(2)); - $sizePx.val(pxSize); - } - } - - /* Returns a random number between min and max */ - function getRandom(min, max) { - return Math.floor(Math.random() * (max - min) + min); - } - - //Update The viewport size - function updateViewportWidth(size) { - $('.pl-js-iframe').width(size); - $('.pl-js-vp-iframe-container').width(size * 1 + 14); - - updateSizeReading(size); - } - - $('.pl-js-vp-iframe-container').on('touchstart', function(event) {}); - - // handles widening the "viewport" - // 1. on "mousedown" store the click location - // 2. make a hidden div visible so that it can track mouse movements and make sure the pointer doesn't get lost in the iframe - // 3. on "mousemove" calculate the math, save the results to a cookie, and update the viewport - $('.pl-js-resize-handle').mousedown(function(event) { - // capture default data - var origClientX = event.clientX; - var origViewportWidth = $sgIframe.width(); - - fullMode = false; - - // show the cover - $('.pl-js-viewport-cover').css('display', 'block'); - - // add the mouse move event and capture data. also update the viewport width - $('.pl-js-viewport-cover').mousemove(function(event) { - var viewportWidth; - - viewportWidth = origViewportWidth + 2 * (event.clientX - origClientX); - - if (viewportWidth > minViewportWidth) { - if (!DataSaver.findValue('vpWidth')) { - DataSaver.addValue('vpWidth', viewportWidth); - } else { - DataSaver.updateValue('vpWidth', viewportWidth); - } - - sizeiframe(viewportWidth, false); - } - }); - - return false; - }); - - // on "mouseup" we unbind the "mousemove" event and hide the cover again - $('body').mouseup(function() { - $('.pl-js-viewport-cover').unbind('mousemove'); - $('.pl-js-viewport-cover').css('display', 'none'); - }); - - // capture the viewport width that was loaded and modify it so it fits with the pull bar - var origViewportWidth = $('.pl-js-iframe').width(); - $('.pl-js-vp-iframe-container').width(origViewportWidth); - - var testWidth = screen.width; - if (window.orientation !== undefined) { - testWidth = window.orientation === 0 ? screen.width : screen.height; - } - if ( - $(window).width() == testWidth && - 'ontouchstart' in document.documentElement && - $(window).width() <= 1024 - ) { - $('.pl-js-resize-container').width(0); - } else { - $('.pl-js-iframe').width(origViewportWidth - 14); - } - updateSizeReading($('.pl-js-iframe').width()); - - // get the request vars - var oGetVars = urlHandler.getRequestVars(); - - // pre-load the viewport width - var vpWidth = 0; - var trackViewportWidth = true; // can toggle this feature on & off - - if (oGetVars.h !== undefined || oGetVars.hay !== undefined) { - startHay(); - } else if (oGetVars.d !== undefined || oGetVars.disco !== undefined) { - startDisco(); - } else if (oGetVars.w !== undefined || oGetVars.width !== undefined) { - vpWidth = oGetVars.w !== undefined ? oGetVars.w : oGetVars.width; - vpWidth = - vpWidth.indexOf('em') !== -1 - ? Math.floor(Math.floor(vpWidth.replace('em', '')) * $bodySize) - : Math.floor(vpWidth.replace('px', '')); - DataSaver.updateValue('vpWidth', vpWidth); - updateViewportWidth(vpWidth); - } else if (trackViewportWidth && (vpWidth = DataSaver.findValue('vpWidth'))) { - updateViewportWidth(vpWidth); - } - - // set up the defaults for the - var baseIframePath = - window.location.protocol + - '//' + - window.location.host + - window.location.pathname.replace('index.html', ''); - var patternName = - config.defaultPattern !== undefined && - typeof config.defaultPattern === 'string' && - config.defaultPattern.trim().length > 0 - ? config.defaultPattern - : 'all'; - var iFramePath = - baseIframePath + 'styleguide/html/styleguide.html?' + Date.now(); - if (oGetVars.p !== undefined || oGetVars.pattern !== undefined) { - patternName = oGetVars.p !== undefined ? oGetVars.p : oGetVars.pattern; - } - - if (patternName !== 'all') { - patternPath = urlHandler.getFileName(patternName); - iFramePath = - patternPath !== '' - ? baseIframePath + patternPath + '?' + Date.now() - : iFramePath; - document.getElementById('title').innerHTML = 'Pattern Lab - ' + patternName; - history.replaceState( - { - pattern: patternName, - }, - null, - null - ); - } - - // Open in new window link - if (document.querySelector('.pl-js-open-new-window') !== undefined) { - // Set value of href to the path to the pattern - document - .querySelector('.pl-js-open-new-window') - .setAttribute('href', urlHandler.getFileName(patternName)); - } - - urlHandler.skipBack = true; - document - .querySelector('.pl-js-iframe') - .contentWindow.location.replace(iFramePath); - - // Close all dropdowns and navigation - function closePanels() { - $('.pl-js-nav-container, .pl-js-acc-handle, .pl-js-acc-panel').removeClass( - 'pl-is-active' - ); - patternFinder.closeFinder(); - } - - // update the iframe with the source from clicked element in pull down menu. also close the menu - // having it outside fixes an auto-close bug i ran into - $('a[data-patternpartial]').on('click', function(e) { - e.preventDefault(); - // update the iframe via the history api handler - var obj = JSON.stringify({ - event: 'patternLab.updatePath', - path: urlHandler.getFileName($(this).attr('data-patternpartial')), - }); - document - .querySelector('.pl-js-iframe') - .contentWindow.postMessage(obj, urlHandler.targetOrigin); - closePanels(); - }); - - // handle when someone clicks on the grey area of the viewport so it auto-closes the nav - $('.pl-js-viewport').click(function() { - closePanels(); - }); - - // Listen for resize changes - if (window.orientation !== undefined) { - var origOrientation = window.orientation; - window.addEventListener( - 'orientationchange', - function() { - if (window.orientation != origOrientation) { - $('.pl-js-vp-iframe-container').width($(window).width()); - $('.pl-js-iframe').width($(window).width()); - updateSizeReading($(window).width()); - origOrientation = window.orientation; - } - }, - false - ); - } - - // watch the iframe source so that it can be sent back to everyone else. - // based on the great MDN docs at https://developer.mozilla.org/en-US/docs/Web/API/window.postMessage - function receiveIframeMessage(event) { - // does the origin sending the message match the current host? if not dev/null the request - if ( - window.location.protocol !== 'file:' && - event.origin !== window.location.protocol + '//' + window.location.host - ) { - return; - } - - var data = {}; - try { - data = - typeof event.data !== 'string' ? event.data : JSON.parse(event.data); - } catch (e) {} - - if (data.event !== undefined) { - if (data.event == 'patternLab.pageLoad') { - if (!urlHandler.skipBack) { - if ( - history.state === undefined || - history.state === null || - history.state.pattern !== data.patternpartial - ) { - urlHandler.pushPattern(data.patternpartial, data.path); - } - - /* - if (wsnConnected) { - var iFramePath = urlHandler.getFileName(data.patternpartial); - wsn.send( '{"url": "'+iFramePath+'", "patternpartial": "'+event.data.patternpartial+'" }' ); - } - */ - } - - // reset the defaults - urlHandler.skipBack = false; - } else if (data.event == 'patternLab.keyPress') { - if (data.keyPress == 'ctrl+shift+s') { - goSmall(); - } else if (data.keyPress == 'ctrl+shift+m') { - goMedium(); - } else if (data.keyPress == 'ctrl+shift+l') { - goLarge(); - } else if (data.keyPress == 'ctrl+shift+d') { - if (!discoMode) { - startDisco(); - } else { - killDisco(); - } - } else if (data.keyPress == 'ctrl+shift+h') { - if (!hayMode) { - startHay(); - } else { - killHay(); - } - } else if (data.keyPress == 'ctrl+shift+0') { - sizeiframe(320, true); - } else if (found == data.keyPress.match(/ctrl\+shift\+([1-9])/)) { - var val = mqs[found[1] - 1]; - var type = val.indexOf('px') !== -1 ? 'px' : 'em'; - val = val.replace(type, ''); - var width = type === 'px' ? val * 1 : val * $bodySize; - sizeiframe(width, true); - } - return false; - } - } - } - window.addEventListener('message', receiveIframeMessage, false); -})(this); diff --git a/packages/uikit-workshop/src/sass/pattern-lab--iframe-loader.scss b/packages/uikit-workshop/src/sass/pattern-lab--iframe-loader.scss new file mode 100644 index 000000000..6ab2b8386 --- /dev/null +++ b/packages/uikit-workshop/src/sass/pattern-lab--iframe-loader.scss @@ -0,0 +1,87 @@ +@import 'scss/01-abstracts/variables'; +@import 'scss/01-abstracts/mixins'; + +@keyframes rotate { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +.pl-c-loader-wrapper { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.pl-c-loader-wrapper:not(:last-child){ + opacity: 0; + pointer-events: none; + transition: opacity 0.2s ease, transform 0.2s ease; +} + +.pl-c-loader { + z-index: 1000; + position: absolute; + top: 50%; + left: 50%; + margin: auto; + max-width: $pl-space * 25; + width: calc(90vw - #{$pl-doublespace}); + border-radius: $pl-border-radius; + background: rgba($pl-color-black, 0.9); + transform: translate3d(-50%, -50%, 0px); + transition: opacity 0.3s ease, transform 0.3s ease; + pointer-events: none; + opacity: 1; +} + +.pl-c-loader__content { + display: flex; + align-items: center; + pointer-events: auto; +} + +.pl-c-loader__message { + flex: 1; + padding: $pl-space; + font-size: $pl-font-size-sm-2; + color: $pl-color-white; +} + +.pl-c-loader__spinner { + position: relative; + display: inline-block; + width: $pl-doublespace * 2; + height: $pl-doublespace; +} + +.pl-c-loader-svg:not(:root) { + overflow: hidden; +} + +.pl-c-loader-svg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + transform: translateZ(0); + animation: rotate 1s linear infinite; +} + +.pl-c-loader-svg__outer-circle { + fill: none; + stroke: $pl-color-white; + stroke-width: 15; + stroke-miterlimit: 10; +} + +.pl-c-loader-svg__inner-circle, +.pl-c-loader-svg__electron { + fill: $pl-color-gray-20; +} diff --git a/packages/uikit-workshop/src/sass/pattern-lab.scss b/packages/uikit-workshop/src/sass/pattern-lab.scss index c6002f803..f9b096cdc 100755 --- a/packages/uikit-workshop/src/sass/pattern-lab.scss +++ b/packages/uikit-workshop/src/sass/pattern-lab.scss @@ -15,93 +15,111 @@ #TABLE OF CONTENTS \*------------------------------------*/ /** - * ABSTRACTS.................Variables + * ABSTRACTS.................Variables and mixins * BASE......................Reset & Base elements + * VENDOR....................Styles out of PL control * COMPONENTS................Components + * THEMES....................Theming variations * UTILITIES.................Helper classes - * VENDOR....................Styles out of PL control */ /*------------------------------------*\ #ABSTRACTS \*------------------------------------*/ -@import "scss/abstracts/variables"; -@import "scss/abstracts/mixins"; - - - - +@import 'scss/01-abstracts/variables'; +@import 'scss/01-abstracts/mixins'; /*------------------------------------*\ #BASE \*------------------------------------*/ -@import "scss/base/reset"; -@import "scss/base/body"; - - - - +@import 'scss/02-base/reset'; +@import 'scss/02-base/body'; /*------------------------------------*\ - #COMPONENTS + #VENDOR \*------------------------------------*/ - -/** - * Pattern Lab Header - */ -@import "scss/components/header"; -@import "scss/components/logo"; -@import "scss/components/navigation"; -@import "scss/components/ish-sizing"; -@import "scss/components/controls"; -@import "scss/components/tools"; - -/** - * Viewport - */ -@import "scss/components/viewport"; - -/** - * Pattern Styles - */ -@import "scss/components/pattern"; -@import "scss/components/pattern-category"; -@import "scss/components/pattern-info"; -@import "scss/components/pattern-states"; -@import "scss/components/pattern-lineage"; -@import "scss/components/breadcrumbs"; -@import "scss/components/tabs"; -@import "scss/components/tools"; -@import "scss/components/annotations"; -@import "scss/components/modal"; -@import "scss/components/text-passage"; - - - - +@import 'scss/03-vendor/prism'; /*------------------------------------*\ - #UTILITIES + #COMPONENTS \*------------------------------------*/ -@import "scss/utilities/visibility"; - - - - +@import '../scripts/components/pl-nav/pl-nav.scss'; +@import '../scripts/components/pl-search/pl-search.scss'; +@import '../scripts/components/pl-tooltip/pl-tooltip.scss'; +@import 'scss/04-components/annotations'; +@import 'scss/04-components/breadcrumbs'; +@import 'scss/04-components/pattern-category'; +@import 'scss/04-components/pattern-info'; +@import 'scss/04-components/pattern-lineage'; +@import 'scss/04-components/pattern-states'; +@import 'scss/04-components/pattern'; +@import 'scss/04-components/tabs'; +@import 'scss/04-components/text-passage'; + +.pl-c-code-copy-btn { + display: inline-block; + position: absolute; + top: 0.4rem; + right: 0.5rem; + padding: 0.2rem 0.4rem; + background-color: $pl-color-gray-07; + color: $pl-color-gray-87; + border: 1px solid $pl-color-gray-13; + border-radius: $pl-border-radius-med; + font-family: $pl-font; + font-size: $pl-font-size-norm; + text-transform: lowercase; + line-height: 1; + cursor: pointer; + z-index: 2; + transition: background-color $pl-animate-quick ease-out; + + &:hover, + &:focus { + background-color: $pl-color-gray-20; + } +} + +.pl-c-code-copy-btn__icon { + height: 1em; + width: 1em; +} + +.pl-c-code-copy-btn__icon--paste { + display: none; + + .is-copied & { + display: inline-block; + } +} + +.pl-c-code-copy-btn__icon--copy { + display: inline-block; + + .is-copied & { + display: none; + } +} + +.pl-c-body { + overflow: hidden; +} + +.pl-c-main { + overflow: hidden; + max-width: 100vw; + padding-left: .5rem; + padding-right: .5rem; +} /*------------------------------------*\ - #VENDOR + #THEMES \*------------------------------------*/ -@import "scss/vendor/typeahead"; -@import "scss/vendor/prism"; - - - - +@import 'scss/05-themes/light-theme'; +@import 'scss/05-themes/density-theme'; +@import 'scss/05-themes/sidebar-theme'; /*------------------------------------*\ - #THEMES + #UTILITIES \*------------------------------------*/ -@import "scss/themes/light-theme"; -@import "scss/themes/density-theme"; -@import "scss/themes/sidebar-theme"; \ No newline at end of file +@import 'scss/06-utilities/visibility'; diff --git a/packages/uikit-workshop/src/sass/scss/01-abstracts/_mixins.scss b/packages/uikit-workshop/src/sass/scss/01-abstracts/_mixins.scss new file mode 100644 index 000000000..56a1064b6 --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/01-abstracts/_mixins.scss @@ -0,0 +1,150 @@ +/*------------------------------------*\ + #VARIABLES +\*------------------------------------*/ + +/** + * List Reset + */ +@mixin listReset() { + list-style: none; + margin: 0; + padding: 0; +} + +/** + * Hide scrollbar + * 1) This hides scrollbars on Windows devices + */ +@mixin hideScrollBar() { + -ms-overflow-style: -ms-autohiding-scrollbar; + + &::-webkit-scrollbar { + width: 0 !important; + } +} + +/** + * Header Link Style + */ +@mixin linkStyle() { + @include noSelect; + color: inherit; + text-decoration: none; + line-height: 1; + padding: 0.7rem 0.5rem; + border: 0; + text-align: left; + transition: background-color $pl-animate-quick ease-out, + color $pl-animate-quick ease-out; + cursor: pointer; + + &:hover, + &.pl-is-active:hover { + background-color: rgba(0, 0, 0, .1); + } + + + /** + * Header link styles inside light theme + */ + + + + /** + * Header link styles inside cozy theme + */ + .pl-c-body--theme-density-cozy & { + font-size: $pl-font-size-sm-2; + padding: 1.2rem 0.8rem; + } + + /** + * Header link styles inside comfortable theme + */ + .pl-c-body--theme-density-comfortable & { + font-size: $pl-font-size-sm-2; + padding: 1.5rem 1rem; + } +} + +/** + * Accordion panel + */ +@mixin accordionPanel() { + overflow: hidden; + max-height: 0; + transition: all $pl-animate-quick ease-out; + + /** + * Active styles for when the accordion panel is open + * 1. WIP -- part of broader UI refactor + */ + &.pl-is-active { + max-height: calc(95vh - #{$offset-top} - 1rem); + max-height: calc( + var(--pl-viewport-height, calc(95vh - #{$offset-top})) - 1rem + ); /* [1] */ + overflow: auto; + -webkit-overflow-scrolling: touch; + } +} + +@mixin noSelect() { + -webkit-user-select: none; /* Chrome all / Safari all */ + -moz-user-select: none; /* Firefox all */ + -ms-user-select: none; /* IE 10+ */ + user-select: none; /* Likely future */ +} + +@mixin buttonStyles(){ + color: inherit; + text-decoration: none; + background: transparent; + border: 0; + appearance: none; + display: flex; + align-items: center; + width: 100%; + margin: 0; + flex-direction: row-reverse; + justify-content: flex-end; + cursor: pointer; + position: relative; + min-width: 30px; + + &:after { + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + pointer-events: none; + opacity: 0; + transition: opacity .1s ease; + background-color: currentColor; + } + + // &:focus, + &:hover { + &:after { + opacity: 0.1; + } + } + + &:active:hover { + &:after { + opacity: 0.2; + } + } + + &:focus { + outline: 1px dotted; + outline-offset: -1px; + + &:after { + opacity: 0.1; + } + } +} diff --git a/packages/uikit-workshop/src/sass/scss/abstracts/_variables.scss b/packages/uikit-workshop/src/sass/scss/01-abstracts/_variables.scss similarity index 62% rename from packages/uikit-workshop/src/sass/scss/abstracts/_variables.scss rename to packages/uikit-workshop/src/sass/scss/01-abstracts/_variables.scss index 2f21048fa..e0028f563 100644 --- a/packages/uikit-workshop/src/sass/scss/abstracts/_variables.scss +++ b/packages/uikit-workshop/src/sass/scss/01-abstracts/_variables.scss @@ -14,29 +14,30 @@ $pl-color-gray-07: #eee; $pl-color-gray-13: #ddd; $pl-color-gray-20: #ccc; $pl-color-gray-50: #808080; +$pl-color-gray-55: #737373; $pl-color-gray-70: #4d4c4c; $pl-color-gray-87: #222; $pl-color-black: #000; -$pl-color-trans-white-25: rgba(255,255,255,0.25); +$pl-color-trans-white-25: rgba(255, 255, 255, 0.25); -$pl-color-state-info: #02A4D5; -$pl-color-state-complete: #03790F; -$pl-color-state-inreview: #C7A118; -$pl-color-state-deprecated: #B00B02; +$pl-color-state-info: #02a4d5; +$pl-color-state-complete: #03790f; +$pl-color-state-inreview: #c7a118; +$pl-color-state-deprecated: #b00b02; // Font Family -$pl-font: "HelveticaNeue", "Helvetica", "Arial", sans-serif; +$pl-font: 'Open Sans', 'HelveticaNeue', 'Helvetica', 'Arial', sans-serif !default; // Font sizes -$pl-font-size-sm: 0.7rem; +$pl-font-size-sm: 0.9rem; $pl-font-size-sm-2: 0.85rem; $pl-font-size-norm: 1rem; $pl-font-size-large: 1.2rem; // Spacing & Padding $pl-space: 1rem; -$pl-doublespace: $pl-space*2; +$pl-doublespace: $pl-space * 2; $pl-pad: 1rem; $pl-pad-half: $pl-pad/2; $offset-top: 2rem; @@ -48,7 +49,11 @@ $pl-bp-xl: 62em; // Animations $pl-animate-quick: 0.1s; +$pl-animate-normal: 0.3s; // Borders $pl-border-radius: 3px; -$pl-border-radius-med: 6px; \ No newline at end of file +$pl-border-radius-med: 6px; + + +$pl-sidebar-width: 16rem; //Define sidebar width for calculating dimensions \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/02-base/_body.scss b/packages/uikit-workshop/src/sass/scss/02-base/_body.scss new file mode 100644 index 000000000..c3c5072a7 --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/02-base/_body.scss @@ -0,0 +1,41 @@ +/*------------------------------------*\ + #PATTERN LAB BODY +\*------------------------------------*/ + +/** +* The HTML and body elements for the Pattern Lab shell. +* 1) These exist indepenedent of any project-specific styles +* 2) Styled as IDs to avoid collisions with user tag +*/ +.pl-c-html { + min-height: 100%; + display: flex; + height: 100%; // fix for IE 11 +} + +.pl-c-body { + margin: 0; + padding: 0; + width: 100%; + -webkit-text-size-adjust: 100%; + display: flex; // Required for IE 11 to display overall PL layout correctly +} + +.pl-c-body--theme-dark, +:root { + --theme-bg: #161b3c; + --theme-primary: #464a6d; + --theme-secondary: #161f50; + --theme-text: white; + --theme-text-rgb: 255,255,255; + --theme-border: rgba(255, 255, 255, 0.2); +} + +.pl-c-body--theme-light { + --theme-bg: white; + --theme-secondary: white; + --theme-text: #262829; + --theme-text-rgb: 38, 40, 41; + --theme-primary: white; + --theme-border: #ddd; +} diff --git a/packages/uikit-workshop/src/sass/scss/base/_reset.scss b/packages/uikit-workshop/src/sass/scss/02-base/_reset.scss similarity index 69% rename from packages/uikit-workshop/src/sass/scss/base/_reset.scss rename to packages/uikit-workshop/src/sass/scss/02-base/_reset.scss index 8e8487f63..735a18995 100644 --- a/packages/uikit-workshop/src/sass/scss/base/_reset.scss +++ b/packages/uikit-workshop/src/sass/scss/02-base/_reset.scss @@ -11,7 +11,12 @@ * going to default to this. */ .pl-c-body * { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} \ No newline at end of file + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +button { + font-size: inherit; + background-color: transparent; +} diff --git a/packages/uikit-workshop/src/sass/scss/03-vendor/_prism.scss b/packages/uikit-workshop/src/sass/scss/03-vendor/_prism.scss new file mode 100644 index 000000000..417be58ad --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/03-vendor/_prism.scss @@ -0,0 +1,211 @@ +/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+handlebars+php+php-extras+twig&plugins=line-numbers+autolinker */ +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ +.pl-c-tabs__panel { + pre[class*='language-'] { + background-image: linear-gradient( + to right, + $pl-color-white, + rgba($pl-color-white, 0) + ), + linear-gradient(to left, $pl-color-white, rgba($pl-color-white, 0)), + linear-gradient(to right, #eaf0f6, rgba($pl-color-gray-07, 0)), + linear-gradient(to left, #eaf0f6, rgba($pl-color-gray-07, 0)), + linear-gradient(to bottom, $pl-color-white, rgba($pl-color-white, 0)), + linear-gradient(to top, $pl-color-white, rgba($pl-color-white, 0)), + linear-gradient(to bottom, #eaf0f6, rgba($pl-color-gray-07, 0)), + linear-gradient(to top, #eaf0f6, rgba($pl-color-gray-07, 0)); + background-color: $pl-color-white; + background-attachment: local, local, scroll, scroll, local, local, scroll, + scroll; + background-position: 0 0, 100% 0, 0 0, 100% 0, 0 0, 0 100%, 0 0, 0 100%; + background-size: 4em 100%, 4em 100%, 1em 100%, 1em 100%, 100% 4em, 100% 4em, + 100% 1em, 100% 1em; + background-repeat: no-repeat; + -ms-overflow-style: -ms-autohiding-scrollbar; + -webkit-overflow-scrolling: touch; + overflow: auto; + max-height: 100%; + } + + code[class*='language-'], + pre[class*='language-'] { + color: black; + text-shadow: 0 1px white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + word-wrap: normal; // fixes issue in Safari where code blocks can't scroll due to the code breaking into multiple lines unexpectedly + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } + + pre[class*='language-']::-moz-selection, + pre[class*='language-'] ::-moz-selection, + code[class*='language-']::-moz-selection, + code[class*='language-'] ::-moz-selection { + text-shadow: none; + background-color: #b3d4fc; + } + + pre[class*='language-']::selection, + pre[class*='language-'] ::selection, + code[class*='language-']::selection, + code[class*='language-'] ::selection { + text-shadow: none; + background-color: #b3d4fc; + } + + @media print { + code[class*='language-'], + pre[class*='language-'] { + text-shadow: none; + } + } + + /* Code blocks */ + pre[class*='language-'] { + padding: 1em; + margin: 0.5em 0; + overflow: scroll; + } + + :not(pre) > code[class*='language-'], + pre[class*='language-'] { + background-color: #f5f2f0; + } + + /* Inline code */ + :not(pre) > code[class*='language-'] { + padding: 0.1em; + border-radius: 0.3em; + } + + .token.comment, + .token.prolog, + .token.doctype, + .token.cdata { + color: slategray; + } + + .token.punctuation { + color: #999; + } + + .namespace { + opacity: 0.7; + } + + .token.property, + .token.tag, + .token.boolean, + .token.number, + .token.constant, + .token.symbol, + .token.deleted { + color: #905; + } + + .token.selector, + .token.attr-name, + .token.string, + .token.char, + .token.builtin, + .token.inserted { + color: #690; + } + + .token.operator, + .token.entity, + .token.url, + .language-css .token.string, + .style .token.string { + color: #a67f59; + background-color: hsla(0, 0%, 100%, 0.5); + } + + .token.atrule, + .token.attr-value, + .token.keyword { + color: #07a; + } + + .token.function { + color: #dd4a68; + } + + .token.regex, + .token.important, + .token.variable { + color: #e90; + } + + .token.important, + .token.bold { + font-weight: bold; + } + .token.italic { + font-style: italic; + } + + .token.entity { + cursor: help; + } + + pre.line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber; + } + + pre.line-numbers > code { + position: relative; + } + + .line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; /* works for line-numbers below 1000 lines */ + letter-spacing: -1px; + border-right: 1px solid #999; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + .line-numbers-rows > span { + pointer-events: none; + display: block; + counter-increment: linenumber; + } + + .line-numbers-rows > span:before { + content: counter(linenumber); + color: #999; + display: block; + padding-right: 0.8em; + text-align: right; + } + .token a { + color: inherit; + } +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_annotations.scss b/packages/uikit-workshop/src/sass/scss/04-components/_annotations.scss new file mode 100644 index 000000000..57c32f781 --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_annotations.scss @@ -0,0 +1,131 @@ +@charset "UTF-8"; + +/*------------------------------------*\ + #ANNOTATIONS +\*------------------------------------*/ + +/** + * Annotated elements styles + * 1) Annotation styles that appear inside the iframe + * 2) For elements in the DOM that have an annotation, we want to + * provide styles that help the user understand that annotations are available. + * We do this with some cursor helpers and a + */ +.pl-has-annotation { + cursor: help !important; + outline: 1px dotted $pl-color-gray-50; + outline-offset: -4px; + transition: box-shadow $pl-animate-quick ease; + + a, + input { + cursor: help !important; + } + + &:hover { + box-shadow: 0 0 3px $pl-color-gray-50; + } + + &.active { + box-shadow: inset 0 0 6px $pl-color-gray-70; + outline: 1px dotted $pl-color-gray-50; + outline-offset: -1px; + } +} + +/** + * Annotation tooltip + * 1) Appears inside the iframe over any element that has an + * anootation attached to it. + * 2) Annotation tip gets dynamically set to `display: none` via + * JavaScript + */ +.pl-c-annotation-tip { + display: flex; /* 2 */ + align-items: center; + justify-content: center; + width: 24px !important; + height: 24px !important; + margin-top: 6px !important; + margin-left: 6px !important; + border-radius: 50% !important; + background-color: $pl-color-gray-87 !important; + color: $pl-color-white !important; + font-size: 16px !important; + position: absolute; + z-index: 100; +} + +/*------------------------------------*\ + #ANNOTATIONS INSIDE MODAL +\*------------------------------------*/ + +/** + * Annotations area + * 1) Appears inside of modal + */ +.pl-c-annotations { + margin: 1rem 0; +} + +/** + * Annotations Title + * Says the word "Annotations" + */ +.pl-c-annotations__title { + font-size: 1.2rem !important; + margin: 0 0 0.5rem; +} + +/** + * Annotations list + * 1) Ordered list of annotations + * 2) Presented with parent selector to force styles + * over pl-c-text-passage + */ +.pl-c-annotations .pl-c-annotations__list { + counter-reset: the-count; + padding: 0; + margin: 0; + list-style: none; +} + +/** + * Annotations list item + * 1) Displays each item as a number + */ +.pl-c-annotations__item { + position: relative; + padding-left: 1.5rem; + margin-bottom: 1rem; + border-radius: $pl-border-radius-med; + transition: background-color $pl-animate-quick ease; + + &:before { + content: counter(the-count); + counter-increment: the-count; + font-size: 85%; + display: flex; + align-items: center; + justify-content: center; + width: 14px; + height: 14px; + border-radius: 50%; + padding: 2px; + text-align: center; + background-color: $pl-color-gray-50; + color: $pl-color-white; + position: absolute; + top: 4px; + left: 0; + } + + &.pl-is-active { + outline: 1px dotted $pl-color-gray-50; + outline-offset: -1px; + } +} + +.pl-c-annotations .pl-c-annotations__item-title { + margin-bottom: 0; +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_breadcrumbs.scss b/packages/uikit-workshop/src/sass/scss/04-components/_breadcrumbs.scss new file mode 100644 index 000000000..02ff2d5ab --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_breadcrumbs.scss @@ -0,0 +1,33 @@ +@charset "UTF-8"; + +/*------------------------------------*\ + #BREADCRUMBS +\*------------------------------------*/ + +/** + * 1) Breadcrumbs display a pattern's path inside the modal + */ +.pl-c-breadcrumb { + @include listReset(); + margin-bottom: 0.5rem; + display: flex; + font-size: $pl-font-size-sm; + color: inherit; + text-transform: capitalize; +} + +/** + * Breadcrumb Item + */ +.pl-c-breadcrumb__item { + color: inherit; + &:after { + content: '\25b6'; + opacity: 0.4; + font-size: 6px; + display: inline-block; + margin: 0 0.2rem; + position: relative; + top: -1px; + } +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_logo.scss b/packages/uikit-workshop/src/sass/scss/04-components/_logo.scss new file mode 100644 index 000000000..4e1fd867c --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_logo.scss @@ -0,0 +1,27 @@ +/*------------------------------------*\ + #LOGO +\*------------------------------------*/ + +/** + * 1) An optional logo that lives in PL's header. + * 2) Displayed as a link + */ +.pl-c-logo { + max-width: 2rem; + margin: 0 1rem; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + + &:focus { + outline: 1px dotted $pl-color-gray-50; + outline-offset: -1px; + } +} + +.pl-c-logo__img { + display: block; + max-width: 100%; + height: auto; +} diff --git a/packages/uikit-workshop/src/sass/scss/components/_pattern-category.scss b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-category.scss similarity index 60% rename from packages/uikit-workshop/src/sass/scss/components/_pattern-category.scss rename to packages/uikit-workshop/src/sass/scss/04-components/_pattern-category.scss index 331006f18..abe9d6142 100644 --- a/packages/uikit-workshop/src/sass/scss/components/_pattern-category.scss +++ b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-category.scss @@ -9,29 +9,29 @@ * 2) The category contains a title and optional description */ .pl-c-category { - margin-top: 6rem; - font: $pl-font !important; + margin-top: 6rem; + font: $pl-font !important; - &:first-of-type { - margin-top: 2rem; - } + &:first-of-type { + margin-top: 2rem; + } } /** * Pattern Category Title */ .pl-c-category__title { - font-size: 1.4rem !important; - color: $pl-color-gray-87 !important; - margin: 0 0 0.2rem; - text-transform: capitalize; + font-size: 1.4rem !important; + color: $pl-color-gray-87 !important; + margin: 0 0 0.2rem; + text-transform: capitalize; } /** * Pattern Category Link */ .pl-c-category__title-link { - transition: color $pl-animate-quick ease-out; + transition: color $pl-animate-quick ease-out; } /** @@ -40,11 +40,11 @@ * 2) Hide the pattern category description is it's empty */ .pl-c-category__description { - font-size: $pl-font-size-sm-2; - line-height: 1.5; - max-width: 30rem; + font-size: $pl-font-size-sm-2; + line-height: 1.5; + max-width: 30rem; - &:empty { - display: none; /* 2 */ - } -} \ No newline at end of file + &:empty { + display: none; /* 2 */ + } +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_pattern-info.scss b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-info.scss new file mode 100644 index 000000000..c5c975f0d --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-info.scss @@ -0,0 +1,142 @@ +/*------------------------------------*\ + #PATTERN INFO +\*------------------------------------*/ + +/** + * 1) Pattern info contains two side-by-side panels that + * house a pattern's information, such as title, lineage, + * code, annotations, and more. + */ +.pl-c-pattern-info { + flex-grow: 1; // fills space available when placed in the parent flex container + display: flex; + flex-direction: column; + + + /** + * Pattern info inside the "view all" template + */ + .pl-c-pattern & { + max-height: 30rem; + overflow: scroll; + display: block; + -webkit-overflow-scrolling: touch; + + @media all and (min-width: $pl-bp-large) { + max-height: none; + height: 18rem; + display: flex; + flex-direction: row; + overflow: visible; + } + } + + /** + * Pattern info inside modal + */ + .pl-c-drawer & { + overflow: auto; + -webkit-overflow-scrolling: touch; + flex-grow: 1; + + + @media all and (min-width: $pl-bp-large) { + position: static; + flex-direction: row; + } + } +} + +/** + * Pattern Info Panel + * 1) Individual panel. Left side contains pattern info + * Right side contains pattern code + */ +.pl-c-pattern-info__panel { + padding: .5rem; + flex-shrink: 0; // prevent panel from collapsing in height (especially on smaller screens like iPhone) + display: flex; + flex-direction: column; + + pl-drawer & { + padding: 1rem; + } + + @media all and (min-width: $pl-bp-large) { + flex-basis: 50%; + flex-grow: 1; + padding: 1.5rem; + } +} + +/** + * Pattern Info Panel + * 1) Left panel that contains pattern title, lineage, description, annotations + */ +.pl-c-pattern-info__panel--info { + + @media all and (min-width: $pl-bp-large) { + overflow: auto; + -webkit-overflow-scrolling: touch; + } + + @media all and (min-width: $pl-bp-xl) { + min-width: 50%; + } +} + +/** + * Pattern Code Panel + * 1) Right panel that displays the pattern's code (found in _tabs.scss) + * 2) Using a sibling selector because the pattern info isn't always present. + * The sibling selector allows the code panel to occupy the full width of + * the modal + * 1) Cap the height of the code panel in the modal + */ +.pl-c-pattern-info__panel--info + .pl-c-pattern-info__panel--code, +.pl-c-pattern-info__panel--code:first-child { + flex-grow: 1; + flex-shrink: 0; // so the code panel doesn't get chopped off accidently + min-width: 50%; +} + +.pl-c-pattern-info__panel--info + .pl-c-pattern-info__panel--code { + @media all and (max-width: $pl-bp-large) { + padding-top: 0; + } +} + +/** + * Pattern Header inside modal + */ +.pl-c-pattern-info__header { + margin-bottom: 0.5rem; +} + +/** + * Pattern Title inside modal + */ +.pl-c-pattern-info__title { + font-size: 1.4rem !important; + font-weight: bold; + margin-top: 0; + margin-bottom: 0; + color: inherit; + text-transform: capitalize; + display: inline-flex; + align-items: center; +} + +/** + * Pattern Description inside modal + */ +.pl-c-pattern-info__description { + border-bottom-color: $pl-color-gray-50; +} + +/** + * Pattern Annotations inside modal + */ +.pl-c-annotations { + border-top-color: $pl-color-gray-50; +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_pattern-lineage.scss b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-lineage.scss new file mode 100644 index 000000000..4587bc090 --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-lineage.scss @@ -0,0 +1,29 @@ +/*------------------------------------*\ + #PATTERN LINEAGE +\*------------------------------------*/ + +/** + * Pattern Lineage info + */ +.pl-c-lineage { + font-size: $pl-font-size-norm; + line-height: 1.7; + margin-top: 0; +} + +/** + * Lineage link + */ +.pl-c-lineage__link { + font-style: italic; + color: inherit; // light vs dark text + text-decoration: underline; + display: inline; + align-items: center; + transition: opacity $pl-animate-quick ease; + + &:hover, + &:focus { + opacity: 0.8; + } +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_pattern-states.scss b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-states.scss new file mode 100644 index 000000000..103fcf0a0 --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_pattern-states.scss @@ -0,0 +1,35 @@ +/*------------------------------------*\ + #PATTERN STATES +\*------------------------------------*/ + +/** +* Pattern states add color-coded dots next to patterns +* in the dropdown navigation. +*/ +.pl-c-pattern-state { + width: 0.5em; + height: 0.5em; + margin-bottom: 0.25em; + margin-left: 0.5em; + border-radius: 50%; + background-color: $pl-color-state-info; + + &--complete { + background-color: $pl-color-state-complete; + } + + &--inreview { + background-color: $pl-color-state-inreview; + } + + &--deprecated { + background-color: $pl-color-state-deprecated; + } +} + +/** +* Complete state +*/ +.complete:before { + color: #03790f !important; +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_pattern.scss b/packages/uikit-workshop/src/sass/scss/04-components/_pattern.scss new file mode 100644 index 000000000..20332371f --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_pattern.scss @@ -0,0 +1,182 @@ +/*------------------------------------*\ + #PATTERN +\*------------------------------------*/ + +/** +* Pattern +* 1) This is an individual pattern that appears in the "view all" template. +* It contains pattern title and toggle to view more information, such as +* description, lineage, code, etc. +* 2) Prevents absolutely-positioned elements from floating to the top +* 3) Prevents floated patterns from floating wraps +*/ +.pl-c-pattern { + margin-bottom: $pl-doublespace; + position: relative; /* 2 */ + clear: both; /* 3 */ +} + +/** +* Pattern Header +*/ +.pl-c-pattern__header { + position: relative; + padding: 0.5rem 0 0; + line-height: 1.3; + font-size: 90%; + color: $pl-color-gray-55; + + &:empty { + padding: 0; + } +} + +/** + * Pattern Title + */ +.pl-c-pattern__title { + font-family: $pl-font !important; + font-size: 0.85rem !important; + line-height: 1 !important; + font-weight: normal !important; + margin: 0 !important; + padding: 0 !important; + text-transform: capitalize !important; +} + +/** + * Pattern Title Link + * 1) Vertically align pattern label and pattern state badge + */ +.pl-c-pattern__title-link { + display: inline-flex; /* 1 */ + align-items: center; /* 1 */ + padding: $pl-pad 0 0.3rem; + color: $pl-color-gray-55 !important; + text-decoration: none; + cursor: pointer; + + &:hover, + &:focus { + color: $pl-color-black !important; + } +} + +/** +* Pattern Extra Toggle Button +* 1) This is the button that twirls down extra pattern info +*/ +.pl-c-pattern__extra-toggle { + font-size: 0.8rem; + position: absolute; + bottom: -1px; + right: 0; + z-index: 1; + padding: 0.4rem 0.5rem; + color: $pl-color-gray-55; + background-color: transparent; + cursor: pointer; + font-weight: normal; + transition: all $pl-animate-quick ease-out; + font-family: $pl-font; + border-color: #ddd; + border-width: 1px; // fix for different browser defaults + border-style: solid; // fix for different browser defaults (ex. Safari) + display: flex; + align-items: center; + + &:hover, + &:focus, + &.pl-is-active { + background-color: $pl-color-gray-02; + color: $pl-color-black; + } + + &:focus { + outline: 1px dotted $pl-color-gray-70; + outline-offset: -1px; + } + + &.pl-is-active { + border-bottom-color: $pl-color-gray-02; + } +} + +.pl-c-pattern__toggle-icon-wrapper { + position: relative; + height: 1rem; + width: 1rem; +} + +.pl-c-pattern__toggle-icon { + height: 0.9rem; + width: 0.9rem; + display: inline-block; + vertical-align: middle; + position: absolute; + top: 50%; + left: 50%; + transform: translate3d(-50%, -50%, 0); + transition: transform .1s linear, opacity .1s linear; +} + +.pl-c-pattern__toggle-icon--expand { + z-index: 1; + + .pl-is-active & { + opacity: 0; + } +} + +.pl-c-pattern__toggle-icon--collapse { + opacity: 0; + z-index: 2; + height: 1rem; + width: 1rem; + + .pl-is-active & { + opacity: 1; + } +} + +.pl-c-pattern__extra-toggle-text ~ .pl-c-pattern__toggle-icon-wrapper { + margin-left: 0.25rem; +} + +.pl-c-pattern__extra-toggle-text--collapse { + display: none; + + .pl-is-active & { + display: inline-block; + } +} + +.pl-c-pattern__extra-toggle-text--expand { + display: inline-block; + + .pl-is-active & { + display: none; + } +} + +/** +* Pattern Extra +* 1) This is the info panel that contains extra pattern info +* like pattern description, lineage, code, and more +*/ +.pl-c-pattern__extra { + background-color: $pl-color-gray-02; + border-top: 1px solid $pl-color-gray-13; + margin-bottom: $pl-space; + overflow: hidden; + max-height: 1px; + position: relative; + transition: all $pl-animate-quick ease-out; + + &.pl-is-active { + border: 1px solid $pl-color-gray-13; + border-radius: $pl-border-radius-med; + border-top-right-radius: 0; + max-height: 9999px; + } +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_tabs.scss b/packages/uikit-workshop/src/sass/scss/04-components/_tabs.scss new file mode 100644 index 000000000..0709dbc44 --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_tabs.scss @@ -0,0 +1,139 @@ +/*------------------------------------*\ + #TABS +\*------------------------------------*/ + +/** + * 1) Tabs contain a set of horizontally-arranged tabs + * with accompanying panels. When a tab link is clicked + * the corresponding panel becomes visible + */ +.pl-c-tabs { + padding: 0 0.5rem 0.5rem; + background-color: $pl-color-white; + border: 1px solid $pl-color-gray-13; + border-radius: $pl-border-radius-med; + font-family: $pl-font; + position: relative; + display: flex; + flex-direction: column; + max-height: 100%; + flex-grow: 1; +} + +/** + * Tab List + * 1) A unordered list that contains the tab links + */ +.pl-c-tabs__list { + display: flex; + width: 100%; + list-style: none; + margin: 0; + padding: 0.5rem 0; + background-color: $pl-color-white; +} + +/** + * Tab Link + */ +.pl-c-tabs__link { + display: block; + line-height: 1; + padding: 0.2rem 0.4rem; + border: 1px solid transparent; + border-radius: $pl-border-radius-med; + color: $pl-color-gray-55; + background-color: $pl-color-white; + cursor: pointer; + text-decoration: none; + text-transform: lowercase; + transition: all $pl-animate-quick ease-out; + + &:hover { + color: $pl-color-gray-87; + } + + /** + * Active Tab + * 1) Note: the active tab color corresponds with the Prism code block + * background color, which is why it doesn't use a Sass variable + */ + &.pl-is-active-tab { + color: $pl-color-gray-87; + background-color: $pl-color-gray-07; + border: 1px solid $pl-color-gray-13; + } +} + +.pl-c-tabs__header { + position: sticky; + z-index: 1; // fix for Safari for iOS sticky header appearing to be below the scrollable content + top: 0px; + border-top: 1px solid #ddd; + margin-left: calc(-0.5rem - 1px); + margin-right: calc(-0.5rem - 1px); + padding-left: 0.5rem; + padding-right: 0.5rem; + border: 1px solid #ddd; + margin-bottom: .5rem; + margin-top: -1px; + background-color: inherit; + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} + +/** + * Tab Content + * 1) Tab content contains the tab panels + */ +.pl-c-tabs__content { + flex-grow: 1; + flex-shrink: 1; + display: flex; + flex-basis: auto; + -webkit-overflow-scrolling: touch; + overflow-y: auto; // workaround to firefox background gradient overflow bug + + /** + * Tab content inside modal + */ + .pl-c-drawer & { + border: 0; + } +} + +/** + * Tab panel + * 1) Note: the active tab color corresponds with the Prism code block + * background color, which is why it doesn't use a Sass variable + */ +.pl-c-tabs__panel { + display: none; + width: 100%; + max-height: 100%; + + &.pl-is-active-tab { + display: block; + } + + /** + * Tab code + * 1) Targeting pre tag in here as Prism is being used for the majority of the styles + */ + pre[class*='language-'], + :not(pre) > code[class*='language-'], + pre[class*='language-'] { + background-color: transparent; + margin: 0; + padding: 0; + border: 0; + display: block; + width: 100%; + min-height: 100%; + } + + code[class*='language-'] { + background-color: transparent; + margin: 0; + } +} diff --git a/packages/uikit-workshop/src/sass/scss/04-components/_text-passage.scss b/packages/uikit-workshop/src/sass/scss/04-components/_text-passage.scss new file mode 100644 index 000000000..33b131a3b --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/04-components/_text-passage.scss @@ -0,0 +1,139 @@ +/*------------------------------------*\ + #TEXT PASSAGE +\*------------------------------------*/ + +/** + * 1) A passage of text which includes free-form tags (ul, blockquote, p, h2, etc) + * generated by markdown + */ +.pl-c-text-passage { + font-size: $pl-font-size-sm-2; + line-height: 1.7; + + p { + margin-top: 0; + margin-bottom: 1rem; + + &:last-child { + margin-bottom: 0; + } + } + + /** + * Link within the text passage + */ + a { + color: $pl-color-gray-55; + text-decoration: underline; + transition: opacity $pl-animate-quick ease; + + &:hover, + &:focus { + opacity: 0.8; + } + } + + /** + * Code + */ + code[class*='language-'], + pre[class*='language-'] { + color: inherit; + } + + /** + * Blockquote within text passage + */ + blockquote { + padding-left: 0.8rem; + border-left: 3px solid inherit; + } + + /** + * Horizontal rule + */ + hr { + height: 1px; + background-color: $pl-color-gray-50; + margin: 2rem 0; + border: 0; + } + + /** + * First-level heading within text passage + */ + h1 { + margin-bottom: 1rem; + font-weight: normal; + } + + /** + * Second-level heading within text passage + */ + h2 { + margin: 1rem 0 1rem; + font-weight: normal; + } + + /** + * Third-level heading within text passage + */ + h3 { + margin: 1rem 0 1rem; + font-weight: normal; + } + + /** + * Fourth-level heading within text passage + */ + h4 { + margin: 1rem 0 1rem; + font-weight: normal; + } + + /** + * Fifth-level heading within text passage + */ + h5 { + margin: 1rem 0 1rem; + font-weight: normal; + } + + /** + * Sixth-level heading within text passage + */ + h6 { + margin: 1rem 0 1rem; + font-weight: normal; + } + + /** + * Unordered list within text passage + */ + ul { + list-style: square; + margin-left: 0.9rem; + margin-bottom: 1rem; + + li:last-child { + margin-bottom: 0; + } + } + + /** + * Ordered list within text passage + */ + ol { + list-style: decimal; + margin-left: 0.9rem; + margin-bottom: 1rem; + + li:last-child { + margin-bottom: 0; + } + } + + li { + margin-bottom: 0.5rem; + } +} diff --git a/packages/uikit-workshop/src/sass/scss/themes/_density-theme.scss b/packages/uikit-workshop/src/sass/scss/05-themes/_density-theme.scss similarity index 50% rename from packages/uikit-workshop/src/sass/scss/themes/_density-theme.scss rename to packages/uikit-workshop/src/sass/scss/05-themes/_density-theme.scss index e97ea896b..bdd6227f5 100644 --- a/packages/uikit-workshop/src/sass/scss/themes/_density-theme.scss +++ b/packages/uikit-workshop/src/sass/scss/05-themes/_density-theme.scss @@ -6,71 +6,67 @@ * A theme that adjusts the density of the PL UI. * Options are compact (default), cozy, and comfortable */ - .pl-c-body--theme-density-cozy { - - /** +.pl-c-body--theme-density-cozy { + /** * Header */ - .pl-c-header { - font-size: $pl-font-size-sm-2; - } + .pl-c-header { + font-size: $pl-font-size-sm-2; + } - /** + /** * Size input fields */ - .pl-c-viewport-size__input { - width: 44px; - } + .pl-c-viewport-size__input { + width: 44px; + } - /** + /** * Typeahead */ - .pl-c-typeahead { - padding: 0.9rem 0.8rem; - } + .pl-c-typeahead { + padding: 0.9rem 0.8rem; + } - /** + /** * Ish sizing controls * 1) Hide on smaller screens */ - .pl-c-size-list { - @media all and (max-width: 78em) { - display: none; - } + .pl-c-size-list { + @media all and (max-width: 78em) { + display: none; } + } - /** + /** * Viewport sizing inputs * 1) Hide these controls on */ - .pl-c-viewport-size { - @media all and (max-width: 78em) { - display: none; /* 1 */ - } + .pl-c-viewport-size { + @media all and (max-width: 78em) { + display: none; /* 1 */ } + } - /** + /** * Tools menu button * 1) This is the button that contains the toggle and * triggers the tools dropdown list */ - .pl-c-tools__toggle { - min-width: 44px; - } + .pl-c-tools__toggle { + min-width: 44px; + } - /** + /** * Viewport * 1) Offset the viewport to account for the adjusted * PL header height */ - .pl-c-viewport { - top: 3.28rem; - } + .pl-c-viewport { + top: 3.28rem; + } } - - - /*------------------------------------*\ #COMFORTABLE DENSITY \*------------------------------------*/ @@ -79,78 +75,77 @@ * Biggest */ - .pl-c-body--theme-density-comfortable { - - /** +.pl-c-body--theme-density-comfortable { + /** * Header * 1) Change the font size of everything in the header */ - .pl-c-header { - font-size: $pl-font-size-sm-2; - } + .pl-c-header { + font-size: $pl-font-size-sm-2; + } - /** + /** * Logo */ - .pl-c-logo { - max-width: 4rem; - } + .pl-c-logo { + max-width: 4rem; + } - /** + /** * Typeahead dropdown list suggestion */ - .pl-c-header .tt-suggestion { - padding: 1.5rem 1rem; - } + .pl-c-header .tt-suggestion { + padding: 1.5rem 1rem; + } - /** + /** * Size input fields */ - .pl-c-viewport-size__input { - width: 44px; - } + .pl-c-viewport-size__input { + width: 44px; + } - /** + /** * Typeahead */ - .pl-c-typeahead { - padding: 0.9rem 1rem; - } + .pl-c-typeahead { + padding: 0.9rem 1rem; + } - /** + /** * Ish sizing controls * 1) Hide on smaller screens */ - .pl-c-size-list { - @media all and (max-width: 78em) { - display: none; /* 1 */ - } + .pl-c-size-list { + @media all and (max-width: 78em) { + display: none; /* 1 */ } + } - /** + /** * Viewport sizing inputs */ - .pl-c-viewport-size { - @media all and (max-width: 78em) { - display: none; /* 1 */ - } + .pl-c-viewport-size { + @media all and (max-width: 78em) { + display: none; /* 1 */ } + } - /** + /** * Tools menu button * 1) This is the button that contains the toggle and * triggers the tools dropdown list */ - .pl-c-tools__toggle { - min-width: 44px; - } + .pl-c-tools__toggle { + min-width: 44px; + } - /** + /** * Viewport * 1) Offset the viewport to account for the adjusted * PL header height */ - .pl-c-viewport { - top: 3.8rem; /* 1 */ - } -} \ No newline at end of file + .pl-c-viewport { + top: 3.8rem; /* 1 */ + } +} diff --git a/packages/uikit-workshop/src/sass/scss/05-themes/_light-theme.scss b/packages/uikit-workshop/src/sass/scss/05-themes/_light-theme.scss new file mode 100644 index 000000000..a6aeb0c85 --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/05-themes/_light-theme.scss @@ -0,0 +1,102 @@ +/*------------------------------------*\ + #LIGHT THEME +\*------------------------------------*/ + +/** + * A light-color theme for Pattern Lab, where the + * PL header and modal are light instead of dark + */ +.pl-c-body--theme-light { + /** + * Header + */ + .pl-c-header { + background-color: $pl-color-white; + border-bottom: 1px solid $pl-color-gray-20; + } + + /** + * Tools dropdown + */ + + // don't show border to the left / bottom when in vertical mode + @media all and (max-width: $pl-bp-med - 1) { + .pl-c-tools__list.pl-is-active { + border-bottom: 1px solid $pl-color-gray-20; + border-left: 1px solid $pl-color-gray-20; + } + } + + &:not(.pl-c-body--theme-sidebar) { + .pl-c-tools__list.pl-is-active { + border-bottom: 1px solid $pl-color-gray-20; + border-left: 1px solid $pl-color-gray-20; + } + } + + /** + * Nav link dropdown + */ + .pl-c-nav__link--dropdown { + color: inherit; + + &:after { + color: inherit; + } + } + + /** + * Size input + */ + .pl-c-viewport-size__input { + color: $pl-color-gray-70; + + &:hover, + &:focus { + background-color: $pl-color-gray-13; + } + } + + /** + * Typeahead container + */ + .typeahead { + background-color: $pl-color-gray-13 !important; + } + + /** + * Typeahead input + */ + .tt-input { + background-color: $pl-color-gray-07 !important; + color: $pl-color-gray-70 !important; + + &:hover { + color: $pl-color-gray-87; + background-color: $pl-color-gray-13 !important; + + &::-webkit-input-placeholder { + color: $pl-color-gray-87; + } + + &::-moz-input-placeholder { + color: $pl-color-gray-87; + } + } + } + + /** + * Modal close button + * 1) Closes the modal popup + */ + .pl-c-drawer__close-btn, + .pl-c-tools__action { + background-color: $pl-color-white; + + &:hover, + &:focus { + background-color: $pl-color-gray-07; + color: $pl-color-gray-70; + } + } +} diff --git a/packages/uikit-workshop/src/sass/scss/05-themes/_sidebar-theme.scss b/packages/uikit-workshop/src/sass/scss/05-themes/_sidebar-theme.scss new file mode 100644 index 000000000..98b8bce2a --- /dev/null +++ b/packages/uikit-workshop/src/sass/scss/05-themes/_sidebar-theme.scss @@ -0,0 +1,125 @@ +/*------------------------------------*\ + #SIDEBAR THEME +\*------------------------------------*/ + +@media all and (min-width: $pl-bp-med) { + /** + * A theme that places displays the header as a sidebar + */ + .pl-c-body--theme-sidebar { + /** + * Header + * 1) Set width to sidebar width defined above + * 2) Make header 100% of the viewport height + * 3) Stack header items on top of each other + * 4) void bottom border for light theme + */ + .pl-c-header { + width: $pl-sidebar-width; /* 1 */ + height: 100vh; /* 2 */ + padding-top: 0.5rem; + padding-bottom: 0.5rem; + flex-direction: column; /* 3 */ + border-bottom: 0; /* 4 */ + justify-content: space-between; + } + + /** + * Nav sub sub list + */ + .pl-c-nav { + flex-grow: 1; + flex-direction: column; + flex-flow: column-reverse; + } + + /** + * Nav list + * 1) Stack main categories on top of each other + * 2) Put typeahead search above nav list + */ + .pl-c-nav__list { + flex-direction: column; /* 1 */ + order: 2; /* 2 */ + } + + /** + * Nav sublist + */ + .pl-c-nav__sublist { + position: relative; + border-radius: 0; + } + + /** + * Nav sublist inside the light theme + */ + &.pl-c-body--theme-light { + .pl-c-nav__subsublist { + border-left-color: $pl-color-gray-07; + } + } + + /** + * All Nav links inside of subnav dropdown + */ + .pl-c-nav__sublist .pl-c-nav__link { + border-left: 0; + border-right: 0; + } + + /** + * Last sublist item + * 1) Undo bottom border radius when in sidebar + */ + .pl-c-nav__sublist > .pl-c-nav__item:last-child .pl-c-nav__link { + @media all and (min-width: $pl-bp-med) { + border-bottom-left-radius: 0; /* 1 */ + border-bottom-right-radius: 0; /* 1 */ + border-bottom: 0; /* 1 */ + } + } + + /** + * Nav controls + * 1) Push off of navigation in flex container so + * they appear at the bottom + */ + .pl-c-controls { + display: block; // Display flex + flex direction column gives a similar result, but this fixes a bunch of rendering quirks in IE 11 + justify-self: flex-end; + margin-left: 0; + } + + /** + * Tools toggle button + */ + .pl-c-tools__toggle { + display: none; + } + + /** + * Tools list + */ + .pl-c-tools__list { + max-height: none; + overflow: visible; + position: relative; + border-radius: 0; + display: flex; + flex-direction: column; + width: 100%; + } + + /** + * Modal + * 1) Position modal (that contains all the content) + * so it fits in remaining available space + * TODO: revisit to find ways to resize + */ + .pl-c-drawer { + right: 0; /* 1 */ + width: auto; + } + } +} diff --git a/packages/uikit-workshop/src/sass/scss/utilities/_visibility.scss b/packages/uikit-workshop/src/sass/scss/06-utilities/_visibility.scss similarity index 52% rename from packages/uikit-workshop/src/sass/scss/utilities/_visibility.scss rename to packages/uikit-workshop/src/sass/scss/06-utilities/_visibility.scss index de2ca7d46..dc59b5312 100644 --- a/packages/uikit-workshop/src/sass/scss/utilities/_visibility.scss +++ b/packages/uikit-workshop/src/sass/scss/06-utilities/_visibility.scss @@ -6,11 +6,11 @@ * Visibly hidden but still accessible to screen readers */ .is-vishidden { - position: absolute !important; - overflow: hidden; - width: 1px; - height: 1px; - padding: 0; - border: 0; - clip: rect(1px, 1px, 1px, 1px); -} \ No newline at end of file + position: absolute !important; + overflow: hidden; + width: 1px; + height: 1px; + padding: 0; + border: 0; + clip: rect(1px, 1px, 1px, 1px); +} diff --git a/packages/uikit-workshop/src/sass/scss/abstracts/_mixins.scss b/packages/uikit-workshop/src/sass/scss/abstracts/_mixins.scss deleted file mode 100644 index 64d6cc6d8..000000000 --- a/packages/uikit-workshop/src/sass/scss/abstracts/_mixins.scss +++ /dev/null @@ -1,96 +0,0 @@ -/*------------------------------------*\ - #VARIABLES -\*------------------------------------*/ - -/** - * List Reset - */ -@mixin listReset() { - list-style: none; - margin: 0; - padding: 0; -} - -/** - * Hide scrollbar - * 1) This hides scrollbars on Windows devices - */ - @mixin hideScrollBar() { - -ms-overflow-style: -ms-autohiding-scrollbar; - - &::-webkit-scrollbar { - width: 0 !important - } -} - -/** - * Header Link Style - */ -@mixin linkStyle() { - background: $pl-color-black; - color: $pl-color-gray-50; - text-decoration: none; - line-height: 1; - padding: 0.7rem 0.5rem; - border: 0; - text-align: left; - transition: background $pl-animate-quick ease-out, color $pl-animate-quick ease-out; - - &:hover { - color: $pl-color-white; - background: $pl-color-gray-87; - } - - &:focus, &.active { - color: $pl-color-white; - background: $pl-color-gray-87; - outline: 1px dotted $pl-color-gray-50; - outline-offset: -1px; - } - - /** - * Header link styles inside light theme - */ - .pl-c-body--theme-light & { - background: $pl-color-white; - color: $pl-color-gray-70; - } - - /** - * Header link styles inside cozy theme - */ - .pl-c-body--theme-density-cozy & { - font-size: $pl-font-size-sm-2; - padding: 1.2rem 0.8rem; - } - - /** - * Header link styles inside comfortable theme - */ - .pl-c-body--theme-density-comfortable & { - font-size: $pl-font-size-sm-2; - padding: 1.5rem 1rem; - } -} - -/** - * Accordion panel - */ -@mixin accordionPanel() { - overflow: hidden; - max-height: 0; - transition: max-height $pl-animate-quick ease-out; - - /** - * Active is when accordion panel is open - */ - &.pl-is-active { - max-height: none; - overflow: auto; - @include hideScrollBar(); - - @media all and (min-width: $pl-bp-med) { - max-height: 120rem; - } - } -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/base/_body.scss b/packages/uikit-workshop/src/sass/scss/base/_body.scss deleted file mode 100644 index 67fc00a39..000000000 --- a/packages/uikit-workshop/src/sass/scss/base/_body.scss +++ /dev/null @@ -1,15 +0,0 @@ -/*------------------------------------*\ - #PATTERN LAB BODY -\*------------------------------------*/ - -/** -* The HTML and body elements for the Pattern Lab shell. -* 1) These exist indepenedent of any project-specific styles -* 2) Styled as IDs to avoid collisions with user tag -*/ -.pl-c-body { - margin: 0; - padding: 0; - background: $pl-color-gray-13; - -webkit-text-size-adjust: 100%; -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/components/_annotations.scss b/packages/uikit-workshop/src/sass/scss/components/_annotations.scss deleted file mode 100644 index 4854d1bc9..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_annotations.scss +++ /dev/null @@ -1,135 +0,0 @@ -@charset "UTF-8"; - -/*------------------------------------*\ - #ANNOTATIONS -\*------------------------------------*/ - -/** - * Annotated elements styles - * 1) Annotation styles that appear inside the iframe - * 2) For elements in the DOM that have an annotation, we want to - * provide styles that help the user understand that annotations are available. - * We do this with some cursor helpers and a - */ -.pl-has-annotation { - cursor: help !important; - outline: 1px dotted $pl-color-gray-50; - outline-offset: -4px; - transition: box-shadow $pl-animate-quick ease; - - a, - input { - cursor: help !important; - } - - &:hover { - box-shadow: 0 0 3px $pl-color-gray-50; - } - - &.active { - box-shadow: inset 0 0 6px $pl-color-gray-70; - outline: 1px dotted $pl-color-gray-50; - outline-offset: -1px; - } -} - -/** - * Annotation tooltip - * 1) Appears inside the iframe over any element that has an - * anootation attached to it. - * 2) Annotation tip gets dynamically set to `display: none` via - * JavaScript - */ -.pl-c-annotation-tip { - display: flex; /* 2 */ - align-items: center; - justify-content: center; - width: 24px !important; - height: 24px !important; - margin-top: 6px !important; - margin-left: 6px !important; - border-radius: 50% !important; - background: $pl-color-gray-87 !important; - color: $pl-color-white !important; - font-size: 16px !important; - position: absolute; - z-index: 100; -} - - - - - -/*------------------------------------*\ - #ANNOTATIONS INSIDE MODAL -\*------------------------------------*/ - -/** - * Annotations area - * 1) Appears inside of modal - */ -.pl-c-annotations { - margin: 1rem 0; -} - -/** - * Annotations Title - * Says the word "Annotations" - */ -.pl-c-annotations__title { - font-size: 1.2rem !important; - margin: 0 0 0.5rem; -} - -/** - * Annotations list - * 1) Ordered list of annotations - * 2) Presented with parent selector to force styles - * over pl-c-text-passage - */ -.pl-c-annotations .pl-c-annotations__list { - counter-reset: the-count; - padding: 0; - margin: 0; - list-style: none; -} - -/** - * Annotations list item - * 1) Displays each item as a number - */ -.pl-c-annotations__item { - position: relative; - padding-left: 1.5rem; - margin-bottom: 1rem; - border-radius: $pl-border-radius-med; - transition: background $pl-animate-quick ease; - - &:before { - content: counter(the-count); - counter-increment: the-count; - font-size: 85%; - display: flex; - align-items: center; - justify-content: center; - width: 14px; - height: 14px; - border-radius: 50%; - padding: 2px; - text-align: center; - background: $pl-color-gray-50; - color: $pl-color-white; - position: absolute; - top: 4px; - left: 0; - } - - &.pl-is-active { - outline: 1px dotted $pl-color-gray-50; - outline-offset: -1px; - } -} - -.pl-c-annotations .pl-c-annotations__item-title { - margin-bottom: 0; -} diff --git a/packages/uikit-workshop/src/sass/scss/components/_breadcrumbs.scss b/packages/uikit-workshop/src/sass/scss/components/_breadcrumbs.scss deleted file mode 100644 index 6e27eb1a2..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_breadcrumbs.scss +++ /dev/null @@ -1,32 +0,0 @@ -@charset "UTF-8"; - -/*------------------------------------*\ - #BREADCRUMBS -\*------------------------------------*/ - -/** - * 1) Breadcrumbs display a pattern's path inside the modal - */ -.pl-c-breadcrumb { - @include listReset(); - margin-bottom: 0.5rem; - display: flex; - font-size: $pl-font-size-sm; - color: $pl-color-gray-50; - text-transform: capitalize; -} - -/** - * Breadcrumb Item - */ -.pl-c-breadcrumb__item { - &:after { - content: "\25b6"; - opacity: 0.4; - font-size: 6px; - display: inline-block; - margin: 0 0.2rem; - position: relative; - top: -1px; - } -} diff --git a/packages/uikit-workshop/src/sass/scss/components/_controls.scss b/packages/uikit-workshop/src/sass/scss/components/_controls.scss deleted file mode 100644 index f209922a7..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_controls.scss +++ /dev/null @@ -1,22 +0,0 @@ -/*------------------------------------*\ - #CONTROLS -\*------------------------------------*/ - -/** - * 1) Controls contains viewport resizer and tools dropdown - * 2) Right-align inside of header - */ -.pl-c-controls { - margin-left: auto; /* 2 */ - display: flex; - flex-wrap: nowrap; -} - -/** -* Control list -*/ -.pl-c-controls__list { - @include listReset(); - display: flex; - flex-wrap: nowrap; -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/components/_header.scss b/packages/uikit-workshop/src/sass/scss/components/_header.scss deleted file mode 100644 index cc91bd608..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_header.scss +++ /dev/null @@ -1,36 +0,0 @@ -/*------------------------------------*\ - #HEADER -\*------------------------------------*/ - -/** -* 1) Pattern Lab's header is fixed across the top of the viewport and -* contains the primary pattern navigation, viewport resizing items, -* and tools. -* 2) Display nav and controls horizontally -*/ -.pl-c-header { - position: fixed; - top: 0; - left: 0; - z-index: 4; - display: flex; /* 2 */ - width: 100%; - background: $pl-color-black; - color: $pl-color-gray-50; - font-family: $pl-font; - font-size: $pl-font-size-sm; -} - -/** - * Nav toggle button - * 1) Styles for the general nav toggle button, which - * only appears on small screens - */ - .pl-c-header__nav-toggle { - @include linkStyle(); - border: 0; - - @media all and (min-width: $pl-bp-med) { - display: none; - } -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/components/_ish-sizing.scss b/packages/uikit-workshop/src/sass/scss/components/_ish-sizing.scss deleted file mode 100644 index a7fbb2da9..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_ish-sizing.scss +++ /dev/null @@ -1,85 +0,0 @@ -/*------------------------------------*\ - #ISH SIZING -\*------------------------------------*/ - -/** - * Viewport size form - * 1) This is the form for the form that houses the current - * viewport size in px and em - */ -.pl-c-viewport-size { - margin: 0; - border: 0; - padding: 0.3rem 0.5rem 0.4rem; - line-height: 1; - display: flex; - align-items: center; -} - -/** - * Size input fields - */ -.pl-c-viewport-size__input { - padding: 0.1rem; - margin: 0; - border: 0; - border-radius: $pl-border-radius; - background: transparent; - font-size: inherit; - color: $pl-color-gray-50; - width: 35px; - text-align: right; - transition: all $pl-animate-quick ease-out; - - &::-moz-focus-inner { - padding: 0; - border: 0; - } - - &:hover { - color: $pl-color-white; - background: $pl-color-gray-87; - } - - &:active, &:focus { - color: $pl-color-white; - background: $pl-color-gray-87; - outline: 1px dotted $pl-color-gray-50; - outline-offset: -1px; - } -} - -/** - * Size input labels - */ -.pl-c-viewport-size__label { - display: block; - margin: 0; - padding: 0; -} - -/** - * Size options - * 1) This holds the S, M, L, Rand, Disco links - * 2) Depending on the config, these number of options may be - * larger or smaller. - */ -.pl-c-size-list { - display: none; - list-style: none; - margin: 0; - padding: 0; - - @media all and (min-width: $pl-bp-large) { - display: block; - display: flex; - } -} - -/** - * Size actions - * 1) These are the buttons that control the viewport resizing - */ -.pl-c-size-list__action { - @include linkStyle(); -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/components/_logo.scss b/packages/uikit-workshop/src/sass/scss/components/_logo.scss deleted file mode 100644 index 20290f604..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_logo.scss +++ /dev/null @@ -1,27 +0,0 @@ -/*------------------------------------*\ - #LOGO -\*------------------------------------*/ - -/** - * 1) An optional logo that lives in PL's header. - * 2) Displayed as a link - */ -.pl-c-logo { - max-width: 2rem; - margin: 0 1rem; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - - &:focus { - outline: 1px dotted $pl-color-gray-50; - outline-offset: -1px; - } -} - -.pl-c-logo__img { - display: block; - max-width: 100%; - height: auto; -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/components/_modal.scss b/packages/uikit-workshop/src/sass/scss/components/_modal.scss deleted file mode 100644 index 3fa1934b5..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_modal.scss +++ /dev/null @@ -1,144 +0,0 @@ -/*------------------------------------*\ - #MODAL -\*------------------------------------*/ - -/** - * 1) The modal slides up from the bottom of the viewport when - * "show pattern info" is selected on the pattern detail screen. - */ -.pl-c-modal { - display: none; - font-family: $pl-font; - background: $pl-color-black; - color: $pl-color-gray-20; - position: relative; - top: auto; - bottom: 0; - left: 0; - z-index: 5; - width: 100%; - height: 50%; - transition: bottom 0.3s ease-out; - - /** - * Active modal - */ - &.pl-is-active { - display: flex; - flex-direction: column; - bottom: 0; - } -} - -.pl-c-modal__toolbar { - display: flex; -} - -/** - * Modal close button - * 1) Closes the modal popup - */ -.pl-c-modal__close-btn { - font-size: 70%; - background: $pl-color-black; - color: $pl-color-gray-50; - border: 0; - border-radius: $pl-border-radius-med $pl-border-radius-med 0 0; - display: inline-block; - padding: 0.5rem 0.5rem 0.3rem; - margin: 0; - text-decoration: none; - cursor: pointer; - z-index: 2; - transition: all $pl-animate-quick ease-out; - - &:hover, - &:focus { - background: $pl-color-gray-87; - color: $pl-color-white; - } - - &:focus, - &:active { - outline: 1px dotted $pl-color-gray-50; - outline-offset: -2px; - } - - /** - * Modal close button inside active modal - * 1) Move modal button outside of the modal window - */ - .pl-c-modal.pl-is-active & { - bottom: 100%; /* 1 */ - } -} - -.pl-c-modal__cover { - width: 100%; - height: 100%; - display: none; - position: absolute; - z-index: 20; - cursor: move; -} - -.pl-c-modal__resizer { - display: flex; - align-items: center; - justify-content: center; - left: 0; - height: 14px; - width: 100%; - background: $pl-color-black; - z-index: 2; - cursor: ns-resize; - - &:after { - content: ""; - height: 3px; - width: 50px; - border-top: 1px solid $pl-color-gray-50; - border-bottom: 1px solid $pl-color-gray-50; - transition: border-color $pl-animate-quick ease-out; - } - - &:hover:after, - &:focus:after { - border-color: $pl-color-white; - } -} - -/** - * Close button icon - * 1) Displayed as an e - */ -.pl-c-modal__close-btn-icon { - width: 12px; - height: 12px; - color: currentColor; - fill: currentColor; - transition: fill $pl-animate-quick ease-out; -} - -.pl-c-code-copy-btn { - display: inline-block; - position: absolute; - top: 0.5rem; - right: 0.5rem; - padding: 0.2rem 0.4rem; - background: $pl-color-gray-07; - color: $pl-color-gray-87; - border: 1px solid $pl-color-gray-13; - border-radius: $pl-border-radius-med; - font-family: $pl-font; - font-size: $pl-font-size-norm; - text-transform: lowercase; - line-height: 1; - cursor: pointer; - z-index: 2; - transition: background $pl-animate-quick ease-out; - - &:hover, &:focus { - background: $pl-color-gray-20; - } -} diff --git a/packages/uikit-workshop/src/sass/scss/components/_navigation.scss b/packages/uikit-workshop/src/sass/scss/components/_navigation.scss deleted file mode 100644 index fdf636143..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_navigation.scss +++ /dev/null @@ -1,189 +0,0 @@ -/*------------------------------------*\ - #NAVIGATION -\*------------------------------------*/ - -/** - * Navigation container - * 1) Collapse height on small screens. Menu trigger button - * activates nav - */ -.pl-c-nav { - @media all and (max-width: $pl-bp-med) { - position: absolute; - top: 100%; - width: 100%; - overflow: hidden; - max-height: 0; /* 1 */ - background: $pl-color-black; - display: flex; - flex-direction: column; - transition: max-height $pl-animate-quick ease-out; - - /** - * Active navigaiton - * 1) Slide - * 2) Set the height to the vierport height minus the height - * of the header - */ - &.pl-is-active { - max-height: 50rem; /* 1 */ - height: calc(100vh - #{$offset-top}); /* 2 */ - overflow: auto; - @include hideScrollBar(); - } - } - - @media all and (min-width: $pl-bp-med) { - display: flex; - } -} - -/** - * Nav list - * 1) appears as an
      - * 2) display as a horizontal list on larger screens - * 3) On small screens, move the nav list after the typeahead form field - */ -.pl-c-nav__list { - z-index: 1; - margin: 0; - padding: 0; - list-style: none; - - @media all and (max-width: $pl-bp-med) { - order: 2; /* 3 */ - } - - @media all and (min-width: $pl-bp-med) { - display: flex; /* 2 */ - } -} - -/** - * Nav list item - */ -.pl-c-nav__item { - cursor: pointer; - position: relative; -} - -/** - * Last sublist item - */ -.pl-c-nav__sublist > .pl-c-nav__item:last-child { - @media all and (min-width: $pl-bp-med) { - overflow: hidden; - border-bottom-left-radius: $pl-border-radius-med; - border-bottom-right-radius: $pl-border-radius-med; - } -} - -/** - * Nav link - */ -.pl-c-nav__link { - display: flex; - align-items: center; - @include linkStyle(); -} - -/** - * Nav sublink - * 1) Visually differentiate sub-item links from - * the other links. Creates better hierarchy. - */ -.pl-c-nav__link--sublink { - text-transform: none; - padding-left: 1rem; -} - -/** - * Nav link - */ -.pl-c-nav__link--dropdown { - - /** - * Dropdown caret after accordion handle - */ - &:after { - content: '\25bc'; - color: $pl-color-trans-white-25; - display: inline-block; - font-size: 7px; - position: relative; - top: 1px; - right: -2px; - transition: all $pl-animate-quick ease-out; - } - - &:hover, &:focus { - &:after { - color: $pl-color-gray-50; - } - } - - /** - * Active dropdown - */ - &.pl-is-active { - color: $pl-color-white; - background: $pl-color-gray-87; - - /** - * Caret rotation and positioning in active dropdown - */ - &:after { - color: $pl-color-gray-50; - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); - } - } -} - -/** - * Nav sublist - * 1) On larger screens, display as dropdowns that - * hang over the header - */ -.pl-c-nav__sublist { - @include listReset(); - - @media all and (min-width: $pl-bp-med) { - position: absolute; - top: 100%; /* 1 */ - left: 0; - min-width: 10rem; - overflow: hidden; - border-bottom-left-radius: $pl-border-radius-med; - border-bottom-right-radius: $pl-border-radius-med; - } -} - -/** - * Dropdown sublist - */ -.pl-c-nav__sublist--dropdown, .pl-c-nav__subsublist--dropdown { - @include listReset(); - @include accordionPanel(); -} - -/** - * Dropdown sublist - * 1) Set the height to the viewport height minus the height of the header - */ -.pl-c-nav__sublist--dropdown.pl-is-active { - @media all and (min-width: $pl-bp-med) { - height: calc(100vh - #{$offset-top}); /* 1 */ - } -} - -/** - * Sub-navigation - * 1) Third-level links are stylistically different - * than first and second nav links. - */ -.pl-c-nav__subsublist { - @include listReset(); -} - diff --git a/packages/uikit-workshop/src/sass/scss/components/_pattern-info.scss b/packages/uikit-workshop/src/sass/scss/components/_pattern-info.scss deleted file mode 100644 index 4c43f8619..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_pattern-info.scss +++ /dev/null @@ -1,148 +0,0 @@ -/*------------------------------------*\ - #PATTERN INFO -\*------------------------------------*/ - -/** - * 1) Pattern info contains two side-by-side panels that - * house a pattern's information, such as title, lineage, - * code, annotations, and more. - */ -.pl-c-pattern-info { - - @media all and (min-width: $pl-bp-large) { - display: flex; - } - - /** - * Pattern info inside the "view all" template - */ - .pl-c-pattern & { - max-height: 20rem; - overflow: scroll; - @include hideScrollBar(); - - @media all and (min-width: $pl-bp-large) { - max-height: none; - height: 18rem; - overflow: visible; - } - } - - /** - * Pattern info inside modal - */ - .pl-c-modal & { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - overflow: scroll; - @include hideScrollBar(); - - @media all and (min-width: $pl-bp-large) { - position: static; - overflow: visible; - } - } -} - -/** - * Pattern Info Panel - * 1) Individual panel. Left side contains pattern info - * Right side contains pattern code - */ -.pl-c-pattern-info__panel { - padding: 1rem; - - @media all and (min-width: $pl-bp-large) { - flex: auto; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - } - - .pl-c-modal & { - @media all and (min-width: $pl-bp-xl) { - padding-left: 2rem; - } - } -} - -/** - * Pattern Info Panel - * 1) Left panel that contains pattern title, lineage, description, annotations - */ -.pl-c-pattern-info__panel--info { - padding-top: 2rem; - - @media all and (min-width: $pl-bp-large) { - left: 0; - right: 50%; - overflow: scroll; - @include hideScrollBar(); - } - - @media all and (min-width: $pl-bp-xl) { - right: 55%; - } -} - -/** - * Pattern Code Panel - * 1) Right panel that displays the pattern's code (found in _tabs.scss) - * 2) Using a sibling selector because the pattern info isn't always present. - * The sibling selector allows the code panel to occupy the full width of - * the modal - * 1) Cap the height of the code panel in the modal - */ - .pl-c-pattern-info__panel--info + .pl-c-pattern-info__panel--code { - - @media all and (min-width: $pl-bp-large) { - right: 0; - left: 50%; - top: 1.2rem; - } - - @media all and (min-width: $pl-bp-xl) { - left: 45%; - } -} - - -/** - * Pattern Header inside modal - */ - .pl-c-pattern-info__header { - margin-bottom: 0.5rem; -} - -/** - * Pattern Title inside modal - */ -.pl-c-pattern-info__title { - font-size: 1.4rem !important; - font-weight: normal; - margin-top: 0; - margin-bottom: 0; - color: inherit; - text-transform: capitalize; - display: inline-flex; - align-items: center; -} - -/** - * Pattern Description inside modal - */ - .pl-c-pattern-info__description { - border-bottom-color: $pl-color-gray-50; -} - -/** - * Pattern Annotations inside modal - */ -.pl-c-annotations { - border-top-color: $pl-color-gray-50; -} diff --git a/packages/uikit-workshop/src/sass/scss/components/_pattern-lineage.scss b/packages/uikit-workshop/src/sass/scss/components/_pattern-lineage.scss deleted file mode 100644 index 7fd144889..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_pattern-lineage.scss +++ /dev/null @@ -1,28 +0,0 @@ -/*------------------------------------*\ - #PATTERN LINEAGE -\*------------------------------------*/ - -/** - * Pattern Lineage info - */ -.pl-c-lineage { - font-size: $pl-font-size-sm-2; - line-height: 1.7; - margin-top: 0; -} - -/** - * Lineage link - */ -.pl-c-lineage__link { - font-style: italic; - color: $pl-color-gray-50; - text-decoration: underline; - display: inline-flex; - align-items: center; - transition: opacity $pl-animate-quick ease; - - &:hover, &:focus { - opacity: 0.8; - } -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/components/_pattern-states.scss b/packages/uikit-workshop/src/sass/scss/components/_pattern-states.scss deleted file mode 100644 index 408abc62d..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_pattern-states.scss +++ /dev/null @@ -1,40 +0,0 @@ -/*------------------------------------*\ - #PATTERN STATES -\*------------------------------------*/ - -/** -* Pattern states add color-coded dots next to patterns -* in the dropdown navigation. -*/ -.pl-c-pattern-state { - display: inline-block; - width: 5px; - height: 5px; - margin-left: 10px; - position: relative; - top: 5px; - left: 0; - border-radius: 50%; - background: $pl-color-state-info; - line-height: 4px; - text-indent: 10px; - - &--complete { - background: $pl-color-state-complete; - } - - &--inreview { - background: $pl-color-state-inreview; - } - - &--deprecated { - background: $pl-color-state-deprecated; - } -} - -/** -* Complete state -*/ -.complete:before { - color: #03790F !important; -} diff --git a/packages/uikit-workshop/src/sass/scss/components/_pattern.scss b/packages/uikit-workshop/src/sass/scss/components/_pattern.scss deleted file mode 100644 index 4515c6d05..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_pattern.scss +++ /dev/null @@ -1,131 +0,0 @@ -/*------------------------------------*\ - #PATTERN -\*------------------------------------*/ - -/** -* Pattern -* 1) This is an individual pattern that appears in the "view all" template. -* It contains pattern title and toggle to view more information, such as -* description, lineage, code, etc. -* 2) Prevents absolutely-positioned elements from floating to the top -* 3) Prevents floated patterns from floating wraps -*/ -.pl-c-pattern { - margin-bottom: $pl-doublespace; - position: relative; /* 2 */ - clear: both; /* 3 */ -} - - -/** -* Pattern Header -*/ -.pl-c-pattern__header { - position: relative; - padding: 0.5rem 0 0; - line-height: 1.3; - font-size: 90%; - color: $pl-color-gray-50; - - &:empty { - padding: 0; - } -} - - -/** - * Pattern Title - */ -.pl-c-pattern__title { - font-family: $pl-font !important; - font-size: 0.85rem !important; - line-height: 1 !important; - font-weight: normal !important; - margin: 0 !important; - padding: 0 !important; - text-transform: capitalize !important; -} - -/** - * Pattern Title Link - * 1) Vertically align pattern label and pattern state badge - */ -.pl-c-pattern__title-link { - display: inline-flex; /* 1 */ - align-items: flex-start; /* 1 */ - padding: $pl-pad 0 0.3rem; - color: $pl-color-gray-50 !important; - text-decoration: none; - cursor: pointer; - - &:hover, &:focus { - color: $pl-color-black !important; - } -} - -/** -* Pattern Extra Toggle Button -* 1) This is the button that twirls down extra pattern info -*/ -.pl-c-pattern__extra-toggle { - font-size: 9px; - position: absolute; - bottom: -1px; - right: 0; - z-index: 1; - padding: 0.65em 0.65em 0.5em; - line-height: 1; - color: $pl-color-gray-50; - background: transparent; - font-weight: normal; - border: 1px solid $pl-color-gray-13; - border-top-left-radius: $pl-border-radius-med; - border-top-right-radius: $pl-border-radius-med; - transition: background $pl-animate-quick ease-out; - - .pl-c-pattern__toggle-icon { - display: inline-block; - } - - &:hover, &:focus, &.pl-is-active { - background: $pl-color-gray-02; - color: $pl-color-black; - } - - &:focus { - outline: 1px dotted $pl-color-gray-70; - } - - &.pl-is-active { - border-bottom-color: $pl-color-gray-02; - - .pl-c-pattern__toggle-icon { - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); - } - } -} - - -/** -* Pattern Extra -* 1) This is the info panel that contains extra pattern info -* like pattern description, lineage, code, and more -*/ -.pl-c-pattern__extra { - background: $pl-color-gray-02; - border-top: 1px solid $pl-color-gray-13; - margin-bottom: $pl-space; - overflow: hidden; - max-height: 1px; - position: relative; - transition: all $pl-animate-quick ease-out; - - &.pl-is-active { - border: 1px solid $pl-color-gray-13; - border-radius: $pl-border-radius-med; - border-top-right-radius: 0; - max-height: 150rem; - } -} diff --git a/packages/uikit-workshop/src/sass/scss/components/_tabs.scss b/packages/uikit-workshop/src/sass/scss/components/_tabs.scss deleted file mode 100644 index 2efb2534f..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_tabs.scss +++ /dev/null @@ -1,136 +0,0 @@ -/*------------------------------------*\ - #TABS -\*------------------------------------*/ - -/** - * 1) Tabs contain a set of horizontally-arranged tabs - * with accompanying panels. When a tab link is clicked - * the corresponding panel becomes visible - */ -.pl-c-tabs { - padding: 0 0.5rem 0.5rem; - background: $pl-color-white; - border: 1px solid $pl-color-gray-13; - border-radius: $pl-border-radius-med; - font-family: $pl-font; - position: relative; - display: flex; - flex-direction: column; - overflow: hidden; - - /** - * Tabs inside a code panel - */ - .pl-c-pattern-info__panel--code & { - - @media all and (min-width: $pl-bp-large) { - position: absolute; - top: 1rem; - bottom: 1rem; - left: 1rem; - right: 1rem; - } - } - - .pl-c-modal & { - @media all and (min-width: $pl-bp-xl) { - right: 2rem; - left: 2rem; - } - } -} - -/** - * Tab List - * 1) A unordered list that contains the tab links - */ -.pl-c-tabs__list { - display: flex; - width: 100%; - list-style: none; - margin: 0; - padding: 0.5rem 0; - background: $pl-color-white; -} - -/** - * Tab Link - */ -.pl-c-tabs__link { - display: block; - line-height: 1; - padding: 0.2rem 0.4rem; - border: 1px solid transparent; - border-radius: $pl-border-radius-med; - background: $pl-color-white; - color: $pl-color-gray-50; - cursor: pointer; - text-decoration: none; - text-transform: lowercase; - transition: all $pl-animate-quick ease-out; - - &:hover { - color: $pl-color-gray-87; - } - - /** - * Active Tab - * 1) Note: the active tab color corresponds with the Prism code block - * background color, which is why it doesn't use a Sass variable - */ - &.pl-is-active-tab { - color: $pl-color-gray-87; - background: $pl-color-gray-07; - border: 1px solid $pl-color-gray-13; - } -} - -/** - * Tab Content - * 1) Tab content contains the tab panels - */ -.pl-c-tabs__content { - flex: 1 0 auto; - overflow: scroll; - @include hideScrollBar(); - height: 100%; - padding-top: 0.5rem; - - /** - * Tab content inside modal - */ - .pl-c-modal & { - border: 0; - } -} - -/** - * Tab panel - * 1) Note: the active tab color corresponds with the Prism code block - * background color, which is why it doesn't use a Sass variable - */ -.pl-c-tabs__panel { - display: none; - min-height: 12rem; - - &.pl-is-active-tab { - display: block; - } - - /** - * Tab code - * 1) Targeting pre tag in here as Prism is being used for the majority of the styles - */ - pre[class*=language-], :not(pre) > code[class*="language-"], pre[class*="language-"] { - background: transparent; - margin: 0; - padding: 0; - border: 0; - display: block; - } - - code[class*=language-] { - background: transparent; - margin: 0; - } -} diff --git a/packages/uikit-workshop/src/sass/scss/components/_tools.scss b/packages/uikit-workshop/src/sass/scss/components/_tools.scss deleted file mode 100644 index 3a9d688e7..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_tools.scss +++ /dev/null @@ -1,65 +0,0 @@ -/*------------------------------------*\ - #TOOLS -\*------------------------------------*/ - -/** - * The tools dropdown contains more utilities such as show/hide - * pattern info and pattern search, and also links to open in a - * new window and view the documentation - */ -.pl-c-tools { - position: relative; - display: flex; -} - -/** - * Tools menu button - * 1) This is the button that contains the toggle and - * triggers the tools dropdown list - */ -.pl-c-tools__toggle { - @include linkStyle(); - margin: 0; - padding-top: 0.6rem; - padding-bottom: 0.5rem; - display: inline-flex; - align-items: center; - justify-content: center; - position: relative; - min-width: 30px; -} - -/** - * Tools Toggle SVG icon - * 1) Cog icon - * 2) Set the width and height of the icon to be the same height of font - */ -.pl-c-tools__toggle-icon { - position: absolute; -} - -/** - * Tools dropdown list - */ -.pl-c-tools__list { - @include listReset(); - @include accordionPanel(); - position: absolute; - top: 100%; - right: 0; - z-index: 1; - width: 10rem; - border-bottom-left-radius: $pl-border-radius-med; - border-bottom-right-radius: $pl-border-radius-med; -} - -/** - * Tools dropdown actions - * 1) Links and buttons inside of the tools dropdown - */ -.pl-c-tools__action { - @include linkStyle(); - display: block; - width: 100%; - margin: 0; -} \ No newline at end of file diff --git a/packages/uikit-workshop/src/sass/scss/components/_viewport.scss b/packages/uikit-workshop/src/sass/scss/components/_viewport.scss deleted file mode 100644 index 082f77a37..000000000 --- a/packages/uikit-workshop/src/sass/scss/components/_viewport.scss +++ /dev/null @@ -1,132 +0,0 @@ -/*------------------------------------*\ - #VIEWPORT -\*------------------------------------*/ - -/** -* To keep user code and PL code separate, and to make -* resizing the viewport possible, PL contains an iframe -* that houses all user code. -*/ - -/** -* Viewport -* 1) This wrapper div occupies all remaining viewport space after PL's header -*/ -.pl-c-viewport { - display: flex; - flex-direction: column; - height: 100vh; - width: 100%; - position: relative; - top: $offset-top; - bottom: 0; - left: 0; - right: 0; - z-index: 0; - overflow: hidden; -} - -/** -* Cover -* 1) This is an invisible div that sits above the iframe and is -* used in JS for manual viewport resizing purposes. -*/ -.pl-c-viewport__cover { - width: 100%; - height: 100%; - display: none; - position: absolute; - z-index: 20; - cursor: move; -} - -/** -* Viewport iframe wrapper -* 1) This is the container that houses the -* iframe and the manual resize handle -*/ -.pl-c-viewport__iframe-wrapper { - height: 100%; - position: relative; - margin: 0 auto; - flex: 1; - -webkit-overflow-scrolling: touch; - overflow-y: auto; - overflow-x: hidden; - - &.hay-mode { - transition: all 40s linear; - } -} - -/** -* Viewport iframe -* 1) this is the actual + +
      +
      + + Drag to resize Pattern Lab + + +
      +
      +
    +
    + `; + } + + handleMouseDown(event) { + // capture default data + const self = this; + self.querySelector('.pl-js-resize-handle').classList.add('is-resizing'); + const origClientX = event.clientX; + const origViewportWidth = this.iframeContainer.clientWidth; + + this.fullMode = false; + + // show the cover + this.iframeCover.style.display = 'block'; + + function handleIframeCoverResize(e) { + const viewportWidth = origViewportWidth + 2 * (e.clientX - origClientX); + if ( + viewportWidth > minViewportWidth && + viewportWidth < maxViewportWidth + ) { + self.sizeiframe(viewportWidth, false); + } else if (viewportWidth > maxViewportWidth) { + self.sizeiframe(maxViewportWidth, false); + } else { + self.sizeiframe(minViewportWidth, false); + } + } + + // add the mouse move event and capture data. also update the viewport width + this.iframeCover.addEventListener('mousemove', handleIframeCoverResize); + + document.body.addEventListener('mouseup', function() { + self.iframeCover.removeEventListener( + 'mousemove', + handleIframeCoverResize + ); + self.iframeCover.style.display = 'none'; + self + .querySelector('.pl-js-resize-handle') + .classList.remove('is-resizing'); + }); + + return false; + } + + // updates the nav after the iframed page tells the iframe it's done loading + receiveIframeMessage(event) { + // does the origin sending the message match the current host? if not dev/null the request + if ( + window.location.protocol !== 'file:' && + event.origin !== window.location.protocol + '//' + window.location.host + ) { + return; + } + + let data = {}; + try { + data = + typeof event.data !== 'string' ? event.data : JSON.parse(event.data); + } catch (e) { + // @todo: how do we want to handle exceptions here? + } + + // try to auto-correct for currentPattern data that doesn't always match with url + // workaround for certain pages (especially view all pages) not always matching up internally with the expected current pattern key + if (data.event !== undefined && data.event === 'patternLab.pageLoad') { + try { + const currentPattern = + this.sanitizePatternName(event.data.patternpartial) || + this.getPatternParam(); + + document.title = 'Pattern Lab - ' + currentPattern; + + const addressReplacement = + window.location.protocol === 'file:' + ? null + : window.location.protocol + + '//' + + window.location.host + + window.location.pathname.replace('index.html', '') + + '?p=' + + currentPattern; + + window.history.replaceState( + { + currentPattern: currentPattern, + }, + null, + addressReplacement + ); + + store.dispatch(updateCurrentPattern(currentPattern)); + } catch (error) { + console.log(error); + } + } + } +} + +export { IFrame }; diff --git a/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.scss b/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.scss new file mode 100644 index 000000000..c6ea632e2 --- /dev/null +++ b/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.scss @@ -0,0 +1,248 @@ +/*------------------------------------*\ + #VIEWPORT +\*------------------------------------*/ + +@import '../../../sass/scss/core.scss'; + +/** +* To keep user code and PL code separate, and to make +* resizing the viewport possible, PL contains an iframe +* that houses all user code. +*/ + +$pl-resizer-width: 20px; +$pl-viewport-bg: #F4F4F4; + +.pl-c-viewport-modal-wrapper { + background-color: $pl-viewport-bg; +} + +pl-iframe { + display: flex; + flex-grow: 1; + background-color: $pl-viewport-bg; +} + +/** +* Viewport +* 1) This wrapper div occupies all remaining viewport space after PL's header +*/ +.pl-c-viewport { + display: flex; + flex-direction: column; + width: 100%; + position: relative; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 0; + flex-grow: 1; + transition: height 0.3s ease; + // @supports (position: sticky) { + // top: 0; + // } + + // .pl-c-body--theme-sidebar & { + // top: 0; + // } +} + +/** +* Cover +* 1) This is an invisible div that sits above the iframe and is +* used in JS for manual viewport resizing purposes. +*/ +.pl-c-viewport__cover { + width: 100%; + height: 100%; + display: none; + position: fixed; + top: 0; + left: 0; + z-index: 200; + cursor: move; + pointer-events: auto; // Firefox bug fix +} + +/** +* Viewport iframe wrapper +* 1) This is the container that houses the +* iframe and the manual resize handle +*/ +.pl-c-viewport__iframe-wrapper { + display: flex; + flex-direction: column; + width: 100vw; + max-width: 100vw; + position: relative; + margin: 0 auto; + flex-grow: 1; + -webkit-overflow-scrolling: touch; + min-width: 240px; + max-width: 100vw; + background: $pl-viewport-bg; + padding-right: 0; + padding-left: 0; + // box-shadow: 0 3px 6px rgba(21,22,25,.16), 0 3px 6px rgba(21,22,25,.23); + + &.hay-mode { + transition: all 40s linear; + } + + .pl-c-body--theme-sidebar & { + @media all and (min-width: $pl-bp-med) { + max-width: calc(100vw - #{$pl-sidebar-width}); + width: calc(100vw - #{$pl-sidebar-width}); + } + } +} + +.is-animating { + transition: all 0.2s linear; +} + +/** +* Viewport iframe +* 1) this is the actual