You've already forked AstralRinth
forked from didirus/AstralRinth
docs: Improve example component + Fix sidebar on mobile
This commit is contained in:
40
src/routes/getting-started/configure.md
Normal file
40
src/routes/getting-started/configure.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Configure
|
||||
---
|
||||
|
||||
To make use of the built-in icons, styles, and plugins in omorphia, you will need to update the config files.
|
||||
|
||||
## SvelteKit
|
||||
|
||||
Add the following parts to your `svelte.config.js` file:
|
||||
|
||||
```js
|
||||
import { preprocess, plugins } from 'omorphia/config/svelte.config'
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
preprocess: [
|
||||
preprocess,
|
||||
],
|
||||
|
||||
kit: {
|
||||
vite: {
|
||||
plugins: [
|
||||
...plugins,
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
```
|
||||
|
||||
## PostCSS
|
||||
|
||||
Create a `postcss.config.cjs` file in the root of your project.
|
||||
|
||||
Add the following line to that file:
|
||||
|
||||
```js
|
||||
module.exports = require('omorphia/config/postcss.config.cjs')
|
||||
```
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
title: PostCSS Configuration
|
||||
---
|
||||
|
||||
Use [PostCSS](https://postcss.org/) to process your css in components and `.postcss` files.
|
||||
|
||||
Install PostCSS with:
|
||||
|
||||
```bash
|
||||
pnpx svelte-add@latest postcss
|
||||
```
|
||||
|
||||
This is the recommended `postcss.config.cjs` setup:
|
||||
|
||||
```js
|
||||
const config = {
|
||||
plugins: [
|
||||
require('postcss-import'),
|
||||
require('postcss-strip-inline-comments'),
|
||||
require('postcss-nested'),
|
||||
require('postcss-preset-env'),
|
||||
require('autoprefixer'),
|
||||
require('postcss-extend-rule'),
|
||||
process.env.NODE_ENV === 'development' && require('cssnano')({
|
||||
preset: 'default',
|
||||
})
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
```
|
||||
Reference in New Issue
Block a user