Skip to content

Commit

Permalink
chore: update to build config
Browse files Browse the repository at this point in the history
  • Loading branch information
edodusi committed Dec 31, 2024
1 parent 6f9628f commit 2d50232
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-autoapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'storyblok/storyblok-react'
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'storyblok/storyblok-js-client'
steps:
- name: Dependabot metadata
id: metadata
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Run Unit tests
run: pnpm run test
run: pnpm run test:unit:ci
- name: Run E2E tests
env:
VITE_ACCESS_TOKEN: ${{ secrets.VITE_ACCESS_TOKEN }}
Expand Down
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,22 @@
"tests"
],
"scripts": {
"lint": "eslint --max-warnings=0 './src/**/*.{ts,js}'",
"build": "node vite.build.mjs && tsc",
"dev": "vite build --watch",
"build": "node vite.build.mjs",
"test": "pnpm run test:unit:ci && pnpm run test:e2e",
"test:unit": "vitest",
"test:unit:ci": "vitest run",
"test:unit:ui": "vitest --ui",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"playground": "pnpm run --filter ./playground/vanilla dev",
"playground:svelte": "pnpm run --filter ./playground/svelte dev",
"playground:next": "pnpm run --filter ./playground/nextjs dev",
"dev:umd": "npx serve ./",
"test": "vitest run",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:ui": "vitest --ui --coverage.enabled=true",
"coverage": "vitest run --coverage",
"prepare": "npm run build"
"prepare": "pnpm simple-git-hooks",
"prepublishOnly": "pnpm build"
},
"devDependencies": {
"@commitlint/cli": "^19.6.1",
Expand Down
2 changes: 1 addition & 1 deletion vite.build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const bundles = [
;(async () => {
for (const bundle of bundles) {
await build({
configFile: false,
configFile: 'vite.config.ts',
build: {
lib: {
entry: resolve(__dirname, 'src', bundle.entry),
Expand Down
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';

// eslint-disable-next-line no-console
console.log(`${lightGreen('Storyblok Richtext')} v${pkg.version}`);
console.log(`${lightGreen('Storyblok JS Client')} v${pkg.version}`);

export default defineConfig(() => ({
plugins: [
dts({
insertTypesEntry: true,
outDir: 'dist/types',
}),
banner({
content: `/**\n * name: ${pkg.name}\n * (c) ${new Date().getFullYear()}\n * description: ${pkg.description}\n * author: ${pkg.author}\n */`,
Expand Down

0 comments on commit 2d50232

Please sign in to comment.