You've already forked AstralRinth
forked from didirus/AstralRinth
Update prettier config + Run pnpm format
This commit is contained in:
@@ -9,20 +9,20 @@ To make use of the built-in icons, styles, and plugins in omorphia, you will nee
|
||||
Add the following parts to your `svelte.config.js` file:
|
||||
|
||||
```js
|
||||
import { preprocess, plugins } from 'omorphia/config/svelte.config';
|
||||
import { preprocess, plugins } from 'omorphia/config/svelte.config'
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
preprocess: [preprocess],
|
||||
preprocess: [preprocess],
|
||||
|
||||
kit: {
|
||||
vite: {
|
||||
plugins: [...plugins],
|
||||
},
|
||||
},
|
||||
};
|
||||
kit: {
|
||||
vite: {
|
||||
plugins: [...plugins],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default config;
|
||||
export default config
|
||||
```
|
||||
|
||||
## PostCSS
|
||||
@@ -32,5 +32,5 @@ 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');
|
||||
module.exports = require('omorphia/config/postcss.config.cjs')
|
||||
```
|
||||
|
||||
@@ -6,33 +6,33 @@ The generator plugin creates static files from API responses to increase perform
|
||||
|
||||
### Current options
|
||||
|
||||
- `projectColors` (false) generates colors for every project
|
||||
- `tags` (false) copies & parses tags from API
|
||||
- `gameVersions` copes game versions from API
|
||||
- `landingPage` gets icon urls for top 100 mods
|
||||
- `projectColors` (false) generates colors for every project
|
||||
- `tags` (false) copies & parses tags from API
|
||||
- `gameVersions` copes game versions from API
|
||||
- `landingPage` gets icon urls for top 100 mods
|
||||
|
||||
> All options are disabled by default
|
||||
|
||||
## Configuration
|
||||
|
||||
```js
|
||||
import Generator from 'omorphia/plugins/generator';
|
||||
import Generator from 'omorphia/plugins/generator'
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
kit: {
|
||||
vite: {
|
||||
plugins: [
|
||||
Generator({
|
||||
projectColors: true,
|
||||
tags: true,
|
||||
gameVersions: true,
|
||||
landingPage: true,
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
kit: {
|
||||
vite: {
|
||||
plugins: [
|
||||
Generator({
|
||||
projectColors: true,
|
||||
tags: true,
|
||||
gameVersions: true,
|
||||
landingPage: true,
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default config;
|
||||
export default config
|
||||
```
|
||||
|
||||
@@ -59,14 +59,14 @@ The `markdownInline` parser is perfect for translations and short bios. It doesn
|
||||
The `Permissions` class provides an easy way to manage user permissions.
|
||||
|
||||
```ts
|
||||
import { Permissions } from 'omorphia/utils';
|
||||
import { Permissions } from 'omorphia/utils'
|
||||
|
||||
const adminLevel = new Permissions('ALL');
|
||||
const memberLevel = new Permissions(member.permissions); /* `member` from API */
|
||||
const userLevel = new Permissions(0);
|
||||
const adminLevel = new Permissions('ALL')
|
||||
const memberLevel = new Permissions(member.permissions) /* `member` from API */
|
||||
const userLevel = new Permissions(0)
|
||||
|
||||
if (memberLevel.data.uploadVersions) {
|
||||
console.log('Can upload versions!');
|
||||
console.log('Can upload versions!')
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user