Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: bare config#637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
runyasak wants to merge3 commits intovuejs:mainfromrunyasak:feat/bare-config
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletionsindex.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -140,6 +140,7 @@ async function init() {
needsEslint?: false | 'eslintOnly' | 'speedUpWithOxlint'
needsOxlint?: boolean
needsPrettier?: boolean
bare?: boolean
} = {}

try {
Expand DownExpand Up@@ -300,6 +301,14 @@ async function init() {
active: language.defaultToggleOptions.active,
inactive: language.defaultToggleOptions.inactive,
},
{
name: 'bare',
type: () => (isFeatureFlagsUsed ? null : 'toggle'),
message: language.bare.message,
initial: false,
active: language.defaultToggleOptions.active,
inactive: language.defaultToggleOptions.inactive,
},
],
{
onCancel: () => {
Expand All@@ -324,6 +333,7 @@ async function init() {
needsPinia = argv.pinia,
needsVitest = argv.vitest || argv.tests,
needsPrettier = argv['eslint-with-prettier'],
bare,
} = result

const needsEslint = Boolean(argv.eslint || argv['eslint-with-prettier'] || result.needsEslint)
Expand DownExpand Up@@ -360,7 +370,11 @@ async function init() {
renderTemplate(templateDir, root, callbacks)
}
// Render base template
render('base')
if (bare) {
render('bare-base')
} else {
render('base')
}

// Add configs.
if (needsJsx) {
Expand DownExpand Up@@ -476,8 +490,10 @@ async function init() {
// Render code template.
// prettier-ignore
const codeTemplate =
(needsTypeScript ? 'typescript-' : '') +
(needsRouter ? 'router' : 'default')
bare
? 'bare'
: (needsTypeScript ? 'typescript-' : '') +
(needsRouter ? 'router' : 'default')
render(`code/${codeTemplate}`)

// Render entry file (main.js/ts).
Expand Down
3 changes: 3 additions & 0 deletionslocales/en-US.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,6 +59,9 @@
"needsPrettier": {
"message": "Add Prettier for code formatting?"
},
"bare": {
"message": "Scaffold project without beginner instructions?"
},
"errors": {
"operationCancelled": "Operation cancelled"
},
Expand Down
3 changes: 3 additions & 0 deletionslocales/fr-FR.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,6 +59,9 @@
"needsPrettier": {
"message": "Ajouter Prettier pour le formatage du code\u00a0?"
},
"bare": {
"message": "Scaffold project without beginner instructions?"
},
"errors": {
"operationCancelled": "Operation annulée"
},
Expand Down
3 changes: 3 additions & 0 deletionslocales/tr-TR.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,6 +59,9 @@
"needsPrettier": {
"message": "Kod formatlama için Prettier eklensin mi?"
},
"bare": {
"message": "Scaffold project without beginner instructions?"
},
"errors": {
"operationCancelled": "İşlem iptal edildi"
},
Expand Down
3 changes: 3 additions & 0 deletionslocales/zh-Hans.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,6 +59,9 @@
"needsPrettier": {
"message": "是否引入 Prettier 用于代码格式化?"
},
"bare": {
"message": "Scaffold project without beginner instructions?"
},
"errors": {
"operationCancelled": "操作取消"
},
Expand Down
3 changes: 3 additions & 0 deletionslocales/zh-Hant.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,6 +63,9 @@
"needsPrettier": {
"message": "是否引入 Prettier 用於程式碼格式化?"
},
"bare": {
"message": "Scaffold project without beginner instructions?"
},
"errors": {
"operationCancelled": "操作取消"
},
Expand Down
3 changes: 3 additions & 0 deletionstemplate/bare-base/.vscode/extensions.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
8 changes: 8 additions & 0 deletionstemplate/bare-base/.vscode/settings.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"tsconfig.json": "tsconfig.*.json, env.d.ts",
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig"
}
}
30 changes: 30 additions & 0 deletionstemplate/bare-base/_gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
13 changes: 13 additions & 0 deletionstemplate/bare-base/index.html
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
8 changes: 8 additions & 0 deletionstemplate/bare-base/jsconfig.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": ["node_modules","dist"]
}
17 changes: 17 additions & 0 deletionstemplate/bare-base/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.5.13"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.1",
"vite": "^6.0.3",
"vite-plugin-vue-devtools": "^7.6.7"
}
}
Binary file addedtemplate/bare-base/public/favicon.ico
View file
Open in desktop
Binary file not shown.
1 change: 1 addition & 0 deletionstemplate/bare-base/src/assets/logo.svg
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Empty file.
17 changes: 17 additions & 0 deletionstemplate/bare-base/vite.config.js.data.mjs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
export default function getData() {
return {
plugins: [
{
id: 'vue',
importer: "import vue from '@vitejs/plugin-vue'",
initializer: 'vue()',
},

{
id: 'vite-plugin-vue-devtools',
importer: "import vueDevTools from 'vite-plugin-vue-devtools'",
initializer: 'vueDevTools()',
}
],
}
}
20 changes: 20 additions & 0 deletionstemplate/bare-base/vite.config.js.ejs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
<%_ for (const { importer } of plugins) { _%>
<%- importer %>
<%_ } _%>

// https://vite.dev/config/
export default defineConfig({
plugins: [
<%_ for (const { initializer } of plugins) { _%>
<%- initializer _%>,
<%_ } _%>
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
})
3 changes: 3 additions & 0 deletionstemplate/code/bare/src/App.vue
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
<template>
<p>Hello World!</p>
</template>
1 change: 1 addition & 0 deletionsutils/getLanguage.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,6 +30,7 @@ interface Language {
needsE2eTesting: LanguageItem
needsEslint: LanguageItem
needsPrettier: LanguageItem
bare: LanguageItem
errors: {
operationCancelled: string
}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp