Skip to content

Commit

Permalink
Chore/upgrade greenwood v0.27.0 (#278)
Browse files Browse the repository at this point in the history
* initial Greenwood v0.27.0 upgrade

* restore specs

* upgrade latest alpha.1

* upgrade v0.27.0-alpha.2

* upgrade alpha.3

* upgrade alpha.7
  • Loading branch information
thescientist13 authored Nov 23, 2022
1 parent d6b1192 commit 95d1ded
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 703 deletions.
15 changes: 5 additions & 10 deletions greenwood.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,18 @@ export default {
},

plugins: [
greenwoodPluginPostCss(),
greenwoodPluginImportCss(),
greenwoodPluginGraphQL(),
greenwoodPluginRendererPuppeteer(),
greenwoodPluginGoogleAnalytics({
analyticsId: 'UA-117350131-1'
}),

greenwoodPluginPostCss(),

...greenwoodPluginImportCss(),

...greenwoodPluginGraphQL(),

...greenwoodPluginRendererPuppeteer()
})
],

markdown: {
plugins: [
'@mapbox/rehype-prism'
]
}

};
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@greenwood/cli": "^0.26.1",
"@greenwood/plugin-google-analytics": "^0.26.1",
"@greenwood/plugin-graphql": "^0.26.1",
"@greenwood/plugin-import-css": "^0.26.1",
"@greenwood/plugin-postcss": "^0.26.1",
"@greenwood/plugin-renderer-puppeteer": "^0.26.1",
"@greenwood/cli": "^0.27.0",
"@greenwood/plugin-google-analytics": "^0.27.0",
"@greenwood/plugin-graphql": "^0.27.0",
"@greenwood/plugin-import-css": "^0.27.0",
"@greenwood/plugin-postcss": "^0.27.0",
"@greenwood/plugin-renderer-puppeteer": "^0.27.0",
"@ls-lint/ls-lint": "^1.10.0",
"@mapbox/rehype-prism": "^0.5.0",
"@web/test-runner": "^0.13.13",
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/card.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css, html, LitElement, unsafeCSS } from 'lit-element';
import '../social-icon-link/social-icon-link.js';
import cardCss from './card.css';
import cardCss from './card.css?type=css';

class CardComponent extends LitElement {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { css, html, LitElement, unsafeCSS } from 'lit-element';
import '../card-list/card-list.js';
import ArticlesService from '../../services/articles/articles-service.js';
import PresentationsService from '../../services/presentations/presentations-service.js';
import pageCss from '../../styles/page.css';
import pageCss from '../../styles/page.css?type=css';

class ContentListComponent extends LitElement {

Expand Down
2 changes: 1 addition & 1 deletion src/components/footer/footer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css, html, LitElement, unsafeCSS } from 'lit-element';
import '../social-icon-link/social-icon-link.js';
import footerCss from './footer.css';
import footerCss from './footer.css?type=css';

class FooterComponent extends LitElement {

Expand Down
2 changes: 1 addition & 1 deletion src/components/header/header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css, html, LitElement, unsafeCSS } from 'lit-element';
import headerCss from './header.css';
import headerCss from './header.css?type=css';

class HeaderComponent extends LitElement {

Expand Down
2 changes: 1 addition & 1 deletion src/components/navigation/navigation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css, html, LitElement, unsafeCSS } from 'lit-element';
import navigationCss from './navigation.css';
import navigationCss from './navigation.css?type=css';

class NavigationComponent extends LitElement {

Expand Down
12 changes: 9 additions & 3 deletions web-test-runner.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ export default {
name: 'import-css',
async transform(context) {
const { url } = context.request;
const shouldIntercept = await importCssResource.shouldIntercept(url, context.body, { request: context.headers });

const customHeaders = {
request: {
originalUrl: url,
...context.headers
}
};
const shouldIntercept = await importCssResource.shouldIntercept(url, context.body, customHeaders);

if (shouldIntercept) {
const cssResource = await importCssResource.intercept(url, context.body);
const cssResource = await importCssResource.intercept(url, context.body, customHeaders);
const { body, contentType } = cssResource;

return {
Expand Down
Loading

0 comments on commit 95d1ded

Please sign in to comment.