Skip to content

Commit

Permalink
update package
Browse files Browse the repository at this point in the history
  • Loading branch information
julesrx committed Dec 6, 2023
1 parent f8193e1 commit d2898b3
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 46 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions lib/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ export interface BouncingElement {
direction: number;

tranformers: FrameTransformer[];
data: {
[key: string]: any;
};
data: { [key: string]: any };
}
67 changes: 32 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
16 changes: 8 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' })]
});

0 comments on commit d2898b3

Please sign in to comment.