From da019ab595a791631c275516fbea3c44645b7182 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Wed, 3 Jan 2024 10:09:22 +0000 Subject: [PATCH] Fix package.json --- package.json | 8 ++++++-- src/index-classic.js | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index cb6447b..06c6bda 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "velvette", "version": "0.1.4-pre", "description": "Make authoring CSS view-transitions easier", - "main": "index.js", + "main": "src/index.js", "scripts": { "start": "node ./serve.js", "build:classic": "npx esbuild src/index-classic.js --bundle --outfile=dist/browser/velvette.js --sourcemap --format=iife", @@ -32,5 +32,9 @@ }, "script": "./dist/browser/velvette.min.js", "default": "./src/index.js" - } + }, + "files": [ + "src/*", "dist/**/" + ], + "type": "module" } diff --git a/src/index-classic.js b/src/index-classic.js index 1869587..d9bb916 100644 --- a/src/index-classic.js +++ b/src/index-classic.js @@ -1,3 +1,4 @@ -import { Velvette } from "./index.js"; +import { Velvette, startViewTransition } from "./index.js"; +Reflect.set(Velvette, "startViewTransition", startViewTransition); Reflect.set(window, "Velvette", Velvette); \ No newline at end of file