Skip to content

Commit 5923c50

Browse files
authored
Implement Demo using SvelteKit (#35)
* Implement Demo using SvelteKit * Update * update
1 parent 401aed3 commit 5923c50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1952
-6
lines changed

.github/workflows/GHPages.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ jobs:
1212
- uses: actions/setup-node@v2
1313
- name: Install And Build
1414
run: |+
15-
npm install
16-
npm run build
17-
cd explorer
15+
cd explorer-v2
1816
npm install
1917
npm run build
2018
- name: Deploy
2119
uses: peaceiris/actions-gh-pages@v3
2220
with:
2321
github_token: ${{ secrets.GITHUB_TOKEN }}
24-
publish_dir: ./explorer/dist
22+
publish_dir: ./explorer-v2/build
2523
force_orphan: true

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"vue",
66
"typescript",
77
"json",
8-
"jsonc"
8+
"jsonc",
9+
"svelte"
910
],
1011
"typescript.validate.enable": true,
1112
"javascript.validate.enable": false,

explorer-v2/.eslintrc.cjs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
module.exports = {
2+
root: true,
3+
extends: [
4+
'plugin:@ota-meshi/recommended',
5+
'plugin:@ota-meshi/+node',
6+
'plugin:@ota-meshi/+json',
7+
'plugin:@ota-meshi/+prettier',
8+
'plugin:@ota-meshi/svelte/recommended'
9+
],
10+
parserOptions: {
11+
sourceType: 'module',
12+
ecmaVersion: 2020
13+
},
14+
env: {
15+
browser: true,
16+
es2017: true,
17+
node: true
18+
},
19+
rules: {
20+
'eslint-comments/no-unused-disable': 'off',
21+
'node/no-missing-import': 'off',
22+
'node/no-unpublished-require': 'off',
23+
'node/no-unpublished-import': 'off',
24+
'node/no-unsupported-features/es-syntax': 'off',
25+
'require-jsdoc': 'off',
26+
'node/file-extension-in-import': 'off',
27+
'prettier/prettier': [
28+
'error',
29+
{},
30+
{
31+
usePrettierrc: true
32+
}
33+
],
34+
'no-shadow': 'off',
35+
camelcase: 'off'
36+
},
37+
overrides: [
38+
{
39+
files: ['*.d.ts'],
40+
rules: {
41+
'spaced-comment': 'off'
42+
}
43+
}
44+
]
45+
};

explorer-v2/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
node_modules
3+
/.svelte-kit
4+
/build
5+
/functions

explorer-v2/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
engine-strict=true
2+
package-lock=false

explorer-v2/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.svelte-kit/**
2+
static/**
3+
build/**
4+
node_modules/**

explorer-v2/.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100
6+
}

explorer-v2/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# create-svelte
2+
3+
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
4+
5+
## Creating a project
6+
7+
If you're seeing this, you've probably already done this step. Congrats!
8+
9+
```bash
10+
# create a new project in the current directory
11+
npm init svelte@next
12+
13+
# create a new project in my-app
14+
npm init svelte@next my-app
15+
```
16+
17+
> Note: the `@next` is temporary
18+
19+
## Developing
20+
21+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
22+
23+
```bash
24+
npm run dev
25+
26+
# or start the server and open the app in a new browser tab
27+
npm run dev -- --open
28+
```
29+
30+
## Building
31+
32+
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
33+
34+
```bash
35+
npm run build
36+
```
37+
38+
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// eslint-disable-next-line no-undef -- ignore
2+
module.exports = function () {
3+
/* noop */
4+
};
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import sortedLastIndex from '../../node_modules/lodash/sortedLastIndex.js';
2+
import sortedIndexBy from '../../node_modules/lodash/sortedIndexBy.js';
3+
import memoize from '../../node_modules/lodash/memoize.js';
4+
import merge from '../../node_modules/lodash/merge.js';
5+
import intersection from '../../node_modules/lodash/intersection.js';
6+
import union from '../../node_modules/lodash/union.js';
7+
import flatMap from '../../node_modules/lodash/flatMap.js';
8+
import escapeRegExp from '../../node_modules/lodash/escapeRegExp.js';
9+
import mapValues from '../../node_modules/lodash/mapValues.js';
10+
import overSome from '../../node_modules/lodash/overSome.js';
11+
import isPlainObject from '../../node_modules/lodash/isPlainObject.js';
12+
import last from '../../node_modules/lodash/last.js';
13+
14+
export {
15+
sortedLastIndex,
16+
sortedIndexBy,
17+
memoize,
18+
merge,
19+
intersection,
20+
union,
21+
flatMap,
22+
escapeRegExp,
23+
mapValues,
24+
overSome,
25+
isPlainObject,
26+
last
27+
};
28+
export default {
29+
sortedLastIndex,
30+
sortedIndexBy,
31+
memoize,
32+
merge,
33+
intersection,
34+
union,
35+
flatMap,
36+
escapeRegExp,
37+
mapValues,
38+
overSome,
39+
isPlainObject,
40+
last
41+
};

0 commit comments

Comments
 (0)