Skip to content

Commit b4aae0a

Browse files
updated the examples to use the published npm package
1 parent 724c391 commit b4aae0a

File tree

8 files changed

+16
-13
lines changed

8 files changed

+16
-13
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules
2-
dist
2+
dist
3+
4+
examples/css/build

examples/css/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/css/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@emotion/css": "^11.13.5",
1919
"@emotion/styled": "^11.14.0",
2020
"@tailwindcss/vite": "^4.0.9",
21+
"refract-js": "^1.0.0",
2122
"sass": "^1.85.1",
2223
"tailwindcss": "^4.0.9"
2324
}

examples/css/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createSignal } from "@/refract";
1+
import { createSignal } from "refract-js";
22
import Emotion from "./Emotion";
33
import Sass from "./Sass";
44
import Tailwind from "./Tailwind";

examples/css/src/Main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render } from "@/refract";
1+
import { render } from "refract-js";
22
import App from "./App";
33

44
render(<App />, document.getElementById("root")!);

examples/css/src/Timer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createSignal, createEffect, cleanUp } from "@/refract";
1+
import { createSignal, createEffect, cleanUp } from "refract-js";
22

33
function TimerComponent() {
44
const seconds = createSignal<number>(0);

examples/css/vite.config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,10 @@ export default defineConfig({
1515
input: "./index.html",
1616
},
1717
},
18-
resolve: {
19-
alias: {
20-
// @ts-expect-error
21-
"@": path.resolve(__dirname, "../../build/"),
22-
},
23-
},
2418
esbuild: {
2519
jsxFactory: "createElement", // Your custom JSX factory function
2620
jsxFragment: '"FRAGMENT"', // Your custom fragment syntax,
27-
jsxInject: `import { createElement } from "@/refract"`,
21+
jsxInject: `import { createElement } from "refract-js"`,
2822
},
2923
plugins: [tailwindcss()],
3024
server: {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"build"
1111
],
1212
"exports": {
13+
"types": "./build/index.d.ts",
1314
"import": "./build/refract.es.js",
14-
"require": "./build/refract.cjs.js",
15-
"types": "./build/index.d.ts"
15+
"require": "./build/refract.cjs.js"
1616
},
1717
"publishConfig": {
1818
"access": "public"

0 commit comments

Comments
 (0)