Giter VIP home page Giter VIP logo

Comments (2)

Tao-VanJS avatar Tao-VanJS commented on July 30, 2024 2

I tried to publish Mini-Van to JSR. It seems that there isn't an easy way to do that. This is the error message that I got:

Check file:///Users/xintao/org/mini-van/src/mini-van.js
Check file:///Users/xintao/org/mini-van/src/van-plate.js
Check file:///Users/xintao/org/mini-van/src/shared.js
error: TS2304 [ERROR]: Cannot find name 'Element'.
type BrowserTags = Tags<Element, Text> & {
                        ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:46:25

TS2304 [ERROR]: Cannot find name 'Text'.
type BrowserTags = Tags<Element, Text> & {
                                 ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:46:34

TS2304 [ERROR]: Cannot find name 'HTMLElementTagNameMap'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
              ~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:15

TS2304 [ERROR]: Cannot find name 'Element'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
                                              ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:47

TS2304 [ERROR]: Cannot find name 'Text'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
                                                       ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:56

TS2304 [ERROR]: Cannot find name 'HTMLElementTagNameMap'.
  [K in keyof HTMLElementTagNameMap]: TagFunc<Element, Text, HTMLElementTagNameMap[K]>
                                                             ~~~~~~~~~~~~~~~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:47:62

TS2304 [ERROR]: Cannot find name 'Element'.
export interface Van extends VanObj<Element, Text> {
                                    ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:64:37

TS2304 [ERROR]: Cannot find name 'Text'.
export interface Van extends VanObj<Element, Text> {
                                             ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:64:46

TS2304 [ERROR]: Cannot find name 'Element'.
  readonly tags: BrowserTags & ((namespaceURI: string) => Tags<Element, Text>)
                                                               ~~~~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:69:64

TS2304 [ERROR]: Cannot find name 'Text'.
  readonly tags: BrowserTags & ((namespaceURI: string) => Tags<Element, Text>)
                                                                        ~~~~
    at file:///Users/xintao/org/mini-van/src/mini-van.d.ts:69:73

Found 10 errors.

It looks like DOM types can't be used for packages published to JSR.

I love Deno, but to be honest I'm not really a big fan of keeping reinventing the wheel for marginal improvement.

I will revert the partial changes that I made. I can revisit the issue if an easy way to publish to JSR is discovered.

I know there is a good reason for the current names mini-van-plate/van-plate and mini-van-plate however the names above could be more explanatory?

I didn't think too much while picking the name for NPM. I chose the name because this is the one that was available for me to use at that time. Later packages published to NPM follow the convention of vanjs-* because names like that are always available to use. Once packages are published their names are really hard to change.

from van.

sant123 avatar sant123 commented on July 30, 2024

For naming it could be:

  • @vanjs/core -> Client-Side
  • @vanjs/core-lite -> Client-Side without state and no Document
  • @vanjs/ssr -> Server-Side

I know there is a good reason for the current names mini-van-plate/van-plate and mini-van-plate however the names above could be more explanatory?

from van.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.