create-minista-tailwind 1.0.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/bin/index.js +33 -0
- package/package.json +26 -0
- package/template/jsconfig.json +7 -0
- package/template/minista.config.js +134 -0
- package/template/package-lock.json +7658 -0
- package/template/package.json +24 -0
- package/template/postcss.config.js +5 -0
- package/template/public/icons/hurricane-alt-svgrepo-com.svg +4 -0
- package/template/public/images/hurricane-alt-svgrepo-com.svg +4 -0
- package/template/src/api/base.api.js +1 -0
- package/template/src/assets/favicons/hurricane-alt-svgrepo-com.svg +4 -0
- package/template/src/assets/fonts/hurricane-alt-svgrepo-com.svg +4 -0
- package/template/src/assets/icons/hurricane-alt-svgrepo-com.svg +4 -0
- package/template/src/assets/images/hurricane-alt-svgrepo-com.svg +4 -0
- package/template/src/components/Button/Button.css +0 -0
- package/template/src/components/Button/Button.jsx +11 -0
- package/template/src/components/Button/constants.js +4 -0
- package/template/src/components/Button/index.js +3 -0
- package/template/src/components/Logo/Logo.css +0 -0
- package/template/src/components/Logo/Logo.jsx +15 -0
- package/template/src/components/Logo/index.js +3 -0
- package/template/src/constants/htmlElements.js +1 -0
- package/template/src/constants/routes.js +3 -0
- package/template/src/global.jsx +20 -0
- package/template/src/layouts/Content/Content.css +0 -0
- package/template/src/layouts/Content/Content.jsx +9 -0
- package/template/src/layouts/Content/index.js +3 -0
- package/template/src/layouts/Footer/Footer.css +0 -0
- package/template/src/layouts/Footer/Footer.jsx +9 -0
- package/template/src/layouts/Footer/index.js +3 -0
- package/template/src/layouts/Header/Header.css +0 -0
- package/template/src/layouts/Header/Header.jsx +9 -0
- package/template/src/layouts/Header/index.js +3 -0
- package/template/src/layouts/Section/Section.css +0 -0
- package/template/src/layouts/Section/Section.jsx +9 -0
- package/template/src/layouts/Section/index.js +3 -0
- package/template/src/main.js +3 -0
- package/template/src/modules/Tabs.js +5 -0
- package/template/src/pages/404.jsx +0 -0
- package/template/src/pages/index.jsx +11 -0
- package/template/src/sections/About/About.css +0 -0
- package/template/src/sections/About/About.jsx +10 -0
- package/template/src/sections/About/index.js +3 -0
- package/template/src/sections/Hero/Hero.css +0 -0
- package/template/src/sections/Hero/Hero.jsx +9 -0
- package/template/src/sections/Hero/index.js +3 -0
- package/template/src/services/getUser.js +15 -0
- package/template/src/styles/fonts.css +0 -0
- package/template/src/styles/index.js +1 -0
- package/template/src/styles/normalize.css +210 -0
- package/template/src/styles/style.css +3 -0
- package/template/src/utils/render.js +3 -0
package/bin/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'fs'
|
|
4
|
+
import path from 'path'
|
|
5
|
+
import { fileURLToPath } from 'url'
|
|
6
|
+
import { execSync } from 'child_process'
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
9
|
+
const __dirname = path.dirname(__filename)
|
|
10
|
+
|
|
11
|
+
const projectName = process.argv[2] || 'my-app'
|
|
12
|
+
const targetDir = path.resolve(process.cwd(), projectName)
|
|
13
|
+
const templateDir = path.resolve(__dirname, '../template')
|
|
14
|
+
|
|
15
|
+
if (fs.existsSync(targetDir)) {
|
|
16
|
+
console.error(`❌ Папка "${projectName}" уже существует`)
|
|
17
|
+
process.exit(1)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
console.log(`📁 Создаю проект "${projectName}"...`)
|
|
21
|
+
|
|
22
|
+
// Копируем рекурсивно всё содержимое template
|
|
23
|
+
fs.cpSync(templateDir, targetDir, { recursive: true })
|
|
24
|
+
|
|
25
|
+
console.log('📦 Копирование завершено')
|
|
26
|
+
|
|
27
|
+
// Установка зависимостей пользователя
|
|
28
|
+
console.log('⚡ Устанавливаю зависимости...')
|
|
29
|
+
execSync('npm install', { cwd: targetDir, stdio: 'inherit' })
|
|
30
|
+
|
|
31
|
+
console.log('✅ Проект создан!')
|
|
32
|
+
console.log(`👉 cd ${projectName}`)
|
|
33
|
+
console.log('👉 npm run dev')
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-minista-tailwind",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"homepage": "https://github.com/tals789/my-start-template-minista-jsx-with-tailwind#readme",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/tals789/my-start-template-minista-jsx-with-tailwind/issues"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/tals789/my-start-template-minista-jsx-with-tailwind.git"
|
|
14
|
+
},
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"author": "Semyon Talantsev (Me)",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "minista.config.js",
|
|
19
|
+
"bin": {
|
|
20
|
+
"create-minista-tailwind": "./bin/index.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin",
|
|
24
|
+
"template"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { defineConfig } from "minista"
|
|
2
|
+
import path from 'path'
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
root: "",
|
|
6
|
+
base: "/",
|
|
7
|
+
public: "public",
|
|
8
|
+
out: "dist",
|
|
9
|
+
assets: {
|
|
10
|
+
outDir: "assets",
|
|
11
|
+
outName: "[name]",
|
|
12
|
+
images: {
|
|
13
|
+
outDir: "assets/images",
|
|
14
|
+
outName: "[name]",
|
|
15
|
+
remoteName: "remote",
|
|
16
|
+
optimize: {
|
|
17
|
+
layout: "constrained",
|
|
18
|
+
breakpoints: [
|
|
19
|
+
320, 400, 640, 800, 1024, 1280, 1440, 1920, 2560, 2880, 3840,
|
|
20
|
+
],
|
|
21
|
+
resolution: [1, 2],
|
|
22
|
+
format: ["avif", "webp", "inherit"],
|
|
23
|
+
formatOptions: {},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
svgr: {
|
|
27
|
+
svgrOptions: {},
|
|
28
|
+
},
|
|
29
|
+
icons: {
|
|
30
|
+
srcDir: "src/assets/icons",
|
|
31
|
+
outDir: "assets/images",
|
|
32
|
+
outName: "[dirname]",
|
|
33
|
+
svgstoreOptions: {
|
|
34
|
+
cleanSymbols: ["fill", "stroke", "stroke-linejoin", "stroke-width"],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
fonts: {
|
|
38
|
+
outDir: "assets/fonts",
|
|
39
|
+
outName: "[name]",
|
|
40
|
+
},
|
|
41
|
+
bundle: {
|
|
42
|
+
outName: "bundle",
|
|
43
|
+
},
|
|
44
|
+
partial: {
|
|
45
|
+
usePreact: false,
|
|
46
|
+
useIntersectionObserver: true,
|
|
47
|
+
outName: "hydrate",
|
|
48
|
+
rootAttrSuffix: "partial-hydration",
|
|
49
|
+
rootValuePrefix: "ph",
|
|
50
|
+
rootDOMElement: "div",
|
|
51
|
+
rootStyle: { display: "contents" },
|
|
52
|
+
intersectionObserverOptions: {
|
|
53
|
+
root: null,
|
|
54
|
+
rootMargin: "0px",
|
|
55
|
+
thresholds: [0],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
resolve: {
|
|
60
|
+
alias: [
|
|
61
|
+
{
|
|
62
|
+
find: '@',
|
|
63
|
+
replacement: path.resolve('src')
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
css: {
|
|
68
|
+
modules: {
|
|
69
|
+
scopeBehaviour: "local",
|
|
70
|
+
globalModulePaths: [],
|
|
71
|
+
generateScopedName: undefined,
|
|
72
|
+
hashPrefix: "",
|
|
73
|
+
localsConvention: "camelCaseOnly",
|
|
74
|
+
},
|
|
75
|
+
preprocessorOptions: {
|
|
76
|
+
scss: {},
|
|
77
|
+
less: {},
|
|
78
|
+
stylus: {},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
markdown: {
|
|
82
|
+
useRemarkGfm: true,
|
|
83
|
+
useRehypeHighlight: true,
|
|
84
|
+
remarkGfmOptions: {},
|
|
85
|
+
rehypeHighlightOptions: {},
|
|
86
|
+
mdxOptions: {
|
|
87
|
+
remarkPlugins: [],
|
|
88
|
+
rehypePlugins: [],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
search: {
|
|
92
|
+
outDir: "assets",
|
|
93
|
+
outName: "search",
|
|
94
|
+
include: ["**/*"],
|
|
95
|
+
exclude: ["/404"],
|
|
96
|
+
baseUrl: "",
|
|
97
|
+
trimTitle: "",
|
|
98
|
+
targetSelector: "[data-search]",
|
|
99
|
+
hit: {
|
|
100
|
+
minLength: 3,
|
|
101
|
+
number: false,
|
|
102
|
+
english: true,
|
|
103
|
+
hiragana: false,
|
|
104
|
+
katakana: true,
|
|
105
|
+
kanji: true,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
delivery: {
|
|
109
|
+
include: ["**/*"],
|
|
110
|
+
exclude: ["/404"],
|
|
111
|
+
trimTitle: "",
|
|
112
|
+
sortBy: "path",
|
|
113
|
+
archives: [],
|
|
114
|
+
},
|
|
115
|
+
beautify: {
|
|
116
|
+
useHtml: true,
|
|
117
|
+
useAssets: false,
|
|
118
|
+
htmlOptions: {
|
|
119
|
+
indent_size: 2,
|
|
120
|
+
max_preserve_newlines: 0,
|
|
121
|
+
indent_inner_html: true,
|
|
122
|
+
extra_liners: [],
|
|
123
|
+
inline: ["span", "strong", "b", "small", "del", "s", "code", "br", "wbr"],
|
|
124
|
+
},
|
|
125
|
+
cssOptions: {
|
|
126
|
+
indent_size: 2,
|
|
127
|
+
space_around_combinator: true,
|
|
128
|
+
},
|
|
129
|
+
jsOptions: {
|
|
130
|
+
indent_size: 2,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
vite: {},
|
|
134
|
+
})
|