1.0.7 ā¢ Published 2 years ago
runafe-threejs v1.0.7
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
- šŖ Github Actions support (Auto CI on pull_request / Auto Release on push tag / Auto Deploy on push & pull_request)
- š Build npm package with tsup
š Built-in Vue3 dev environment
playground folder
start -->
npm run dev
š Use browserslistrc
- šŖ Build styles with postcss (postcss-nested/ autoprefixer / cssnano)
- š Stylelint that helps you avoid errors and enforce conventions in your styles.
- š Mono repo with npm
- š TypeScript, of course
- š Unit Testing with Vitest
- š Storybook for building UI components and pages
- š§ ESLint statically analyzes your code to quickly find problems.
- ā Husky & lint-staged
- ā Commitlint that helps your team adhering to a commit convention
- šø Deploy Storybook on Netlify ---> config
- š„³ MIT License
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"
]
}
}