https://github.com/bebasebuild/basebuild
basebuild is the core project to build your own dev ecosystem. Write once, use everywhere at once! ;)
https://github.com/bebasebuild/basebuild
agnostic build build-tool vite vitejs vitest
Last synced: 7 months ago
JSON representation
basebuild is the core project to build your own dev ecosystem. Write once, use everywhere at once! ;)
- Host: GitHub
- URL: https://github.com/bebasebuild/basebuild
- Owner: bebasebuild
- License: mit
- Created: 2016-04-16T21:20:57.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T23:10:36.000Z (about 1 year ago)
- Last Synced: 2024-10-03T09:28:55.837Z (about 1 year ago)
- Topics: agnostic, build, build-tool, vite, vitejs, vitest
- Language: TypeScript
- Homepage:
- Size: 1.95 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

basebuild is the core project to build your own dev ecosystem.
Write once, use everywhere at once! ;)
# 📦 WHAT
> Centralizing all development environment and all build flux of multiple projects at once.We're moving to a new approach, now we can create multiple ecosystems in the agnostic way.
basebuild will have strategies to different ecosystems and for now we're starting on Vite's context.> It makes your vite config reusable between your projects.
# 🧐 WHY
> Now you can create your own project's ecosystem based on your favorite module bundler settings.📚 More details about the concept
Now we can move to the future on the fly. On the past road, we've past through Gulp's scripts as main resource to create a dev server and build system replicable, but module bundlers have been created and emerged in a surprising and dominant way as the most powerful frontend tool to evolve the present using future core features by loaders, plugins and etc.
So, we cannot guess how the future will be like, but we can be resilient with it. The basebuild's core module now have the mission to adapt configurations to different ecosystems of module bundlers in the recursive way and by different layers.
![]()
So this way you can create your own project's ecosystem based on your favorite module bundler settings.
This means that you can create a node package centralizing all development environment and all build flux of multiple projects
Some direct basebuildfieds projects will be created for open source community on Vite's ecosystem:
- basebuild-web-extensions: Focus to develop browsers extensions (Mainly Chrome Extensions)
- basebuild-angular: Full rewrite of old package to Vite's system and Angular's apps development.
- basebuild-vue: Focus to develop Vue.js apps
This is limitless, so let's see what the community can do.
# Usage
## Vite's Ecosystem Example
`To only aggregate config objects or config functions`
```typescript
import basebuild from '@bebasebuild/basebuild'
import { UserConfigFnObject } from 'vite'
basebuild({
configSystem: 'vite',
configs: [
configFunction1,
configFunction2,
configFunction3,
]
})
```
### Other Cases
To create a basebuild child project like '@bebasebuild/basebuild-vue'
```typescript
import basebuild from '@bebasebuild/basebuild'
import vue from '@vitejs/plugin-vue'
import { UserConfigFnObject } from 'vite'
export const basebuildVue = (userConfigFn) => {
const bbVueConfigFn = ({ command, basebuild }) => {
return {
plugins: [
...basebuild.defaults.plugins, // rollup-plugin-copy plugin
vue()
]
}
}
return basebuild({
configSystem: 'vite',
configs: [
bbVueConfigFn,
userConfigFn
]
})
}
```
To use the basebuild child project in vite.config.ts of any other projects
```typescript
import basebuildVue from '@bebasebuild/basebuild-vue'
import { splitVendorChunkPlugin } from 'vite'
export default basebuildVue(({ command, basebuild }) => {
return {
plugins: [
...basebuild.defaults.plugins,
splitVendorChunkPlugin()
] // now it should be [rollup-plugin-copy, vite-plugin-vue, vite-plugin-split-vendor-chunk]
}
})
```