diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..00efc5d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v2 + with: + run_install: true + + - name: Build + run: pnpm build diff --git a/lib/interfaces.ts b/lib/interfaces.ts index f54ad02..11f332a 100644 --- a/lib/interfaces.ts +++ b/lib/interfaces.ts @@ -22,7 +22,5 @@ export interface BouncingElement { direction: number; tranformers: FrameTransformer[]; - data: { - [key: string]: any; - }; + data: { [key: string]: any }; } diff --git a/package.json b/package.json index 2f44cc4..5fe00c2 100644 --- a/package.json +++ b/package.json @@ -1,38 +1,35 @@ { - "name": "bouncing-element", - "description": "JavaScript library to reproduce the famous DVD screensaver with any DOM element.", - "version": "1.0.7", - "author": "Jules Raffoux (https://julesrx.fr)", - "homepage": "https://github.com/julesrx/bouncing-element#readme", - "repository": { - "type": "git", - "url": "git+https://github.com/julesrx/bouncing-element.git" - }, - "keywords": [ - "animation" - ], - "files": [ - "dist" - ], - "main": "./dist/bouncing-element.umd.js", - "module": "./dist/bouncing-element.es.js", - "types": "./dist/lib/main.d.ts", - "exports": { - ".": { - "import": "./dist/bouncing-element.es.js", - "require": "./dist/bouncing-element.umd.js" + "name": "bouncing-element", + "description": "JavaScript library to reproduce the famous DVD screensaver with any DOM element.", + "version": "2.0.0", + "author": "Jules Raffoux (https://julesrx.fr)", + "repository": "github:julesrx/bouncing-element", + "homepage": "https://github.com/julesrx/bouncing-element", + "keywords": [ + "animation" + ], + "files": [ + "dist" + ], + "main": "./dist/bouncing-element.umd.js", + "module": "./dist/bouncing-element.es.js", + "types": "./dist/lib/main.d.ts", + "exports": { + ".": { + "import": "./dist/bouncing-element.es.js", + "require": "./dist/bouncing-element.umd.js" + } + }, + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "serve": "vite preview", + "prepublishOnly": "pnpm build" + }, + "devDependencies": { + "@types/node": "^20.9.6", + "typescript": "^5.3.2", + "vite": "^5.0.6", + "vite-plugin-dts": "^3.6.4" } - }, - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "serve": "vite preview", - "prepublishOnly": "pnpm build" - }, - "devDependencies": { - "@types/node": "^20.9.6", - "typescript": "^5.3.2", - "vite": "^5.0.6", - "vite-plugin-dts": "^3.6.4" - } } diff --git a/vite.config.ts b/vite.config.ts index c19cbd8..1bfcb14 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,12 +3,12 @@ import { defineConfig } from 'vite'; import dts from 'vite-plugin-dts'; export default defineConfig({ - build: { - lib: { - entry: resolve(__dirname, 'lib/main.ts'), - name: 'Bouncer', - fileName: format => `bouncing-element.${format}.js` - } - }, - plugins: [dts({ exclude: './src' })] + build: { + lib: { + entry: resolve(__dirname, 'lib/main.ts'), + name: 'Bouncer', + fileName: format => `bouncing-element.${format}.js` + } + }, + plugins: [dts({ exclude: './src' })] });