Skip to content

Commit 5993ebb

Browse files
Merge branch 'dev' into new-dir-init
2 parents 6d2186d + aef661a commit 5993ebb

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed

packages/docs/src/_includes/components/footer.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<div class="l-container">
44

55
{% include "components/footer-nav.njk" %}
6+
<p class='c-footer__note'><a href='https://www.netlify.com/'>This site is powered by Netlify</a></p>
67

78
</div><!--end l-container-->
89

packages/docs/src/scss/components/_footer-nav.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* The nav inside the footer
77
*/
88
.c-footer-nav {
9-
font-size: $font-size-sm-2;
9+
font-size: $font-size-sm-2;
10+
margin-bottom: $spacing;
1011

1112
@media all and (min-width: $bp-med) {
1213
display: flex;

packages/docs/src/scss/components/_footer.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,15 @@
88
.c-footer {
99
padding: $spacing-large 0;
1010
}
11+
12+
/**
13+
* Footer note
14+
* 1) Small paragraph of text in the footer
15+
*/
16+
.c-footer__note {
17+
font-size: $font-size-sm;
18+
19+
a {
20+
text-decoration: underline;
21+
}
22+
}

packages/engine-twig-php/lib/engine_twig_php.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
const TwigRenderer = require('@basalt/twig-renderer');
1818
const fs = require('fs-extra');
1919
const path = require('path');
20+
const chalk = require('chalk');
2021

2122
let twigRenderer;
2223
let patternLabConfig = {};
@@ -90,7 +91,16 @@ const engine_twig_php = {
9091
if (results.ok) {
9192
resolve(results.html + details);
9293
} else {
93-
reject(results.message);
94+
// make Twig rendering errors more noticeable + exit when not in dev mode (or running the `patternlab serve` command)
95+
if (
96+
process.argv.slice(1).includes('serve') ||
97+
process.env.NODE_ENV === 'development'
98+
) {
99+
reject(chalk.red(results.message));
100+
} else {
101+
console.log(chalk.red(results.message));
102+
process.exit(1);
103+
}
94104
}
95105
})
96106
.catch(error => {

packages/engine-twig-php/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"dependencies": {
77
"@basalt/twig-renderer": "0.13.1",
88
"@pattern-lab/core": "^5.7.0",
9+
"chalk": "^4.0.0",
910
"fs-extra": "0.30.0"
1011
},
1112
"keywords": [

0 commit comments

Comments
 (0)