Skip to content

Commit

Permalink
fix CSS on hero image (#1088)
Browse files Browse the repository at this point in the history
* fix CSS on hero image

* ignore vercel build folders

* bleurgh

* fix ci, hopefully

* fml

* i hate computers
  • Loading branch information
Rich Harris authored Apr 18, 2021
1 parent ee9b195 commit 27c2e1d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-wolves-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-svelte': patch
---

Fix CSS on demo app hero image
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
${{ runner.os }}-${{ matrix.node-version }}
- run: npm install -g pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build --filter ./packages
- run: pnpm build --filter ./packages --filter !./packages/create-svelte/templates
- run: pnpm lint
- run: pnpm check
Tests:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- run: pnpm install --frozen-lockfile
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: ${{ steps.browser_cache.outputs.cache-hit == 'true' }}
- run: pnpm build --filter ./packages
- run: pnpm build --filter ./packages --filter !./packages/create-svelte/templates
- run: pnpm test
Examples:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -100,4 +100,4 @@ jobs:
${{ runner.os }}-${{ matrix.node-version }}
- run: npm install -g pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -r build
- run: pnpm build && pnpm build --filter="svelte-kit-demo" --filter="hn.svelte.dev"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ yarn.lock
/examples/**/.svelte
/examples/**/build
/packages/create-svelte/template/CHANGELOG.md
.env
.env
.vercel_build_output
.svelte
6 changes: 3 additions & 3 deletions packages/create-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
},
"scripts": {
"build": "node scripts/build-templates",
"lint": "eslint --ignore-path .gitignore \"./*.js\" && npm run check-format",
"format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore",
"check-format": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",
"lint": "eslint --ignore-path .gitignore --ignore-path ../../.gitignore \"./*.js\" && npm run check-format",
"format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.gitignore",
"check-format": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.gitignore",
"prepublishOnly": "npm run build"
},
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@
<div class="welcome">
<picture>
<source srcset="svelte-welcome.webp" type="image/webp">
<img
class="welcome"
width="2048"
height="495"
src="svelte-welcome.png"
alt="Welcome"
/>
<img src="svelte-welcome.png" alt="Welcome"/>
</picture>
</div>

Expand Down
15 changes: 8 additions & 7 deletions packages/create-svelte/templates/default/svelte.config.cjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
const sveltePreprocess = require('svelte-preprocess');
const pkg = require('./package.json');

const adapter = process.env.ADAPTER || '@sveltejs/adapter-node';
const adapter = process.env.ADAPTER;
const options = JSON.parse(process.env.OPTIONS || '{}');

/** @type {import('@sveltejs/kit').Config} */
module.exports = {
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: sveltePreprocess(),

kit: {
// By default, `npm run build` will create a standard Node app.
// You can create optimized builds for different platforms by
// specifying a different adapter
adapter: require(adapter)(options),

// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte',

Expand All @@ -26,3 +21,9 @@ module.exports = {
}
}
};

if (adapter) {
config.kit.adapter = require(adapter)(options);
}

module.exports = config;
12 changes: 0 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 27c2e1d

@vercel
Copy link

@vercel vercel bot commented on 27c2e1d Apr 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.