Skip to content

Commit

Permalink
Merge branch 'dev' into refactor-updated-depencency-chokidar
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefBredereck committed Mar 23, 2021
2 parents 3df781d + b3a64c5 commit 284b17c
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/docs/src/docs/advanced-config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion packages/docs/src/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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];
}
Expand Down Expand Up @@ -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);
});
}
Expand Down Expand Up @@ -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 = {}),
Expand Down
Original file line number Diff line number Diff line change
@@ -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];
}
Expand All @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion packages/uikit-workshop/src/scripts/components/panels.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ 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;
};
}

// Set up a parent array
var parents = [];
const parents = [];

// Push each parent element to the array
for (; elem && elem !== document; elem = elem.parentNode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 284b17c

Please sign in to comment.