Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2237301
Update object_factory and view all page behavior
JosefBredereck Apr 12, 2020
edc4b0c
Various changes to file and pattern creation
JosefBredereck Apr 12, 2020
f9ca91e
Merge branch 'dev' of https://github.com/JosefBredereck/patternlab-no…
JosefBredereck Apr 12, 2020
c94531b
Ability for viewall page links and updated test to realworld
JosefBredereck Apr 13, 2020
e39a881
Fix "Open In New Tab" incorrect link
JosefBredereck Apr 13, 2020
c9e99fd
Add support for manual viewport size input
JosefBredereck Apr 13, 2020
0d0b776
#1146: Reintroduce resize key combinations
JosefBredereck Apr 15, 2020
ce26557
#1046: Fix blur and styling of viewport size input
JosefBredereck Apr 15, 2020
e72b8b4
#1143: Add func. to specify if pattern has own dir
JosefBredereck Apr 17, 2020
5003a6a
#1143: Add test and fix remaining errors
JosefBredereck Apr 17, 2020
03d9287
Merge branch 'dev' into dev
sghoweri Apr 25, 2020
ffcd615
#1143: Fix translations causing nav bug
JosefBredereck Apr 25, 2020
2475cac
#1143: Change property to proper name
JosefBredereck Apr 25, 2020
1e7ed0d
Merge remote-tracking branch 'upstream/dev' into dev
JosefBredereck Apr 26, 2020
fec2492
#1143: Revert translation attempt
JosefBredereck Apr 26, 2020
7dd18f9
#1143: Fix naming of view-all links
JosefBredereck Apr 26, 2020
dbc5704
Merge branch 'dev' into feature-viewport-input-sizing
JosefBredereck Apr 26, 2020
efb2b5f
Merge branch 'dev' into feature-viewport-input-sizing
JosefBredereck Apr 28, 2020
744af2f
Revert "Merge branch 'dev' into feature-viewport-input-sizing"
JosefBredereck Apr 28, 2020
8030474
Revert "Merge branch 'dev' into feature-viewport-input-sizing"
JosefBredereck Apr 28, 2020
eeefb97
Revert merge #1143: Fix naming of view-all links
JosefBredereck Apr 28, 2020
9b7b5ee
Revert merge #1143: Revert translation attempt
JosefBredereck Apr 28, 2020
41a2064
revert merge Merge remote-tracking branch 'upstream/dev' into dev
JosefBredereck Apr 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,6 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [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)


Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ 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)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "3.11.0",
"version": "5.9.2",
"version": "5.8.0",
"packages": [
"packages/*"
],
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[context.deploy-preview]
command = "yarn setup && yarn preview:hbs && yarn preview:docs"
command = "npm run setup && npm run preview:hbs"
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"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": {
Expand Down
22 changes: 0 additions & 22 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,6 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [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)


Expand Down
10 changes: 3 additions & 7 deletions packages/cli/bin/scaffold.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const path = require('path');
const execa = require('execa');
const fs = require('fs-extra');
const fs = require('fs');
const wrapAsync = require('./utils').wrapAsync;
const mkdirsAsync = require('./utils').mkdirsAsync;

Expand All @@ -16,12 +16,8 @@ const mkdirsAsync = require('./utils').mkdirsAsync;
*/
const scaffold = (projectDir, sourceDir, publicDir, exportDir) =>
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,
});
if (!fs.existsSync(path.resolve(projectDir, 'package.json'))) {
execa.sync('npm', ['init', '-y']);
}
/**
* Create mandatory files structure
Expand Down
13 changes: 4 additions & 9 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"name": "@pattern-lab/cli",
"description": "Command-line interface (CLI) for the @pattern-lab/core.",
"version": "5.9.1",
"version": "5.7.0",
"bin": {
"patternlab": "bin/patternlab.js"
},
"author": {
"name": "Raphael Okon"
},
"dependencies": {
"@pattern-lab/core": "^5.9.0",
"@pattern-lab/core": "^5.7.0",
"@pattern-lab/live-server": "^5.0.0",
"@pattern-lab/starterkit-mustache-base": "3.0.3",
"archiver": "2.1.1",
"chalk": "2.4.1",
"commander": "2.15.1",
Expand All @@ -24,11 +23,7 @@
"lodash": "4.17.15",
"ora": "2.1.0",
"path-exists": "3.0.0",
"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"
"sanitize-filename": "1.6.1"
},
"devDependencies": {
"eslint": "4.18.2",
Expand All @@ -49,7 +44,7 @@
],
"scripts": {
"lint": "eslint ./{bin,test}",
"test:separate": "tap ./test/*.test.js --reporter spec --timeout=120"
"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",
Expand Down
11 changes: 0 additions & 11 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.9.0](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core/compare/v5.8.0...v5.9.0) (2020-04-24)


### Bug Fixes

* **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
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pattern-lab/core",
"description": "Create atomic design systems with Pattern Lab. This is the core API and orchestrator of the ecosystem.",
"version": "5.9.0",
"version": "5.7.0",
"main": "./src/index.js",
"dependencies": {
"@pattern-lab/engine-mustache": "^5.0.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/core/patternlab-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
"patternExportPatternPartials": [],
"patternExportPreserveDirectoryStructure": true,
"patternExportRaw": false,
"patternTranslations": {
"ViewAllSubGroup": "View all {sgName}",
"viewAllGroup": "View All",
"viewAllRoot": "All",
"rootName": "Root"
},
"serverOptions": {
"wait": 1000
},
Expand Down
13 changes: 6 additions & 7 deletions packages/core/src/lib/loaduikits.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,19 @@ const readModuleFile = (kit, subPath) => {
/**
* 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
* [2] Only continue if uikit is enabled in patternlab-config.json
* [3] 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]
const uikits = findModules(nodeModulesPath, isUIKitModule); // [1]

uikits.forEach(kit => {
const configEntry = _.find(_.filter(patternlab.config.uikits, 'enabled'), {
name: `uikit-${kit.name}`,
}); // [3]
}); // [2]

if (!configEntry) {
logger.warning(
Expand Down Expand Up @@ -84,7 +83,7 @@ module.exports = patternlab => {
paths.source.patternlabFiles.patternSectionSubtype
),
viewAll: readModuleFile(kit, paths.source.patternlabFiles.viewall),
}; // [4]
}; // [3]
} catch (ex) {
logger.error(ex);
logger.error(
Expand Down
24 changes: 0 additions & 24 deletions packages/core/src/lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,6 @@ const server = patternlab => {
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(
Expand Down
38 changes: 2 additions & 36 deletions packages/core/test/loaduitkits_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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');
Expand All @@ -22,10 +21,6 @@ const findModulesMock = function() {
name: 'baz',
modulePath: 'node_modules/@pattern-lab/uikit-baz',
},
{
name: 'polyfills',
modulePath: 'node_modules/@pattern-lab/uikit-polyfills',
},
];
};

Expand All @@ -40,40 +35,11 @@ loaduikits.__set__({
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: {},
uikits: [],
};

const uikitFoo = {
Expand Down Expand Up @@ -112,7 +78,7 @@ tap.test('loaduikits - only adds files for enabled uikits', function(test) {
//arrange
const patternlab = {
config: testConfig,
uikits: {},
uikits: [],
};

patternlab.config.uikits = [
Expand Down
16 changes: 0 additions & 16 deletions packages/create/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,6 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [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
Expand Down
4 changes: 2 additions & 2 deletions packages/create/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "create-pattern-lab",
"version": "5.9.1",
"version": "5.7.0",
"description": "",
"bin": "index.js",
"main": "index.js",
"scripts": {},
"dependencies": {
"@pattern-lab/cli": "^5.9.1"
"@pattern-lab/cli": "^5.7.0"
},
"author": "",
"license": "MIT",
Expand Down
Loading