Skip to content

Commit

Permalink
Merge pull request dev-next-release #1117
Browse files Browse the repository at this point in the history
  • Loading branch information
xrutayisire authored Aug 30, 2023
2 parents 6289e3b + 991fb30 commit 6c944dc
Show file tree
Hide file tree
Showing 108 changed files with 6,049 additions and 164 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
- "@slicemachine/adapter-next"
- "@slicemachine/adapter-nuxt"
- "@slicemachine/adapter-nuxt2"
- "@slicemachine/adapter-sveltekit"

steps:
- name: Checkout
Expand Down Expand Up @@ -122,6 +123,7 @@ jobs:
- "@slicemachine/adapter-next"
- "@slicemachine/adapter-nuxt"
- "@slicemachine/adapter-nuxt2"
- "@slicemachine/adapter-sveltekit"

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion e2e-projects/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cimsirp",
"version": "1.10.0",
"version": "1.10.1-dev-next-release.4",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
13 changes: 13 additions & 0 deletions e2e-projects/sveltekit/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
30 changes: 30 additions & 0 deletions e2e-projects/sveltekit/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};
10 changes: 10 additions & 0 deletions e2e-projects/sveltekit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
2 changes: 2 additions & 0 deletions e2e-projects/sveltekit/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
resolution-mode=highest
13 changes: 13 additions & 0 deletions e2e-projects/sveltekit/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 9 additions & 0 deletions e2e-projects/sveltekit/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
38 changes: 38 additions & 0 deletions e2e-projects/sveltekit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# create-svelte

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
55 changes: 55 additions & 0 deletions e2e-projects/sveltekit/customtypes/page/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"id": "page",
"label": "Page",
"format": "page",
"repeatable": true,
"status": true,
"json": {
"Main": {
"uid": {
"config": {
"label": "UID"
},
"type": "UID"
},
"slices": {
"type": "Slices",
"fieldset": "Slice Zone",
"config": {
"choices": {
"text": {
"type": "SharedSlice"
}
}
}
}
},
"SEO & Metadata": {
"meta_description": {
"config": {
"label": "Meta Description",
"placeholder": "A brief summary of the page"
},
"type": "Text"
},
"meta_image": {
"config": {
"constraint": {
"height": 1260,
"width": 2400
},
"label": "Meta Image",
"thumbnails": []
},
"type": "Image"
},
"meta_title": {
"config": {
"label": "Meta Title",
"placeholder": "A title of the page used for social media and search engines"
},
"type": "Text"
}
}
}
}
39 changes: 39 additions & 0 deletions e2e-projects/sveltekit/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "sveltekit",
"version": "0.0.2-dev-next-release.4",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"slicemachine": "start-slicemachine",
"slicemachine:dev": "NODE_ENV=development SM_ENV=staging start-slicemachine"
},
"devDependencies": {
"@slicemachine/adapter-sveltekit": "workspace:*",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.4",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "8.7.0",
"eslint-plugin-svelte": "^2.30.0",
"prettier": "2.8.4",
"prettier-plugin-svelte": "^2.10.1",
"slice-machine-ui": "workspace:*",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.4.2"
},
"type": "module",
"dependencies": {
"@prismicio/client": "^7.1.1",
"@prismicio/svelte": "^0.0.11"
}
}
6 changes: 6 additions & 0 deletions e2e-projects/sveltekit/slicemachine.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"repositoryName": "slicemachine-e2e-svelte-kit",
"adapter": "@slicemachine/adapter-sveltekit",
"libraries": ["./src/lib/slices"],
"localSliceSimulatorURL": "http://localhost:5173/slice-simulator"
}
12 changes: 12 additions & 0 deletions e2e-projects/sveltekit/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}
}

export {};
12 changes: 12 additions & 0 deletions e2e-projects/sveltekit/src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
1 change: 1 addition & 0 deletions e2e-projects/sveltekit/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.
10 changes: 10 additions & 0 deletions e2e-projects/sveltekit/src/lib/slices/Text/index.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script lang="ts">
import type { Content } from '@prismicio/client';
import { PrismicRichText } from '@prismicio/svelte';
export let slice: Content.TextSlice;
</script>

<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>
<PrismicRichText field={slice.primary.text} />
</section>
20 changes: 20 additions & 0 deletions e2e-projects/sveltekit/src/lib/slices/Text/mocks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"__TYPE__": "SharedSliceContent",
"variation": "default",
"primary": {
"text": {
"__TYPE__": "StructuredTextContent",
"value": [
{
"type": "paragraph",
"content": {
"text": "Consectetur consectetur et quis."
}
}
]
}
},
"items": []
}
]
28 changes: 28 additions & 0 deletions e2e-projects/sveltekit/src/lib/slices/Text/model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"id": "text",
"type": "SharedSlice",
"name": "Text",
"description": "Text",
"variations": [
{
"id": "default",
"name": "Default",
"docURL": "...",
"version": "initial",
"description": "Default",
"imageUrl": "",
"primary": {
"text": {
"type": "StructuredText",
"config": {
"label": "Text",
"placeholder": "",
"allowTargetBlank": true,
"multi": "paragraph,preformatted,heading1,heading2,heading3,heading4,heading5,heading6,strong,em,hyperlink,image,embed,list-item,o-list-item,rtl"
}
}
},
"items": {}
}
]
}
7 changes: 7 additions & 0 deletions e2e-projects/sveltekit/src/lib/slices/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Code generated by Slice Machine. DO NOT EDIT.

import Text from './Text/index.svelte';

export const components = {
text: Text
};
Loading

0 comments on commit 6c944dc

Please sign in to comment.