diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..55ef3c7 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,15 @@ +name: Lint +on: + pull_request: + branches: ['**'] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run lint diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 26d15f0..853e063 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,18 +1,17 @@ name: Publish on: - release: - types: [published] + release: + types: [published] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v3 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run publish-packages - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run publish-packages + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2bc48a8..a8f1ba3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,29 +1,22 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: Tests - on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - + pull_request: + branches: ['**'] jobs: - tests: - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [20.x] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build - - run: npx playwright install - - run: npm test \ No newline at end of file + tests: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: [20.x] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build + - run: npx playwright install --with-deps chromium + - run: npm test diff --git a/apps/demo/.eslintrc.cjs b/apps/demo/.eslintrc.cjs index b359f98..7c11632 100644 --- a/apps/demo/.eslintrc.cjs +++ b/apps/demo/.eslintrc.cjs @@ -1,3 +1,4 @@ +/** @type { import("eslint").Linter.Config } */ module.exports = { root: true, extends: [ diff --git a/apps/demo/package.json b/apps/demo/package.json index 5090115..72c6584 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -14,13 +14,13 @@ }, "devDependencies": { "@playwright/test": "^1.28.1", - "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/kit": "^2.0.0", + "@sveltejs/adapter-cloudflare": "^4.4.0", + "@sveltejs/kit": "*", "@sveltejs/vite-plugin-svelte": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^6.13.1", - "@typescript-eslint/parser": "^6.17.0", + "@typescript-eslint/eslint-plugin": "^7.0.0", + "@typescript-eslint/parser": "*", "eslint": "^8.53.0", - "eslint-config-prettier": "^9.0.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.35.1", "prettier": "*", "prettier-plugin-svelte": "^3.0.3", diff --git a/apps/demo/src/lib/assets/image.jpeg b/apps/demo/src/lib/assets/image.jpeg new file mode 120000 index 0000000..89e6065 --- /dev/null +++ b/apps/demo/src/lib/assets/image.jpeg @@ -0,0 +1 @@ +../../routes/playground/markdown/image.jpeg \ No newline at end of file diff --git a/apps/demo/src/routes/+layout.svelte b/apps/demo/src/routes/+layout.svelte index aba1751..912838d 100644 --- a/apps/demo/src/routes/+layout.svelte +++ b/apps/demo/src/routes/+layout.svelte @@ -38,7 +38,6 @@ >Close menu -