Skip to content

Commit

Permalink
Build with SvelteKit packager
Browse files Browse the repository at this point in the history
* Components are now written in TypeScript, avoiding the need to maintain and test separate type definitions.
* Migrated docs site to use SvelteKit and Bootstrap 5.
* Switched from Prism to Highlight.js for code syntax highlighting.
* Enabled Prettier to autoformat code.
* Switched from Jest to Vitest for tests.
* Separate `gh-pages` branch is now used to deploy docs so autogenerated files don't have to be committed to master branch.
* Added contributing instructions file.

These changes should make it a lot easier to build and test the project, lowering the barrier for contributions and future maintenance.

Closes #313, closes #311
  • Loading branch information
theodorejb committed Dec 24, 2023
1 parent 805dda7 commit ae61934
Show file tree
Hide file tree
Showing 84 changed files with 1,392 additions and 6,029 deletions.
5 changes: 0 additions & 5 deletions .browserslistrc

This file was deleted.

40 changes: 2 additions & 38 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,10 @@ root = true
[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.coffee]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.ejs]
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.less]
indent_style = space
indent_size = 2

[*.styl]
indent_style = space
indent_size = 2

[*.vue]
indent_style = space
indent_size = 2

[*.eslintrc]
indent_style = space
indent_size = 2
31 changes: 31 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/** @type { import("eslint").Linter.Config } */
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",
},
},
],
};
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

110 changes: 0 additions & 110 deletions .gitattributes

This file was deleted.

26 changes: 8 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
time: "21:00"
open-pull-requests-limit: 10
reviewers:
- Cweili
ignore:
- dependency-name: eslint
versions:
- 7.18.0
- 7.19.0
- 7.20.0
- 7.21.0
- 7.22.0
- 7.23.0
- 7.24.0
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
time: "21:00"
open-pull-requests-limit: 10
reviewers:
- Cweili
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: 'ci'
name: "ci"
on:
push:
branches-ignore:
- 'dependabot/**'
- "dependabot/**"
pull_request:
branches:
- '**'
- "**"
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -14,11 +14,13 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 16
node-version: 20

- run: npm install
- run: npm run check
- run: npm run lint
- run: npm run build
- run: npm test -- --coverageReporters=lcov
- run: npm test -- --coverage

- uses: coverallsapp/github-action@master
with:
Expand Down
33 changes: 5 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,17 @@
# Temporary
.tmp
*.tmp

# Logs
logs
*.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# Commenting this out is preferred by some people, see
# https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules
bower_components

# Users Environment Variables
.lock-wscript
package-lock.json

# IDE configs
.idea

# Distributions
/build
/dist
/.svelte-kit
/package
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
48 changes: 0 additions & 48 deletions .npmignore

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
/build
/.svelte-kit
/package
package-lock.json
*.md
Loading

0 comments on commit ae61934

Please sign in to comment.