create-stackit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +194 -0
- package/bin/index.js +64 -0
- package/package.json +43 -0
- package/src/choices.js +63 -0
- package/src/generator.js +133 -0
- package/src/injectors/addons.js +311 -0
- package/src/injectors/structure.js +51 -0
- package/src/pm.js +94 -0
- package/src/prompts.js +179 -0
- package/src/utils.js +18 -0
- package/templates/next-js-redux-mui/README.md +15 -0
- package/templates/next-js-redux-mui/app/layout.jsx +12 -0
- package/templates/next-js-redux-mui/app/page.jsx +15 -0
- package/templates/next-js-redux-mui/app/providers.jsx +16 -0
- package/templates/next-js-redux-mui/package.json +22 -0
- package/templates/next-js-redux-mui/src/store/counterSlice.js +13 -0
- package/templates/next-js-redux-mui/src/store/store.js +8 -0
- package/templates/next-js-redux-mui/src/theme.js +9 -0
- package/templates/next-js-redux-shadcn/README.md +15 -0
- package/templates/next-js-redux-shadcn/app/globals.css +3 -0
- package/templates/next-js-redux-shadcn/app/layout.jsx +13 -0
- package/templates/next-js-redux-shadcn/app/page.jsx +15 -0
- package/templates/next-js-redux-shadcn/app/providers.jsx +11 -0
- package/templates/next-js-redux-shadcn/package.json +23 -0
- package/templates/next-js-redux-shadcn/src/store/counterSlice.js +13 -0
- package/templates/next-js-redux-shadcn/src/store/store.js +8 -0
- package/templates/next-js-zustand-mui/README.md +15 -0
- package/templates/next-js-zustand-mui/app/layout.jsx +16 -0
- package/templates/next-js-zustand-mui/app/page.jsx +18 -0
- package/templates/next-js-zustand-mui/package.json +21 -0
- package/templates/next-js-zustand-mui/src/theme.js +9 -0
- package/templates/next-js-zustand-shadcn/README.md +15 -0
- package/templates/next-js-zustand-shadcn/app/globals.css +3 -0
- package/templates/next-js-zustand-shadcn/app/layout.jsx +10 -0
- package/templates/next-js-zustand-shadcn/app/page.jsx +18 -0
- package/templates/next-js-zustand-shadcn/package.json +22 -0
- package/templates/next-ts-redux-mui/README.md +15 -0
- package/templates/next-ts-redux-mui/app/layout.tsx +14 -0
- package/templates/next-ts-redux-mui/app/page.tsx +15 -0
- package/templates/next-ts-redux-mui/app/providers.tsx +16 -0
- package/templates/next-ts-redux-mui/package.json +27 -0
- package/templates/next-ts-redux-mui/src/store/counterSlice.ts +16 -0
- package/templates/next-ts-redux-mui/src/store/store.ts +11 -0
- package/templates/next-ts-redux-mui/src/theme.ts +9 -0
- package/templates/next-ts-redux-shadcn/README.md +15 -0
- package/templates/next-ts-redux-shadcn/app/globals.css +3 -0
- package/templates/next-ts-redux-shadcn/app/layout.tsx +15 -0
- package/templates/next-ts-redux-shadcn/app/page.tsx +15 -0
- package/templates/next-ts-redux-shadcn/app/providers.tsx +11 -0
- package/templates/next-ts-redux-shadcn/package.json +27 -0
- package/templates/next-ts-redux-shadcn/src/store/counterSlice.ts +16 -0
- package/templates/next-ts-redux-shadcn/src/store/store.ts +11 -0
- package/templates/next-ts-zustand-mui/README.md +15 -0
- package/templates/next-ts-zustand-mui/app/layout.tsx +18 -0
- package/templates/next-ts-zustand-mui/app/page.tsx +18 -0
- package/templates/next-ts-zustand-mui/package.json +26 -0
- package/templates/next-ts-zustand-mui/src/theme.ts +9 -0
- package/templates/next-ts-zustand-shadcn/README.md +15 -0
- package/templates/next-ts-zustand-shadcn/app/globals.css +3 -0
- package/templates/next-ts-zustand-shadcn/app/layout.tsx +12 -0
- package/templates/next-ts-zustand-shadcn/app/page.tsx +18 -0
- package/templates/next-ts-zustand-shadcn/package.json +26 -0
- package/templates/vite-js-redux-mui/README.md +15 -0
- package/templates/vite-js-redux-mui/package.json +24 -0
- package/templates/vite-js-redux-mui/src/App.jsx +14 -0
- package/templates/vite-js-redux-mui/src/main.jsx +18 -0
- package/templates/vite-js-redux-mui/src/store/counterSlice.js +13 -0
- package/templates/vite-js-redux-mui/src/store/store.js +8 -0
- package/templates/vite-js-redux-mui/src/theme.js +9 -0
- package/templates/vite-js-redux-shadcn/README.md +15 -0
- package/templates/vite-js-redux-shadcn/package.json +24 -0
- package/templates/vite-js-redux-shadcn/src/App.jsx +14 -0
- package/templates/vite-js-redux-shadcn/src/index.css +3 -0
- package/templates/vite-js-redux-shadcn/src/main.jsx +14 -0
- package/templates/vite-js-redux-shadcn/src/store/counterSlice.js +13 -0
- package/templates/vite-js-redux-shadcn/src/store/store.js +8 -0
- package/templates/vite-js-zustand-mui/README.md +15 -0
- package/templates/vite-js-zustand-mui/package.json +23 -0
- package/templates/vite-js-zustand-mui/src/App.jsx +17 -0
- package/templates/vite-js-zustand-mui/src/main.jsx +14 -0
- package/templates/vite-js-zustand-mui/src/theme.js +9 -0
- package/templates/vite-js-zustand-shadcn/README.md +15 -0
- package/templates/vite-js-zustand-shadcn/package.json +23 -0
- package/templates/vite-js-zustand-shadcn/src/App.jsx +17 -0
- package/templates/vite-js-zustand-shadcn/src/index.css +3 -0
- package/templates/vite-js-zustand-shadcn/src/main.jsx +10 -0
- package/templates/vite-ts-redux-mui/README.md +15 -0
- package/templates/vite-ts-redux-mui/package.json +27 -0
- package/templates/vite-ts-redux-mui/src/App.tsx +14 -0
- package/templates/vite-ts-redux-mui/src/main.tsx +18 -0
- package/templates/vite-ts-redux-mui/src/store/counterSlice.ts +16 -0
- package/templates/vite-ts-redux-mui/src/store/store.ts +11 -0
- package/templates/vite-ts-redux-mui/src/theme.ts +9 -0
- package/templates/vite-ts-redux-shadcn/README.md +15 -0
- package/templates/vite-ts-redux-shadcn/package.json +27 -0
- package/templates/vite-ts-redux-shadcn/src/App.tsx +14 -0
- package/templates/vite-ts-redux-shadcn/src/index.css +3 -0
- package/templates/vite-ts-redux-shadcn/src/main.tsx +14 -0
- package/templates/vite-ts-redux-shadcn/src/store/counterSlice.ts +16 -0
- package/templates/vite-ts-redux-shadcn/src/store/store.ts +11 -0
- package/templates/vite-ts-zustand-mui/README.md +15 -0
- package/templates/vite-ts-zustand-mui/package.json +26 -0
- package/templates/vite-ts-zustand-mui/src/App.tsx +17 -0
- package/templates/vite-ts-zustand-mui/src/main.tsx +14 -0
- package/templates/vite-ts-zustand-mui/src/theme.ts +9 -0
- package/templates/vite-ts-zustand-shadcn/README.md +15 -0
- package/templates/vite-ts-zustand-shadcn/package.json +23 -0
- package/templates/vite-ts-zustand-shadcn/src/main.tsx +2 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stackit-template",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "^18.3.1",
|
|
13
|
+
"react-dom": "^18.3.1",
|
|
14
|
+
"@reduxjs/toolkit": "^2.3.0",
|
|
15
|
+
"react-redux": "^9.1.2"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
19
|
+
"vite": "^5.4.8",
|
|
20
|
+
"@types/react": "^18.3.10",
|
|
21
|
+
"@types/react-dom": "^18.3.0",
|
|
22
|
+
"typescript": "^5.6.2",
|
|
23
|
+
"tailwindcss": "^3.4.14",
|
|
24
|
+
"postcss": "^8.4.47",
|
|
25
|
+
"autoprefixer": "^10.4.20"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useDispatch, useSelector } from 'react-redux'
|
|
2
|
+
import { increment } from './store/counterSlice'
|
|
3
|
+
|
|
4
|
+
export default function App() {
|
|
5
|
+
const count = useSelector((state) => state.counter.value)
|
|
6
|
+
const dispatch = useDispatch()
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
<h1>create-stackit</h1>
|
|
10
|
+
<p>Count: {count}</p>
|
|
11
|
+
<button onClick={() => dispatch(increment())}>Increment</button>
|
|
12
|
+
</div>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import ReactDOM from 'react-dom/client'
|
|
3
|
+
import { Provider } from 'react-redux'
|
|
4
|
+
import { store } from './store/store
|
|
5
|
+
import './index.css'
|
|
6
|
+
import App from './App'
|
|
7
|
+
|
|
8
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
9
|
+
<React.StrictMode>
|
|
10
|
+
<Provider store={store}>
|
|
11
|
+
<App />
|
|
12
|
+
</Provider>
|
|
13
|
+
</React.StrictMode>,
|
|
14
|
+
)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createSlice } from '@reduxjs/toolkit'
|
|
2
|
+
|
|
3
|
+
interface CounterState { value: number }
|
|
4
|
+
const initialState: CounterState = { value: 0 }
|
|
5
|
+
|
|
6
|
+
export const counterSlice = createSlice({
|
|
7
|
+
name: 'counter',
|
|
8
|
+
initialState,
|
|
9
|
+
reducers: {
|
|
10
|
+
increment: (state) => { state.value += 1 },
|
|
11
|
+
decrement: (state) => { state.value -= 1 },
|
|
12
|
+
},
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
export const { increment, decrement } = counterSlice.actions
|
|
16
|
+
export default counterSlice.reducer
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { configureStore } from '@reduxjs/toolkit'
|
|
2
|
+
import counterReducer from './counterSlice'
|
|
3
|
+
|
|
4
|
+
export const store = configureStore({
|
|
5
|
+
reducer: {
|
|
6
|
+
counter: counterReducer,
|
|
7
|
+
},
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
export type RootState = ReturnType<typeof store.getState>
|
|
11
|
+
export type AppDispatch = typeof store.dispatch
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Generated with [create-stackit](https://github.com/your-handle/create-stackit).
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
- Vite + React + TypeScript
|
|
7
|
+
- Zustand
|
|
8
|
+
- Material UI
|
|
9
|
+
|
|
10
|
+
## Scripts
|
|
11
|
+
```bash
|
|
12
|
+
npm run dev # start dev server
|
|
13
|
+
npm run build # production build
|
|
14
|
+
npm run preview # preview build
|
|
15
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stackit-template",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "^18.3.1",
|
|
13
|
+
"react-dom": "^18.3.1",
|
|
14
|
+
"zustand": "^5.0.0",
|
|
15
|
+
"@mui/material": "^6.1.6",
|
|
16
|
+
"@emotion/react": "^11.13.3",
|
|
17
|
+
"@emotion/styled": "^11.13.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
21
|
+
"vite": "^5.4.8",
|
|
22
|
+
"@types/react": "^18.3.10",
|
|
23
|
+
"@types/react-dom": "^18.3.0",
|
|
24
|
+
"typescript": "^5.6.2"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { create } from 'zustand'
|
|
2
|
+
|
|
3
|
+
const useStore = create((set) => ({
|
|
4
|
+
count: 0,
|
|
5
|
+
increment: () => set((s) => ({ count: s.count + 1 })),
|
|
6
|
+
}))
|
|
7
|
+
|
|
8
|
+
export default function App() {
|
|
9
|
+
const { count, increment } = useStore()
|
|
10
|
+
return (
|
|
11
|
+
<div>
|
|
12
|
+
<h1>create-stackit</h1>
|
|
13
|
+
<p>Count: {count}</p>
|
|
14
|
+
<button onClick={increment}>Increment</button>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import ReactDOM from 'react-dom/client'
|
|
3
|
+
import { ThemeProvider, CssBaseline } from '@mui/material'
|
|
4
|
+
import { theme } from './theme
|
|
5
|
+
import App from './App'
|
|
6
|
+
|
|
7
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
8
|
+
<React.StrictMode>
|
|
9
|
+
<ThemeProvider theme={theme}>
|
|
10
|
+
<CssBaseline />
|
|
11
|
+
<App />
|
|
12
|
+
</ThemeProvider>
|
|
13
|
+
</React.StrictMode>,
|
|
14
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Generated with [create-stackit](https://github.com/your-handle/create-stackit).
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
- Vite + React + TypeScript
|
|
7
|
+
- Zustand
|
|
8
|
+
- Tailwind + shadcn/ui
|
|
9
|
+
|
|
10
|
+
## Scripts
|
|
11
|
+
```bash
|
|
12
|
+
npm run dev # start dev server
|
|
13
|
+
npm run build # production build
|
|
14
|
+
npm run preview # preview build
|
|
15
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stackit-template",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "^18.3.1",
|
|
13
|
+
"react-dom": "^18.3.1",
|
|
14
|
+
"zustand": "^5.0.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/react": "^18.3.10",
|
|
18
|
+
"@types/react-dom": "^18.3.0",
|
|
19
|
+
"@vitejs/plugin-react": "^4.3.2",
|
|
20
|
+
"typescript": "^5.6.2",
|
|
21
|
+
"vite": "^5.4.8"
|
|
22
|
+
}
|
|
23
|
+
}
|