Skip to content

Commit 63ef899

Browse files
authored
Add an index file that reexport everything (#4)
1 parent c2a84e6 commit 63ef899

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"/dist/*.js"
1010
],
1111
"scripts": {
12+
"build_demo": "npm run compile && vite build",
1213
"clean": "rimraf dist/",
1314
"dev": "vite",
14-
"build": "npm run compile && vite build",
1515
"compile": "tsc --build . src/lib src/test src/demo",
1616
"coverage": "vitest run --coverage --typecheck",
1717
"doc": "npm run compile && typedoc && replace-in-files --string '=\"assets/' --replacement '=\"/assets/' docs/404.html",

src/lib/index.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** @license Apache-2.0
2+
*
3+
* Copyright 2024 8 Hobbies, LLC <hong@8hobbies.com>
4+
*
5+
* Licensed under the Apache License, Version 2.0(the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
export * from "./AutoNumericComponent";
19+
export * from "./AutoNumericInput";

src/test/AutoNumericInput.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import { render, screen } from "@testing-library/react";
1919
import AutoNumeric from "autonumeric";
20-
import { AutoNumericInput } from "../lib/AutoNumericInput";
20+
import { AutoNumericInput } from "../lib/index";
2121
import { useState } from "react";
2222
import { userEvent } from "@testing-library/user-event";
2323

0 commit comments

Comments
 (0)