Skip to content

Commit

Permalink
refactor: import from workspace (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
AkaraChen authored Dec 20, 2022
1 parent 85d0466 commit 9754ecc
Show file tree
Hide file tree
Showing 17 changed files with 66 additions and 55 deletions.
2 changes: 1 addition & 1 deletion packages/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "packages/runtime";
export * from "@jwcjs/runtime";
export * from "./src";
6 changes: 2 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@
"esbuild": "^0.16.9",
"rollup": "^3.7.4",
"rollup-plugin-esbuild": "^5.0.0",
"vite": "^4.0.1"
},
"dependencies": {
"vite": "^4.0.1",
"@jwcjs/reactively": "workspace:^1.0.0",
"@jwcjs/runtime": "workspace:^1.0.0",
"shared": "workspace:^1.0.0",
"@jwcjs/shared": "workspace:^1.0.0",
"reflect-metadata": "^0.1.13",
"rollup-plugin-ts": "^3.0.2"
}
Expand Down
1 change: 0 additions & 1 deletion packages/core/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default defineConfig({
plugins: [
nodeResolve(),
typescript({
exclude: "../starter-vite-ts/**",
tsconfig: "../../tsconfig.json",
}),
minify(),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomElementProps } from "shared";
import { CustomElementProps } from "@jwcjs/shared";

export function Component(options: CustomElementProps) {
return function (_class: any) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/event.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineEvent } from "packages/reactively";
import { defineEvent } from "@jwcjs/reactively";

export function Event(event: string): MethodDecorator {
return (target, key, descriptor) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/decorators/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineWatcher } from "packages/reactively";
import { WatcherOptions } from "shared";
import { defineWatcher } from "@jwcjs/reactively";
import { WatcherOptions } from "@jwcjs/shared";

export * from "./props";
export * from "./event";
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/decorators/props.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineProps } from "packages/reactively";
import { PropOptions } from "shared";
import { defineProps } from "@jwcjs/reactively";
import { PropOptions } from "@jwcjs/shared";

export function Prop(options: PropOptions): PropertyDecorator {
return (target, key) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "reflect-metadata";

export * from "./wc-class";
export * from "shared";
export * from "@jwcjs/shared";
export * from "./decorators";
6 changes: 3 additions & 3 deletions packages/core/src/wc-class.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { createCSSElement, defineProxy } from "packages/reactively";
import { createElement, diff, removeAttrs } from "packages/runtime";
import { createCSSElement, defineProxy } from "@jwcjs/reactively";
import { createElement, diff, removeAttrs } from "@jwcjs/runtime";
import {
COMPONENT_PROP_METADATA_KEY,
JwcElement,
PropOptions,
WatcherOptions,
} from "shared";
} from "@jwcjs/shared";

/**
* The map of adoptedStyleSheets.
Expand Down
2 changes: 1 addition & 1 deletion packages/reactively/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"shared": "workspace:*"
"@jwcjs/shared": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/reactively/src/call-reactive.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CustomElementProps } from "jwcjs";
import { CustomElementProps } from "@jwcjs/shared";
import { reactive } from "./reactive";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/reactively/src/define-reactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
WatcherOptions,
COMPONENT_EVENT_METADATA_KEY,
COMPONENT_PROP_METADATA_KEY,
} from "shared";
} from "@jwcjs/shared";
import { ReactiveEvent } from "./call-reactive";

/**
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "shared",
"name": "@jwcjs/shared",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand All @@ -10,6 +10,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@jwcjs/runtime": "workspace:*",
"csstype": "^3.1.1"
}
}
2 changes: 1 addition & 1 deletion packages/shared/src/types/jwc-element.interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { VNode } from "packages/runtime";
import { VNode } from "@jwcjs/runtime";

export interface CustomElementProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/types/local-jsx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Thanks to: DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
// ReactJS <http://facebook.github.io/react/>

import { h } from "packages/runtime";
import { h } from "@jwcjs/runtime";
import * as CSS from "csstype";

type Booleanish = boolean | "true" | "false";
Expand Down
Loading

0 comments on commit 9754ecc

Please sign in to comment.