Skip to content

fix CSS on hero image #1088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.