diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dc791e52..b63657c15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index cd621433a..1ad71d317 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/lerna.json b/lerna.json index 76d7c4fa8..55b92bfb7 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "3.11.0", - "version": "5.9.2", + "version": "5.8.0", "packages": [ "packages/*" ], diff --git a/netlify.toml b/netlify.toml index 94337a4da..2a9730bd2 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,2 +1,2 @@ [context.deploy-preview] - command = "yarn setup && yarn preview:hbs && yarn preview:docs" + command = "npm run setup && npm run preview:hbs" diff --git a/package.json b/package.json index d2c271c91..e3d87beef 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 79ee78893..8bd8153c1 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -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) diff --git a/packages/cli/bin/scaffold.js b/packages/cli/bin/scaffold.js index de1e4df73..f817ac50d 100644 --- a/packages/cli/bin/scaffold.js +++ b/packages/cli/bin/scaffold.js @@ -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; @@ -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 diff --git a/packages/cli/package.json b/packages/cli/package.json index 48b8c0dd4..6ae9b954f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "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" }, @@ -9,9 +9,8 @@ "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", @@ -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", @@ -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", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index a2541be6e..9406a3964 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -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 diff --git a/packages/core/package.json b/packages/core/package.json index 2f39377d2..07a8cfc36 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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", diff --git a/packages/core/patternlab-config.json b/packages/core/patternlab-config.json index 39eed54fd..31fcbf748 100644 --- a/packages/core/patternlab-config.json +++ b/packages/core/patternlab-config.json @@ -75,6 +75,12 @@ "patternExportPatternPartials": [], "patternExportPreserveDirectoryStructure": true, "patternExportRaw": false, + "patternTranslations": { + "ViewAllSubGroup": "View all {sgName}", + "viewAllGroup": "View All", + "viewAllRoot": "All", + "rootName": "Root" + }, "serverOptions": { "wait": 1000 }, diff --git a/packages/core/src/lib/loaduikits.js b/packages/core/src/lib/loaduikits.js index dc152ae3d..1b976e7da 100644 --- a/packages/core/src/lib/loaduikits.js +++ b/packages/core/src/lib/loaduikits.js @@ -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( @@ -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( diff --git a/packages/core/src/lib/server.js b/packages/core/src/lib/server.js index c55e2c4ab..f5101c5a4 100644 --- a/packages/core/src/lib/server.js +++ b/packages/core/src/lib/server.js @@ -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( diff --git a/packages/core/test/loaduitkits_tests.js b/packages/core/test/loaduitkits_tests.js index 23bdcd656..c0fc9a4b1 100644 --- a/packages/core/test/loaduitkits_tests.js +++ b/packages/core/test/loaduitkits_tests.js @@ -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'); @@ -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', - }, ]; }; @@ -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 = { @@ -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 = [ diff --git a/packages/create/CHANGELOG.md b/packages/create/CHANGELOG.md index 70d92c558..4aa2a89fc 100644 --- a/packages/create/CHANGELOG.md +++ b/packages/create/CHANGELOG.md @@ -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 diff --git a/packages/create/package.json b/packages/create/package.json index 4802f4587..7c62682b9 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -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", diff --git a/packages/development-edition-engine-handlebars/CHANGELOG.md b/packages/development-edition-engine-handlebars/CHANGELOG.md index b421488d5..90485e2b5 100644 --- a/packages/development-edition-engine-handlebars/CHANGELOG.md +++ b/packages/development-edition-engine-handlebars/CHANGELOG.md @@ -3,30 +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 @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 diff --git a/packages/development-edition-engine-handlebars/package.json b/packages/development-edition-engine-handlebars/package.json index 1bbb24a42..07d1d5db1 100644 --- a/packages/development-edition-engine-handlebars/package.json +++ b/packages/development-edition-engine-handlebars/package.json @@ -1,7 +1,7 @@ { "name": "@pattern-lab/development-edition-engine-handlebars", "private": true, - "version": "5.9.2", + "version": "5.7.2", "description": "The tree of components we use to test, develop and validate the Handlebars engine", "scripts": { "pl:build": "patternlab build --config ./patternlab-config.json", @@ -28,12 +28,12 @@ "node": ">=12.12.0" }, "dependencies": { - "@pattern-lab/cli": "^5.9.1", - "@pattern-lab/core": "^5.9.0", + "@pattern-lab/cli": "^5.7.0", + "@pattern-lab/core": "^5.7.0", "@pattern-lab/engine-handlebars": "^5.5.0", "@pattern-lab/engine-mustache": "^5.0.0", "@pattern-lab/plugin-tab": "^5.3.0", "@pattern-lab/starterkit-mustache-demo": "^5.0.0", - "@pattern-lab/uikit-workshop": "^5.9.2" + "@pattern-lab/uikit-workshop": "^5.7.2" } } diff --git a/packages/development-edition-engine-react/CHANGELOG.md b/packages/development-edition-engine-react/CHANGELOG.md index 991515334..01b85df32 100644 --- a/packages/development-edition-engine-react/CHANGELOG.md +++ b/packages/development-edition-engine-react/CHANGELOG.md @@ -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.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 diff --git a/packages/development-edition-engine-react/package.json b/packages/development-edition-engine-react/package.json index c2b07bb17..0b3634dd4 100644 --- a/packages/development-edition-engine-react/package.json +++ b/packages/development-edition-engine-react/package.json @@ -1,14 +1,14 @@ { "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.2", + "version": "5.7.2", "private": true, "main": "gulpfile.js", "dependencies": { - "@pattern-lab/core": "^5.9.0", + "@pattern-lab/core": "^5.7.0", "@pattern-lab/engine-mustache": "^5.0.0", "@pattern-lab/engine-react": "^5.0.0", - "@pattern-lab/uikit-workshop": "^5.9.2", + "@pattern-lab/uikit-workshop": "^5.7.2", "gulp": "3.9.1", "minimist": "^1.2.0", "react": "16.2.0" diff --git a/packages/development-edition-engine-twig/CHANGELOG.md b/packages/development-edition-engine-twig/CHANGELOG.md index d832cb6bd..3694d094a 100644 --- a/packages/development-edition-engine-twig/CHANGELOG.md +++ b/packages/development-edition-engine-twig/CHANGELOG.md @@ -3,30 +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 @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/package.json b/packages/development-edition-engine-twig/package.json index 6fc0d9446..f6e65f55b 100644 --- a/packages/development-edition-engine-twig/package.json +++ b/packages/development-edition-engine-twig/package.json @@ -1,7 +1,7 @@ { "name": "@pattern-lab/development-edition-engine-twig", "private": true, - "version": "5.9.2", + "version": "5.8.0", "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", @@ -29,11 +29,11 @@ "node": ">=10.0" }, "dependencies": { - "@pattern-lab/cli": "^5.9.1", - "@pattern-lab/core": "^5.9.0", + "@pattern-lab/cli": "^5.7.0", + "@pattern-lab/core": "^5.7.0", "@pattern-lab/engine-twig": "^5.8.0", "@pattern-lab/starterkit-twig-demo": "^5.8.0", - "@pattern-lab/uikit-workshop": "^5.9.2" + "@pattern-lab/uikit-workshop": "^5.7.1" }, "workspaces": { "nohoist": [ diff --git a/packages/docs/.eleventy.js b/packages/docs/.eleventy.js deleted file mode 100644 index 9e8b8feaa..000000000 --- a/packages/docs/.eleventy.js +++ /dev/null @@ -1,96 +0,0 @@ -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 deleted file mode 100644 index a54bbf4b4..000000000 --- a/packages/docs/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -*.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 deleted file mode 100644 index a20fac227..000000000 --- a/packages/docs/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "printWidth": 90, - "useTabs": true, - "tabWidth": 2, - "singleQuote": true, - "bracketSpacing": false -} diff --git a/packages/docs/.vscode/launch.json b/packages/docs/.vscode/launch.json deleted file mode 100644 index 2359da6e9..000000000 --- a/packages/docs/.vscode/launch.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - // 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 deleted file mode 100644 index 2bbdcfaca..000000000 --- a/packages/docs/CHANGELOG.md +++ /dev/null @@ -1,11 +0,0 @@ -# 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.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 deleted file mode 100644 index 312f7109c..000000000 --- a/packages/docs/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 7b191158a..000000000 --- a/packages/docs/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100755 index 191e0843a..000000000 --- a/packages/docs/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "patternlab-website", - "version": "5.9.0", - "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 deleted file mode 100644 index fc6985825..000000000 --- a/packages/docs/php-docs/advanced-auto-regenerate.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -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 deleted file mode 100644 index 408e3ed37..000000000 --- a/packages/docs/php-docs/advanced-clean-public.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -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 deleted file mode 100644 index e21791b71..000000000 --- a/packages/docs/php-docs/advanced-config-options.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -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 deleted file mode 100644 index 49f4857d1..000000000 --- a/packages/docs/php-docs/advanced-exporting-patterns.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -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 deleted file mode 100644 index 3e38bebfc..000000000 --- a/packages/docs/php-docs/advanced-page-follow.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -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 deleted file mode 100644 index 2bd2c28c5..000000000 --- a/packages/docs/php-docs/advanced-pattern-lab-nav.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -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 deleted file mode 100644 index 4da045d5f..000000000 --- a/packages/docs/php-docs/advanced-reload-browser.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -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 deleted file mode 100644 index 5a90e0bdf..000000000 --- a/packages/docs/php-docs/advanced-starterkits.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -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 deleted file mode 100644 index 38ec38bee..000000000 --- a/packages/docs/php-docs/changes-1-to-2.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -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 deleted file mode 100644 index 264d235c3..000000000 --- a/packages/docs/php-docs/command-line.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -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 deleted file mode 100644 index b9831d371..000000000 --- a/packages/docs/php-docs/generating-pattern-lab.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -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 deleted file mode 100644 index 23b3ec3c4..000000000 --- a/packages/docs/php-docs/installation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -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 deleted file mode 100644 index 1f6927cde..000000000 --- a/packages/docs/php-docs/pattern-managing-assets.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -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 deleted file mode 100644 index cebea9de9..000000000 --- a/packages/docs/php-docs/pattern-states.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -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 deleted file mode 100644 index 7a741bb60..000000000 --- a/packages/docs/php-docs/requirements.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -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 deleted file mode 100644 index 8daf7ab1d..000000000 --- a/packages/docs/php-docs/upgrading.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -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 deleted file mode 100644 index ebc7461d4..000000000 --- a/packages/docs/php-docs/viewing-patterns.html +++ /dev/null @@ -1,17 +0,0 @@ ---- -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 deleted file mode 100644 index 7f62e07f4..000000000 --- a/packages/docs/rollup.config.js +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index eccd5a45c..000000000 --- a/packages/docs/src/404.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -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 deleted file mode 100644 index 683a0a332..000000000 --- a/packages/docs/src/_data/global.js +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 9ae9b7883..000000000 --- a/packages/docs/src/_data/helpers.js +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 8838d1f0b..000000000 --- a/packages/docs/src/_data/navigation.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "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 deleted file mode 100644 index 8a5e4ce23..000000000 --- a/packages/docs/src/_data/site.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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 deleted file mode 100644 index 4969bec39..000000000 --- a/packages/docs/src/_data/styleguide.js +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index b5bf4b3ae..000000000 --- a/packages/docs/src/_data/tokens.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "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 deleted file mode 100644 index 54a448266..000000000 --- a/packages/docs/src/_includes/components/footer-nav.njk +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/packages/docs/src/_includes/components/footer.njk b/packages/docs/src/_includes/components/footer.njk deleted file mode 100644 index 7764312d2..000000000 --- a/packages/docs/src/_includes/components/footer.njk +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/packages/docs/src/_includes/components/header.njk b/packages/docs/src/_includes/components/header.njk deleted file mode 100644 index 5e9ebd5de..000000000 --- a/packages/docs/src/_includes/components/header.njk +++ /dev/null @@ -1,21 +0,0 @@ -
-
- {% 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 deleted file mode 100644 index 7053c247c..000000000 --- a/packages/docs/src/_includes/components/hero.njk +++ /dev/null @@ -1,16 +0,0 @@ -
-
-
-

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 deleted file mode 100644 index 37c8e757a..000000000 --- a/packages/docs/src/_includes/components/icon-chevron-down.njk +++ /dev/null @@ -1,4 +0,0 @@ - -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 deleted file mode 100644 index 6840071cb..000000000 --- a/packages/docs/src/_includes/components/logo.njk +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/packages/docs/src/_includes/components/meta-info.njk b/packages/docs/src/_includes/components/meta-info.njk deleted file mode 100644 index c7d6a3aa0..000000000 --- a/packages/docs/src/_includes/components/meta-info.njk +++ /dev/null @@ -1,41 +0,0 @@ -{% 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 deleted file mode 100644 index 8fbae6236..000000000 --- a/packages/docs/src/_includes/components/page-header.njk +++ /dev/null @@ -1,13 +0,0 @@ -
- - {% 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 deleted file mode 100644 index 24c79fb1f..000000000 --- a/packages/docs/src/_includes/components/stacked-block.njk +++ /dev/null @@ -1,6 +0,0 @@ -
-

- {{ 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 deleted file mode 100644 index a2aeb04cf..000000000 --- a/packages/docs/src/_includes/components/tile.njk +++ /dev/null @@ -1,9 +0,0 @@ -
-
-

- {{ 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 deleted file mode 100644 index 83492e7f0..000000000 --- a/packages/docs/src/_includes/components/tree-nav.njk +++ /dev/null @@ -1,33 +0,0 @@ - - - - diff --git a/packages/docs/src/_includes/components/tree-subnav.njk b/packages/docs/src/_includes/components/tree-subnav.njk deleted file mode 100644 index 9265520ab..000000000 --- a/packages/docs/src/_includes/components/tree-subnav.njk +++ /dev/null @@ -1,11 +0,0 @@ -{% set navPages = collections.docs | eleventyNavigation %} - - diff --git a/packages/docs/src/_includes/icons/arrow.svg b/packages/docs/src/_includes/icons/arrow.svg deleted file mode 100644 index 153b9eed7..000000000 --- a/packages/docs/src/_includes/icons/arrow.svg +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/packages/docs/src/_includes/layouts/archive.njk b/packages/docs/src/_includes/layouts/archive.njk deleted file mode 100644 index d1b328ed8..000000000 --- a/packages/docs/src/_includes/layouts/archive.njk +++ /dev/null @@ -1,17 +0,0 @@ -{% 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 deleted file mode 100644 index 6d21c8837..000000000 --- a/packages/docs/src/_includes/layouts/base.njk +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - {% 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 deleted file mode 100644 index bc7b10eef..000000000 --- a/packages/docs/src/_includes/layouts/blog.njk +++ /dev/null @@ -1,17 +0,0 @@ -{% 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 deleted file mode 100644 index f16878645..000000000 --- a/packages/docs/src/_includes/layouts/demos.njk +++ /dev/null @@ -1,25 +0,0 @@ -{% 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 deleted file mode 100644 index e29cc063e..000000000 --- a/packages/docs/src/_includes/layouts/docs.njk +++ /dev/null @@ -1,28 +0,0 @@ ---- -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 deleted file mode 100644 index 1172fcd55..000000000 --- a/packages/docs/src/_includes/layouts/home.njk +++ /dev/null @@ -1,93 +0,0 @@ -{% 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 deleted file mode 100644 index 4a921e27f..000000000 --- a/packages/docs/src/_includes/layouts/page-base.njk +++ /dev/null @@ -1,24 +0,0 @@ -{% 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 deleted file mode 100644 index 0714fa10c..000000000 --- a/packages/docs/src/_includes/layouts/page.njk +++ /dev/null @@ -1,19 +0,0 @@ -{% 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 deleted file mode 100644 index 6a4702769..000000000 --- a/packages/docs/src/_includes/layouts/post.njk +++ /dev/null @@ -1,25 +0,0 @@ -{% 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 deleted file mode 100644 index d220b7a9a..000000000 --- a/packages/docs/src/_includes/partials/components/demo-list.njk +++ /dev/null @@ -1,25 +0,0 @@ -{% 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 deleted file mode 100644 index e5cc10c13..000000000 --- a/packages/docs/src/_includes/partials/components/intro.njk +++ /dev/null @@ -1,8 +0,0 @@ -
-
-

{{ 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 deleted file mode 100644 index 0b9cbcf6f..000000000 --- a/packages/docs/src/_includes/partials/components/nav.njk +++ /dev/null @@ -1,22 +0,0 @@ -{% if navigation.items %} - -{% endif %} diff --git a/packages/docs/src/_includes/partials/components/pagination.njk b/packages/docs/src/_includes/partials/components/pagination.njk deleted file mode 100644 index d78236a2a..000000000 --- a/packages/docs/src/_includes/partials/components/pagination.njk +++ /dev/null @@ -1,23 +0,0 @@ -{% 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 deleted file mode 100644 index 7a241e2e1..000000000 --- a/packages/docs/src/_includes/partials/components/post-list.njk +++ /dev/null @@ -1,22 +0,0 @@ - -{% 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 deleted file mode 100644 index c1c5517d1..000000000 --- a/packages/docs/src/admin.njk +++ /dev/null @@ -1,22 +0,0 @@ ---- -permalink: '/admin/index.html' ---- - - - - - - Content Manager - - - - - - - - - - - - - diff --git a/packages/docs/src/admin/config.yml b/packages/docs/src/admin/config.yml deleted file mode 100644 index 15abea8bc..000000000 --- a/packages/docs/src/admin/config.yml +++ /dev/null @@ -1,243 +0,0 @@ -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 deleted file mode 100644 index 82dcd1f2c..000000000 --- a/packages/docs/src/admin/previews.js +++ /dev/null @@ -1,92 +0,0 @@ -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 deleted file mode 100644 index 302b159cf..000000000 --- a/packages/docs/src/admin/util.js +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 76533c10f..000000000 --- a/packages/docs/src/archive.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: 'Posts Archive' -layout: 'layouts/archive.njk' ---- diff --git a/packages/docs/src/demos.md b/packages/docs/src/demos.md deleted file mode 100644 index 441563fc1..000000000 --- a/packages/docs/src/demos.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -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 deleted file mode 100644 index 54d091aa6..000000000 --- a/packages/docs/src/demos/bolt-design-systems.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -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 deleted file mode 100644 index 41bbe38c1..000000000 --- a/packages/docs/src/demos/brad-frosts-website-pl.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -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 deleted file mode 100644 index 44ea634e4..000000000 --- a/packages/docs/src/demos/handlebars-base-starterkit.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -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 deleted file mode 100644 index 28387c606..000000000 --- a/packages/docs/src/demos/handlebars-demo-starterkit.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -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 deleted file mode 100644 index 4f7485a52..000000000 --- a/packages/docs/src/demos/handlebars-vanilla-starterkit.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -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 deleted file mode 100644 index 56fda1e32..000000000 --- a/packages/docs/src/demos/pattern-lab-two-mustache-demo.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -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 deleted file mode 100644 index 0da6259b6..000000000 --- a/packages/docs/src/demos/twig-base.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -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 deleted file mode 100644 index d5c83f6c7..000000000 --- a/packages/docs/src/docs/a-post-with-code-samples.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -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 `