Skip to content

Commit

Permalink
Merge pull request #1471 from nubolab-ffwd/workspace
Browse files Browse the repository at this point in the history
Workspace
  • Loading branch information
sfriedel authored Feb 10, 2025
2 parents 2376a19 + 0d36f25 commit fd511ee
Show file tree
Hide file tree
Showing 214 changed files with 1,557 additions and 821 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_style = space
3 changes: 2 additions & 1 deletion .github/workflows/docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
cache: 'pnpm'
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm build
working-directory: ./docs-site
- name: Deploy to GH Pages
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
publish_dir: ./docs-site/build
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

on:
push:
branches: [main, next]
pull_request:
branches: [main, next]

Expand Down Expand Up @@ -41,6 +40,7 @@ jobs:
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm test
- run: pnpm build
working-directory: ./docs-site

test-peer-deps:
name: ${{ matrix.package-version }}
Expand All @@ -65,5 +65,6 @@ jobs:
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- name: Install ${{ matrix.package-version }}
run: pnpm install --no-lockfile ${{ matrix.package-version }}
working-directory: ./testsuite
- run: pnpm test
- run: pnpm build
working-directory: ./testsuite
35 changes: 28 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
# everything added here should also be added to .eslintignore and .prettierignore
.DS_Store
node_modules
/build
/.svelte-kit
/dist
.eslintcache

# Output
.output
.vercel
.netlify
.wrangler

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
storybook-static
.eslintcache
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

/examples/.svelte-kit
/examples/build

/docs-site/.svelte-kit
/docs-site/build

/packages/svelte-fluent/.svelte-kit
/packages/svelte-fluent/build
/packages/svelte-fluent/dist
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
engine-strict=true
link-workspace-packages = true
14 changes: 3 additions & 11 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/dist
.env
.env.*
!.env.example
storybook-static
.eslintcache

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

# Ignore auto-generated files
CHANGELOG.md

# ignore symlinked README
/README.md
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.0.3"
"packages/svelte-fluent": "1.0.3"
}
54 changes: 0 additions & 54 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
23 changes: 23 additions & 0 deletions docs-site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions docs-site/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
17 changes: 17 additions & 0 deletions docs-site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# svelte-fluent documentation site

Code of the documentation site served at https://nubolab-ffwd.github.io/svelte-fluent/

## Developing

```bash
pnpm dev
```

The dev server can be accessed at http://localhost:5173/

## Building

