diff --git a/packages/docs/src/docs/advanced-config-options.md b/packages/docs/src/docs/advanced-config-options.md index 6c1fa9a70..f2323a1bc 100644 --- a/packages/docs/src/docs/advanced-config-options.md +++ b/packages/docs/src/docs/advanced-config-options.md @@ -194,7 +194,7 @@ For example, to export the navigation, header, and footer, one might do: ### patternMergeVariantArrays -Used to override the merge behavior of pattern variants. For more information see [The Pseudo-Pattern File Data](docs/using-pseudo-patterns/#heading-the-pseudo-pattern-file data). +Used to override the merge behavior of pattern variants. For more information see [The Pseudo-Pattern File Data](docs/using-pseudo-patterns/#heading-the-pseudo-pattern-file-data). - `true` will merge arrays of the pattern and pseudo-pattern with [lodash merge](https://lodash.com/docs/4.17.15#merge) - `false` will override arrays from the pattern with pseudo-patterns arrays diff --git a/packages/docs/src/docs/installation.md b/packages/docs/src/docs/installation.md index 2b5f3587f..be1cc19b8 100644 --- a/packages/docs/src/docs/installation.md +++ b/packages/docs/src/docs/installation.md @@ -11,7 +11,9 @@ eleventyNavigation: ## Step 1: Install requirements -Make sure you have [Node.js](https://nodejs.org/en/download/) installed before setting up Pattern Lab. +Make sure you have [Node.js](https://nodejs.org/en/download/) installed before setting up Pattern Lab, e.g. by checking for the node version: `node -v` + +Please make sure to have at minimum version node 7 installed, but even better at least the node version that's being mentioned in [.nvmrc](https://github.com/pattern-lab/patternlab-node/blob/dev/); [Node version manager](https://github.com/nvm-sh/nvm) might be a good option if you can't update. ## Step 2: Run the create Pattern Lab command diff --git a/packages/docs/src/resources.md b/packages/docs/src/resources.md index f9b41fd7e..9c6681825 100644 --- a/packages/docs/src/resources.md +++ b/packages/docs/src/resources.md @@ -29,7 +29,7 @@ title: Resources ## Podcasts -- [Dave Olsen talking Pattern Lab 2 on Non-Breaking Space Podcast](https://goodstuff.fm/nbsp/86) +- [Dave Olsen talking Pattern Lab 2 on Non-Breaking Space Podcast](https://open.spotify.com/episode/4IMyd92WWZyaXP04Unxdip) - [Brian Muenzenmeyer talking Pattern Lab 2 on the MS DEV SHOW Podcast](https://msdevshow.com/2015/12/pattern-lab-with-brian-muenzenmeyer/) ## Presentations diff --git a/packages/uikit-workshop/build/webpack-dev-server-waitpage/index.js b/packages/uikit-workshop/build/webpack-dev-server-waitpage/index.js index c24f694f1..600568619 100644 --- a/packages/uikit-workshop/build/webpack-dev-server-waitpage/index.js +++ b/packages/uikit-workshop/build/webpack-dev-server-waitpage/index.js @@ -31,10 +31,11 @@ const defaultOptions = { * @returns {Function} Koa compatible middleware */ const webpackDevServerWaitpage = (server, options) => { - if (!server) + if (!server) { throw new Error( `webpack-dev-server's compilers argument must be supplied as first parameter.` ); + } /** @type {WebpackDevServerWaitpageOptions} */ options = Object.assign({}, defaultOptions, options); @@ -55,8 +56,9 @@ const webpackDevServerWaitpage = (server, options) => { .filter(x => x.endsWith('.ejs')) .map(x => x.slice(0, -4)) .indexOf(options.theme) < 0 - ) + ) { throw new Error(`Unknown theme provided: ${options.theme}`); + } template = fs.readFileSync( path.resolve(__dirname, options.theme + '.ejs'), 'utf8' diff --git a/packages/uikit-workshop/src/scripts/components/base-skate-element.js b/packages/uikit-workshop/src/scripts/components/base-skate-element.js index 8951884cc..4513b3349 100644 --- a/packages/uikit-workshop/src/scripts/components/base-skate-element.js +++ b/packages/uikit-workshop/src/scripts/components/base-skate-element.js @@ -1,11 +1,11 @@ import { dashCase, empty, keys } from 'skatejs/dist/esnext/util'; -var _extends = +const _extends = Object.assign || function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { + for (let i = 1; i < arguments.length; i++) { + const source = arguments[i]; + for (const key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } @@ -50,12 +50,18 @@ export function normalizePropertyDefinition(name, prop) { const defaultTypesMap = new Map(); function defineProps(constructor) { - if (constructor.hasOwnProperty('_propsNormalized')) return; + if (constructor.hasOwnProperty('_propsNormalized')) { + return; + } const { props } = constructor; keys(props).forEach(name => { let func = props[name] || props.any; - if (defaultTypesMap.has(func)) func = defaultTypesMap.get(func); - if (typeof func !== 'function') func = prop(func); + if (defaultTypesMap.has(func)) { + func = defaultTypesMap.get(func); + } + if (typeof func !== 'function') { + func = prop(func); + } func({ constructor }, name); }); } @@ -130,7 +136,7 @@ export function prop(definition) { export class SkateElement extends HTMLElement { constructor(...args) { - var _temp; + let _temp; return ( (_temp = super(...args)), (this._prevProps = {}), diff --git a/packages/uikit-workshop/src/scripts/components/base-skate-preact-element.js b/packages/uikit-workshop/src/scripts/components/base-skate-preact-element.js index 8fe00f5dc..33b761570 100644 --- a/packages/uikit-workshop/src/scripts/components/base-skate-preact-element.js +++ b/packages/uikit-workshop/src/scripts/components/base-skate-preact-element.js @@ -1,9 +1,9 @@ -var _extends = +const _extends = Object.assign || function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { + for (let i = 1; i < arguments.length; i++) { + const source = arguments[i]; + for (const key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } @@ -24,7 +24,7 @@ const preactNodeName = '__preactNodeName'; let oldVnode; function newVnode(vnode) { - let fn = vnode.nodeName; + const fn = vnode.nodeName; if (fn && fn.prototype instanceof HTMLElement) { if (!fn[preactNodeName]) { const prefix = fn.name; diff --git a/packages/uikit-workshop/src/scripts/components/panels.js b/packages/uikit-workshop/src/scripts/components/panels.js index ec1d120aa..33d4de5dd 100644 --- a/packages/uikit-workshop/src/scripts/components/panels.js +++ b/packages/uikit-workshop/src/scripts/components/panels.js @@ -84,7 +84,9 @@ function init(event) { Panels.add({ id: 'pl-panel-html', name: 'HTML', - default: window.config.defaultPatternInfoPanelCode && window.config.defaultPatternInfoPanelCode === 'html', + default: + window.config.defaultPatternInfoPanelCode && + window.config.defaultPatternInfoPanelCode === 'html', templateID: 'pl-panel-template-code', httpRequest: true, httpRequestReplace: fileSuffixMarkup + '.html', diff --git a/packages/uikit-workshop/src/scripts/components/pl-nav/get-parents.js b/packages/uikit-workshop/src/scripts/components/pl-nav/get-parents.js index 7ee70c5bc..2f4ce35e8 100644 --- a/packages/uikit-workshop/src/scripts/components/pl-nav/get-parents.js +++ b/packages/uikit-workshop/src/scripts/components/pl-nav/get-parents.js @@ -8,7 +8,7 @@ export const getParents = (elem, selector) => { Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function(s) { - var matches = (this.document || this.ownerDocument).querySelectorAll(s), + let matches = (this.document || this.ownerDocument).querySelectorAll(s), i = matches.length; while (--i >= 0 && matches.item(i) !== this) {} return i > -1; @@ -16,7 +16,7 @@ export const getParents = (elem, selector) => { } // Set up a parent array - var parents = []; + const parents = []; // Push each parent element to the array for (; elem && elem !== document; elem = elem.parentNode) { diff --git a/packages/uikit-workshop/src/scripts/lit-components/pl-tools-menu/pl-tools-menu.js b/packages/uikit-workshop/src/scripts/lit-components/pl-tools-menu/pl-tools-menu.js index 54733456e..2784ac2bb 100644 --- a/packages/uikit-workshop/src/scripts/lit-components/pl-tools-menu/pl-tools-menu.js +++ b/packages/uikit-workshop/src/scripts/lit-components/pl-tools-menu/pl-tools-menu.js @@ -6,7 +6,7 @@ import { urlHandler, patternName, iframeMsgDataExtraction } from '../../utils'; import { store } from '../../store'; // redux store import styles from './pl-tools-menu.scss?external'; -let listeningForBodyClicks = false; +const listeningForBodyClicks = false; import { html } from 'lit-html'; import { BaseLitComponent } from '../../components/base-component'; diff --git a/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js b/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js index cef7566fe..ccf00a26f 100644 --- a/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js +++ b/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js @@ -257,7 +257,7 @@ class IFrame extends BaseLitComponent { 'orientationchange', function() { if (window.orientation !== this.origOrientation) { - let newWidth = window.innerWidth; + const newWidth = window.innerWidth; self.iframeContainer.style.width = newWidth; self.iframe.style.width = newWidth; self.updateSizeReading(newWidth);