1.0.7 ā€¢ Published 2 years ago

runafe-threejs v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

README

Features

It is recommended to use jsx to develop components, If you want to develop with .vue

do change with pacckage.json:

"scripts": {
-  "prepublishOnly": "npm run build",
+  "prepublishOnly": "npm run build:vite",
},
  • šŸ’» Vue suport >=3.2.0
  • āœˆļø Project init with vite
  • šŸ“¦ Support cjs & esm
  • šŸ›Ž you can write componet with .vue or .tsx

how to use

replace runafe-threejs with your package name

Directory structure

Project
ā”œā”€ā”€ __tests__           # Unit Testing
ā”œā”€ā”€ babel.config.js     # babel config
ā”œā”€ā”€ package.json
ā”œā”€ā”€ playground          # dev environment folder (can use source code)
ā”‚   ā”œā”€ā”€ index.html
ā”‚   ā”œā”€ā”€ package.json
ā”‚   ā”œā”€ā”€ public
ā”‚   ā”œā”€ā”€ src
ā”‚   ā”œā”€ā”€ tsconfig.json
ā”‚   ā”œā”€ā”€ vite-env.d.ts
ā”‚   ā””ā”€ā”€ vite.config.ts
ā”œā”€ā”€ postcss.config.js  # build styles with postcss
ā”œā”€ā”€ global.d.ts # global componet type declaration (TIPS: Manual maintenance is required)
ā”œā”€ā”€ src                # Package source code
ā”‚   ā”œā”€ā”€ index.ts       # Package source entry
ā”‚   ā”œā”€ā”€ stories        # storybook for building UI components and pages
ā”‚   ā”œā”€ā”€ styles         # styles for Package
ā”‚   ā””ā”€ā”€ types.ts       # ts type declaration for Package
ā”œā”€ā”€ tsconfig.json      # ts config
ā””ā”€ā”€ tsup.config.ts     # build package with tsup

Register Components Globally

// main.ts
import InstallPlugin from 'runafe-threejs';

app.use(InstallPlugin());
// tsconfig.json
{
  "compilerOptions": {
    "types": [
      "runafe-threejs/global"
    ]
  }
}

runa-threejs

1.0.7

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago