Skip to content

Commit

Permalink
Merge branch 'dev' into new-dir-init
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuenzenmeyer authored Apr 24, 2020
2 parents 6d2186d + aef661a commit 5993ebb
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/docs/src/_includes/components/footer.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div class="l-container">

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

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

Expand Down
3 changes: 2 additions & 1 deletion packages/docs/src/scss/components/_footer-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* The nav inside the footer
*/
.c-footer-nav {
font-size: $font-size-sm-2;
font-size: $font-size-sm-2;
margin-bottom: $spacing;

@media all and (min-width: $bp-med) {
display: flex;
Expand Down
12 changes: 12 additions & 0 deletions packages/docs/src/scss/components/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@
.c-footer {
padding: $spacing-large 0;
}

/**
* Footer note
* 1) Small paragraph of text in the footer
*/
.c-footer__note {
font-size: $font-size-sm;

a {
text-decoration: underline;
}
}
12 changes: 11 additions & 1 deletion packages/engine-twig-php/lib/engine_twig_php.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
const TwigRenderer = require('@basalt/twig-renderer');
const fs = require('fs-extra');
const path = require('path');
const chalk = require('chalk');

let twigRenderer;
let patternLabConfig = {};
Expand Down Expand Up @@ -90,7 +91,16 @@ const engine_twig_php = {
if (results.ok) {
resolve(results.html + details);
} else {
reject(results.message);
// make Twig rendering errors more noticeable + exit when not in dev mode (or running the `patternlab serve` command)
if (
process.argv.slice(1).includes('serve') ||
process.env.NODE_ENV === 'development'
) {
reject(chalk.red(results.message));
} else {
console.log(chalk.red(results.message));
process.exit(1);
}
}
})
.catch(error => {
Expand Down
1 change: 1 addition & 0 deletions packages/engine-twig-php/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dependencies": {
"@basalt/twig-renderer": "0.13.1",
"@pattern-lab/core": "^5.7.0",
"chalk": "^4.0.0",
"fs-extra": "0.30.0"
},
"keywords": [
Expand Down

0 comments on commit 5993ebb

Please sign in to comment.