```bash
pnpm build
```
File renamed without changes.
56 changes: 56 additions & 0 deletions docs-site/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "svelte-fluent-docs-site",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"prebuild": "pnpm run --dir ../packages/svelte-fluent package",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@fluent/bundle": "0.18.0",
"@fluent/langneg": "0.7.0",
"@fontsource-variable/manrope": "5.1.1",
"@iconify-json/mdi": "1.2.3",
"@nubolab-ffwd/svelte-fluent": "workspace:^",
"@sveltejs/adapter-static": "3.0.8",
"@sveltejs/kit": "2.17.1",
"@sveltejs/package": "2.3.10",
"@sveltejs/vite-plugin-svelte": "5.0.3",
"@types/hast": "3.0.4",
"@types/jsdom": "21.1.7",
"autoprefixer": "10.4.20",
"hast-util-heading-rank": "3.0.0",
"hast-util-to-string": "3.0.1",
"mdsvex": "0.12.3",
"postcss": "8.5.1",
"postcss-load-config": "6.0.1",
"postcss-preset-env": "10.1.3",
"rehype-add-classes": "1.0.0",
"rehype-autolink-headings": "7.1.0",
"rehype-external-links": "3.0.0",
"rehype-shift-heading": "2.0.0",
"rehype-slug": "6.0.0",
"rehype-wrap-all": "1.1.0",
"semver": "7.7.1",
"shiki": "2.3.0",
"svelte": "5.19.7",
"svelte-check": "4.1.4",
"svelte2tsx": "0.7.34",
"svelte-fluent-examples": "workspace:^",
"tslib": "2.8.1",
"typescript": "5.7.3",
"typescript-eslint": "8.23.0",
"unist-util-visit": "5.0.0",
"unplugin-icons": "22.0.0",
"vite": "6.0.11"
},
"dependencies": {
"jsdom": "^26.0.0"
}
}
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/app.html → docs-site/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body>
<div>%sveltekit.body%</div>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
3 changes: 3 additions & 0 deletions docs-site/src/app.postcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import '$lib/styles/base.postcss';
@import '$lib/styles/theme.postcss';
@import '$lib/styles/ui.postcss';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import ExampleRenderer from '$site/ExampleRenderer.svelte';
import App from './App.svelte';
import appSource from './App.svelte?raw&highlight';
import ExampleRenderer from '$lib/ExampleRenderer.svelte';
import App from 'svelte-fluent-examples/src/frontpage/App.svelte';
import appSource from 'svelte-fluent-examples/src/frontpage/App.svelte?raw&highlight';
const args = {
userName: 'Anna',
Expand Down
19 changes: 19 additions & 0 deletions docs-site/src/lib/rendered-examples/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export { default as FrontpageExample } from './frontpage/FrontpageExample.svelte';
export { default as LocalizeAttributesExample } from './localize/LocalizeAttributesExample.svelte';
export { default as LocalizeDynamicTextExample } from './localize/LocalizeDynamicTextExample.svelte';
export { default as LocalizeStaticTextExample } from './localize/LocalizeStaticTextExample.svelte';
export { default as LocalizedAttributesExample } from './localized/LocalizedAttributesExample.svelte';
export { default as LocalizedAttributesWithVariablesExample } from './localized/LocalizedAttributesWithVariablesExample.svelte';
export { default as LocalizedDynamicTextExample } from './localized/LocalizedDynamicTextExample.svelte';
export { default as LocalizedStaticTextExample } from './localized/LocalizedStaticTextExample.svelte';
export { default as LocalizedLegacyAttributesExample } from './localized-legacy/LocalizedLegacyAttributesExample.svelte';
export { default as OverlayDynamicTextExample } from './overlay/OverlayDynamicTextExample.svelte';
export { default as OverlayStaticTextExample } from './overlay/OverlayStaticTextExample.svelte';
export { default as ProviderExample } from './provider/ProviderExample.svelte';
export { default as TutorialAttributesExample } from './tutorial/TutorialAttributesExample.svelte';
export { default as TutorialFirstStepsExample } from './tutorial/TutorialFirstStepsExample.svelte';
export { default as TutorialInterpolationCustomFunctionsExample } from './tutorial/TutorialInterpolationCustomFunctionsExample.svelte';
export { default as TutorialInterpolationExample } from './tutorial/TutorialInterpolationExample.svelte';
export { default as TutorialInterpolationFormattingExample } from './tutorial/TutorialInterpolationFormattingExample.svelte';
export { default as TutorialMultiLanguageExample } from './tutorial/TutorialMultiLanguageExample.svelte';
export { default as TutorialTranslationFilesExample } from './tutorial/TutorialTranslationFilesExample.svelte';
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
import ExampleRenderer from '$lib/ExampleRenderer.svelte';
import App from 'svelte-fluent-examples/src/localize/attributes/App.svelte';
import componentSource from 'svelte-fluent-examples/src/localize/attributes/Component.svelte?raw&highlight';
import enFtlSource from 'svelte-fluent-examples/src/localize/attributes/en.ftl?raw&highlight';
</script>

<ExampleRenderer
sources={{
'Component.svelte': { code: componentSource, html: true },
'en.ftl': { code: enFtlSource, html: true }
}}
>
<App />
</ExampleRenderer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
import ExampleRenderer from '$lib/ExampleRenderer.svelte';
import App from 'svelte-fluent-examples/src/localize/dynamic-text/App.svelte';
import componentSource from 'svelte-fluent-examples/src/localize/dynamic-text/Component.svelte?raw&highlight';
import enFtlSource from 'svelte-fluent-examples/src/localize/dynamic-text/en.ftl?raw&highlight';
</script>

<ExampleRenderer
sources={{
'Component.svelte': { code: componentSource, html: true },
'en.ftl': { code: enFtlSource, html: true }
}}
>
<App />
</ExampleRenderer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
import ExampleRenderer from '$lib/ExampleRenderer.svelte';
import App from 'svelte-fluent-examples/src/localize/static-text/App.svelte';
import componentSource from 'svelte-fluent-examples/src/localize/static-text/Component.svelte?raw&highlight';
import enFtlSource from 'svelte-fluent-examples/src/localize/static-text/en.ftl?raw&highlight';
</script>

<ExampleRenderer
sources={{
'Component.svelte': { code: componentSource, html: true },
'en.ftl': { code: enFtlSource, html: true }
}}
>
<App />
</ExampleRenderer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
import ExampleRenderer from '$lib/ExampleRenderer.svelte';
import App from 'svelte-fluent-examples/src/localized-legacy/attributes/App.svelte';
import componentSource from 'svelte-fluent-examples/src/localized-legacy/attributes/Component.svelte?raw&highlight';
import enFtlSource from 'svelte-fluent-examples/src/localized-legacy/attributes/en.ftl?raw&highlight';
</script>

<ExampleRenderer
sources={{
'Component.svelte': { code: componentSource, html: true },
'en.ftl': { code: enFtlSource, html: true }
}}
>
<App />
</ExampleRenderer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
import ExampleRenderer from '$lib/ExampleRenderer.svelte';
import App from 'svelte-fluent-examples/src/localized/attributes/App.svelte';
import componentSource from 'svelte-fluent-examples/src/localized/attributes/Component.svelte?raw&highlight';
import enFtlSource from 'svelte-fluent-examples/src/localized/attributes/en.ftl?raw&highlight';
</script>

<ExampleRenderer
sources={{
'Component.svelte': { code: componentSource, html: true },
'en.ftl': { code: enFtlSource, html: true }
}}
>
<App />
</ExampleRenderer>
Loading

0 comments on commit fd511ee

Please sign in to comment.