format
This commit is contained in:
parent
3e24341f17
commit
78319dfff0
6 changed files with 15 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
||||||
# Astro Project Funding
|
# Astro Project Funding
|
||||||
|
|
||||||
_Last Updated: 02-09-2022_
|
_Last Updated: 02-09-2022_
|
||||||
|
|
||||||
## Raising Funds
|
## Raising Funds
|
||||||
|
|
||||||
Astro is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for Astro is not sustainable without proper financial backing. We need your help to achieve this.
|
Astro is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for Astro is not sustainable without proper financial backing. We need your help to achieve this.
|
||||||
|
|
|
@ -1286,10 +1286,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve
|
||||||
|
|
||||||
```js
|
```js
|
||||||
export default {
|
export default {
|
||||||
markdownOptions: {
|
markdownOptions: {
|
||||||
remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]],
|
remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]],
|
||||||
rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]],
|
rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -1309,10 +1309,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve
|
||||||
|
|
||||||
```js
|
```js
|
||||||
export default {
|
export default {
|
||||||
name: '@matthewp/my-renderer',
|
name: '@matthewp/my-renderer',
|
||||||
server: './server.js',
|
server: './server.js',
|
||||||
client: './client.js',
|
client: './client.js',
|
||||||
hydrationPolyfills: ['./my-polyfill.js'],
|
hydrationPolyfills: ['./my-polyfill.js'],
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe('Attributes', async () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const id of Object.keys(attrs)) {
|
for (const id of Object.keys(attrs)) {
|
||||||
const { attribute, value } = attrs[id]
|
const { attribute, value } = attrs[id];
|
||||||
const attr = $(`#${id}`).attr(attribute);
|
const attr = $(`#${id}`).attr(attribute);
|
||||||
expect(attr).to.equal(value);
|
expect(attr).to.equal(value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { expect } from 'chai';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
|
||||||
describe('JSX', () => {
|
describe('JSX', () => {
|
||||||
|
|
||||||
let cwd = './fixtures/astro-jsx/';
|
let cwd = './fixtures/astro-jsx/';
|
||||||
let orders = [
|
let orders = [
|
||||||
['preact', 'react', 'solid'],
|
['preact', 'react', 'solid'],
|
||||||
|
@ -13,7 +12,7 @@ describe('JSX', () => {
|
||||||
['solid', 'preact', 'react'],
|
['solid', 'preact', 'react'],
|
||||||
];
|
];
|
||||||
let fixtures = {};
|
let fixtures = {};
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
orders.map((renderers, n) =>
|
orders.map((renderers, n) =>
|
||||||
|
@ -28,13 +27,13 @@ describe('JSX', () => {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Renderer order', () => {
|
it('Renderer order', () => {
|
||||||
it('JSX renderers can be defined in any order', async () => {
|
it('JSX renderers can be defined in any order', async () => {
|
||||||
if (!Object.values(fixtures).length) {
|
if (!Object.values(fixtures).length) {
|
||||||
throw new Error(`JSX renderers didn’t build properly`);
|
throw new Error(`JSX renderers didn’t build properly`);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const [name, fixture] of Object.entries(fixtures)) {
|
for (const [name, fixture] of Object.entries(fixtures)) {
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
expect(html, name).to.be.ok;
|
expect(html, name).to.be.ok;
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('LitElement test', () => {
|
||||||
|
|
||||||
const NODE_VERSION = parseFloat(process.versions.node);
|
const NODE_VERSION = parseFloat(process.versions.node);
|
||||||
const stripExpressionMarkers = (html) => html.replace(/<!--\/?lit-part-->/g, '');
|
const stripExpressionMarkers = (html) => html.replace(/<!--\/?lit-part-->/g, '');
|
||||||
|
|
||||||
before(async () => {
|
before(async () => {
|
||||||
// @lit-labs/ssr/ requires Node 13.9 or higher
|
// @lit-labs/ssr/ requires Node 13.9 or higher
|
||||||
if (NODE_VERSION < 13.9) {
|
if (NODE_VERSION < 13.9) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('PostCSS', () => {
|
||||||
renderers: ['@astrojs/renderer-solid', '@astrojs/renderer-svelte', '@astrojs/renderer-vue'],
|
renderers: ['@astrojs/renderer-solid', '@astrojs/renderer-svelte', '@astrojs/renderer-vue'],
|
||||||
});
|
});
|
||||||
await fixture.build();
|
await fixture.build();
|
||||||
|
|
||||||
// get bundled CSS (will be hashed, hence DOM query)
|
// get bundled CSS (will be hashed, hence DOM query)
|
||||||
const html = await fixture.readFile('/index.html');
|
const html = await fixture.readFile('/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
|
|
Loading…
Add table
Reference in a new issue