diff --git a/packages/cli/bin/scaffold.js b/packages/cli/bin/scaffold.js index ac2b4378b..618301fc5 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; @@ -18,7 +18,6 @@ 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, }); diff --git a/packages/cli/package.json b/packages/cli/package.json index c0ac5912d..da816665d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -11,7 +11,6 @@ "dependencies": { "@pattern-lab/core": "^5.15.2", "@pattern-lab/live-server": "^5.15.1", - "@pattern-lab/starterkit-mustache-base": "3.0.3", "archiver": "2.1.1", "chalk": "4.1.0", "commander": "2.15.1", @@ -24,18 +23,19 @@ "lodash": "4.17.21", "ora": "2.1.0", "path-exists": "3.0.0", - "sanitize-filename": "1.6.3", - "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.3" }, "devDependencies": { + "@pattern-lab/starterkit-mustache-base": "3.0.3", "eslint": "4.18.2", "eslint-config-prettier": "2.9.0", "eslint-plugin-prettier": "2.6.0", "prettier": "2.2.1", "proxyquire": "2.1.3", + "starterkit-mustache-acidtest": "0.0.3", + "starterkit-mustache-bootstrap": "0.1.1", + "starterkit-mustache-foundation": "0.1.1", + "starterkit-mustache-materialdesign": "0.1.2", "tap": "14.11.0" }, "files": [ @@ -49,7 +49,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/src/lib/server.js b/packages/core/src/lib/server.js index 58bef01a4..7218800f4 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/development-edition-engine-react/source/_meta/_head.html b/packages/development-edition-engine-react/source/_meta/_head.html index 9e3094352..bcb87dcd0 100644 --- a/packages/development-edition-engine-react/source/_meta/_head.html +++ b/packages/development-edition-engine-react/source/_meta/_head.html @@ -20,4 +20,5 @@ {{{ patternLabHead }}} - + + diff --git a/packages/docs/.eleventy.js b/packages/docs/.eleventy.js index 00da997c8..bdc41b8fc 100644 --- a/packages/docs/.eleventy.js +++ b/packages/docs/.eleventy.js @@ -33,7 +33,10 @@ module.exports = function (config) { 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'); + config.addPassthroughCopy({ + '../../node_modules/nunjucks/browser/nunjucks-slim.js': + 'node_modules/nunjucks/browser/nunjucks-slim.js', + }); const now = new Date(); diff --git a/packages/docs/package.json b/packages/docs/package.json index c331c61a5..bf3fc88a0 100755 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -4,9 +4,9 @@ "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", + "@11ty/eleventy": "^0.12.1", + "@11ty/eleventy-plugin-rss": "^1.1.2", + "@11ty/eleventy-plugin-syntaxhighlight": "^3.1.3", "@tbranyen/jsdom": "^13.0.0", "concurrently": "^4.1.0", "html-minifier": "^4.0.0", @@ -18,7 +18,7 @@ "stalfos": "github:hankchizljaw/stalfos#c8971d22726326cfc04089b2da4d51eeb1ebb0eb" }, "devDependencies": { - "@11ty/eleventy-navigation": "^0.1.5", + "@11ty/eleventy-navigation": "^0.3.2", "@erquhart/rollup-plugin-node-builtins": "^2.1.5", "bl": "^3.0.0", "chokidar-cli": "^2.1.0", diff --git a/packages/docs/src/docs/advanced-config-options.md b/packages/docs/src/docs/advanced-config-options.md index 32963a132..89b00e645 100644 --- a/packages/docs/src/docs/advanced-config-options.md +++ b/packages/docs/src/docs/advanced-config-options.md @@ -47,6 +47,12 @@ Sets whether or not you want the styleguide to load with the pattern info open o **default**: `false` +## defaultInitialViewportWidth (optional) + +Possibility to define whether the initial viewport width on opening pattern lab in the browser should take the default of `100%` (value `true`) or take the (permanently) persisted value after the users have interacted with the viewport resize buttons previously (value `false`). This is especially beneficial in case that you'd expect the pages in full viewport at revisits, and even further if your startpage is defined as a "static" markdown welcome / orientation page. + +**default**: `false` + ## defaultPatternInfoPanelCode (optional) Sets default active pattern info code panel by file extension - if unset, uses the value out of _patternExtension_ config value, or instead use value `html` to display the html code initially, or the value defined for the _patternExtension_. diff --git a/packages/edition-node-gulp/gulpfile.js b/packages/edition-node-gulp/gulpfile.js index fd039bad7..0f02a0346 100644 --- a/packages/edition-node-gulp/gulpfile.js +++ b/packages/edition-node-gulp/gulpfile.js @@ -27,7 +27,6 @@ function serve() { return patternlab.server .serve({ cleanPublic: config.cleanPublic, - watch: true, }) .then(() => { // do something else when this promise resolves diff --git a/packages/engine-twig/lib/engine_twig.js b/packages/engine-twig/lib/engine_twig.js index 76308ecef..89dac691b 100644 --- a/packages/engine-twig/lib/engine_twig.js +++ b/packages/engine-twig/lib/engine_twig.js @@ -124,7 +124,8 @@ var engine_twig = { engineFileExtension: '.twig', // regexes, stored here so they're only compiled once - findPartialsRE: /{%[-]?\s*(?:extends|include|embed|from|import|use)\s+('[^']+'|"[^"]+").*?%}/g, + findPartialsRE: + /{%[-]?\s*(?:extends|include|embed|from|import|use)\s+('[^']+'|"[^"]+").*?%}/g, findPartialKeyRE: /"((?:\\.|[^"\\])*)"/, findListItemsRE: /({{#( )?)(list(I|i)tems.)(one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty)( )?}}/g, // TODO diff --git a/packages/engine-underscore/_meta/_head.html b/packages/engine-underscore/_meta/_head.html index 9e3094352..bcb87dcd0 100644 --- a/packages/engine-underscore/_meta/_head.html +++ b/packages/engine-underscore/_meta/_head.html @@ -20,4 +20,5 @@ {{{ patternLabHead }}} - + + diff --git a/packages/live-server/index.js b/packages/live-server/index.js index 1a1c12fe3..eff77c4ab 100644 --- a/packages/live-server/index.js +++ b/packages/live-server/index.js @@ -247,11 +247,12 @@ LiveServer.start = function (options) { // Use http-auth if configured if (htpasswd !== null) { const auth = require('http-auth'); + const authConnect = require('http-auth-connect'); const basic = auth.basic({ realm: 'Please authorize', file: htpasswd, }); - app.use(auth.connect(basic)); + app.use(authConnect(basic)); } if (cors) { diff --git a/packages/live-server/package.json b/packages/live-server/package.json index 835da9d1a..26edb1546 100644 --- a/packages/live-server/package.json +++ b/packages/live-server/package.json @@ -18,7 +18,8 @@ "cors": "2.8.5", "event-stream": "3.3.4", "faye-websocket": "0.11.x", - "http-auth": "3.2.x", + "http-auth": "4.1.x", + "http-auth-connect": "^1.0.5", "morgan": "1.10.0", "object-assign": "4.1.1", "opn": "5.3.0", diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.json b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.json index 1631188fe..0fb1424d8 100644 --- a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.json +++ b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.json @@ -12,6 +12,6 @@ } ], "meta": { - "description": "To add to these items, use Sass variables that start with $font-family- in ./source/css/scss/abstracts/_variables.scss" + "description": "" } -} \ No newline at end of file +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.md b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.md index 7017cea54..9fdf67d62 100644 --- a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.md +++ b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-families.md @@ -1,3 +1,5 @@ --- order: 2 ---- \ No newline at end of file +--- + +To add to these items, use Sass variables that start with `$font-family-` in `./source/css/scss/abstracts/_variables.scss` diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.json b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.json index 95c0e11c0..23a72b4af 100644 --- a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.json +++ b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.json @@ -37,6 +37,6 @@ } ], "meta": { - "description": "To add to these items, use Sass variables that start with $font-size- in ./source/css/scss/abstracts/_variables.scss" + "description": "" } -} \ No newline at end of file +} diff --git a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.md b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.md index 7017cea54..94b2cc9bf 100644 --- a/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.md +++ b/packages/starterkit-handlebars-demo/dist/_patterns/atoms/global/font-sizes.md @@ -1,3 +1,5 @@ --- order: 2 ---- \ No newline at end of file +--- + +To add to these items, use Sass variables that start with `$font-size-` in `./source/css/scss/abstracts/_variables.scss` diff --git a/packages/uikit-workshop/src/html/partials/base-template.html b/packages/uikit-workshop/src/html/partials/base-template.html index 5f47c91a7..799af572b 100755 --- a/packages/uikit-workshop/src/html/partials/base-template.html +++ b/packages/uikit-workshop/src/html/partials/base-template.html @@ -2,10 +2,7 @@ {{# descBlockExists }}
{{# isPatternView }} diff --git a/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js b/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js index 79f6a9cf1..0b4373b65 100644 --- a/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js +++ b/packages/uikit-workshop/src/scripts/lit-components/pl-viewport/pl-viewport.js @@ -397,6 +397,7 @@ class IFrame extends BaseLitComponent { const url = urlHandler.getFileName(this.getPatternParam()); const initialWidth = + !window.config.defaultInitialViewportWidth && store.getState().app.viewportPx && store.getState().app.viewportPx <= this.clientWidth ? store.getState().app.viewportPx + 'px;'