Skip to content

Commit

Permalink
Revert "Merge branch 'dev' into refactor/updated-lerna-dependency"
Browse files Browse the repository at this point in the history
This reverts commit ab5e103, reversing
changes made to e7123c1.
  • Loading branch information
mfranzke committed Dec 4, 2021
1 parent d373217 commit ed365ea
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 44 deletions.
3 changes: 2 additions & 1 deletion packages/cli/bin/scaffold.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const path = require('path');
const execa = require('execa');
const fs = require('fs');
const fs = require('fs-extra');
const wrapAsync = require('./utils').wrapAsync;
const mkdirsAsync = require('./utils').mkdirsAsync;

Expand All @@ -18,6 +18,7 @@ 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,
});
Expand Down
14 changes: 7 additions & 7 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"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",
Expand All @@ -23,19 +24,18 @@
"lodash": "4.17.21",
"ora": "2.1.0",
"path-exists": "3.0.0",
"sanitize-filename": "1.6.3"
"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"
},
"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": [
Expand All @@ -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",
Expand Down
24 changes: 24 additions & 0 deletions packages/core/src/lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ const server = (patternlab) => {
patternlab.config.paths.public.root
)
);
defaults.assets = [
path.resolve(
path.join(
process.cwd(),
patternlab.config.paths.source.js,
'**',
'*.js' // prevent preprocessors like typescript from reloading
)
),
path.resolve(
path.join(process.cwd(), patternlab.config.paths.source.images)
),
path.resolve(
path.join(process.cwd(), patternlab.config.paths.source.fonts)
),
path.resolve(
path.join(
process.cwd(),
patternlab.config.paths.source.css,
'**',
'*.css' // prevent preprocessors from reloading
)
),
];

// allow for overrides should they exist inside patternlab-config.json
const liveServerConfig = Object.assign(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@
{{{ patternLabHead }}}
<!-- End Pattern Lab -->
</head>
<body class="{{ bodyClass }}"></body>
</html>
<body class="{{ bodyClass }}">
5 changes: 1 addition & 4 deletions packages/docs/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ 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':
'node_modules/nunjucks/browser/nunjucks-slim.js',
});
config.addPassthroughCopy('../../node_modules/nunjucks/browser/nunjucks-slim.js');

const now = new Date();

Expand Down
8 changes: 4 additions & 4 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "The website for patternlab.io",
"main": "index.js",
"dependencies": {
"@11ty/eleventy": "^0.12.1",
"@11ty/eleventy-plugin-rss": "^1.1.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^3.1.3",
"@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",
Expand All @@ -18,7 +18,7 @@
"stalfos": "github:hankchizljaw/stalfos#c8971d22726326cfc04089b2da4d51eeb1ebb0eb"
},
"devDependencies": {
"@11ty/eleventy-navigation": "^0.3.2",
"@11ty/eleventy-navigation": "^0.1.5",
"@erquhart/rollup-plugin-node-builtins": "^2.1.5",
"bl": "^3.0.0",
"chokidar-cli": "^2.1.0",
Expand Down
6 changes: 0 additions & 6 deletions packages/docs/src/docs/advanced-config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ 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_.
Expand Down
1 change: 1 addition & 0 deletions packages/edition-node-gulp/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function serve() {
return patternlab.server
.serve({
cleanPublic: config.cleanPublic,
watch: true,
})
.then(() => {
// do something else when this promise resolves
Expand Down
3 changes: 1 addition & 2 deletions packages/engine-twig/lib/engine_twig.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ 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
Expand Down
3 changes: 1 addition & 2 deletions packages/engine-underscore/_meta/_head.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@
{{{ patternLabHead }}}
<!-- End Pattern Lab -->
</head>
<body class="{{ bodyClass }}"></body>
</html>
<body class="{{ bodyClass }}">
3 changes: 1 addition & 2 deletions packages/live-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,11 @@ 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(authConnect(basic));
app.use(auth.connect(basic));
}

if (cors) {
Expand Down
3 changes: 1 addition & 2 deletions packages/live-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"cors": "2.8.5",
"event-stream": "3.3.4",
"faye-websocket": "0.11.x",
"http-auth": "4.1.x",
"http-auth-connect": "^1.0.5",
"http-auth": "3.2.x",
"morgan": "1.10.0",
"object-assign": "4.1.1",
"opn": "5.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
}
],
"meta": {
"description": ""
"description": "To add to these items, use Sass variables that start with <code>$font-family-</code> in <code>./source/css/scss/abstracts/_variables.scss</code>"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
order: 2
---

To add to these items, use Sass variables that start with `$font-family-` in `./source/css/scss/abstracts/_variables.scss`
---
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
}
],
"meta": {
"description": ""
"description": "To add to these items, use Sass variables that start with <code>$font-size-</code> in <code>./source/css/scss/abstracts/_variables.scss</code>"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
order: 2
---

To add to these items, use Sass variables that start with `$font-size-` in `./source/css/scss/abstracts/_variables.scss`
---
5 changes: 4 additions & 1 deletion packages/uikit-workshop/src/html/partials/base-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
{{# descBlockExists }}

<div
class="pl-c-pattern-info__panel pl-c-pattern-info__panel--info pl-js-pattern-info"
class="
pl-c-pattern-info__panel pl-c-pattern-info__panel--info
pl-js-pattern-info
"
>
{{# isPatternView }}
<!-- extra info for modal view -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ 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;'
Expand Down

0 comments on commit ed365ea

Please sign in to comment.