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: generate start and test npm scripts#387

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

Open
szgabsz91 wants to merge1 commit intovuejs:main
base:main
Choose a base branch
Loading
fromszgabsz91:feature/303-generate-start-and-test-npm-scripts
Open
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
18 changes: 9 additions & 9 deletionsindex.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -372,24 +372,24 @@ async function init() {
if (needsPinia) {
render('config/pinia')
}
if (needsVitest) {
render('config/vitest')
}
if (needsCypress) {
render('config/cypress')
}
if (needsCypressCT) {
render('config/cypress-ct')
}
if (needsNightwatch) {
render('config/nightwatch')
}
if (needsNightwatchCT) {
render('config/nightwatch-ct')
}
if (needsPlaywright) {
render('config/playwright')
}
if (needsVitest) {
render('config/vitest')
}
if (needsCypressCT) {
render('config/cypress-ct')
}
if (needsNightwatchCT) {
render('config/nightwatch-ct')
}
if (needsTypeScript) {
render('config/typescript')

Expand Down
1 change: 1 addition & 0 deletionstemplate/base/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"start": "npm run dev",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Here you may be able to dynamically obtain the corresponding script commands generated by the package manager.

create-vue/index.ts

Lines 569 to 576 in9a4dd95

constuserAgent=process.env.npm_config_user_agent??''
constpackageManager=/pnpm/.test(userAgent)
?'pnpm'
:/yarn/.test(userAgent)
?'yarn'
:/bun/.test(userAgent)
?'bun'
:'npm'

"build": "vite build",
"preview": "vite preview"
},
Expand Down
3 changes: 2 additions & 1 deletiontemplate/config/cypress-ct/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
{
"scripts": {
"test:unit": "cypress run --component",
"test:unit:dev": "cypress open --component"
"test:unit:dev": "cypress open --component",
"test": "npm run test:unit"
},
"dependencies": {
"vue": "^3.4.27"
Expand Down
3 changes: 2 additions & 1 deletiontemplate/config/cypress/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
{
"scripts": {
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'"
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
"test": "npm run test:e2e"
},
"devDependencies": {
"cypress": "^13.10.0",
Expand Down
3 changes: 2 additions & 1 deletiontemplate/config/nightwatch-ct/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"test:unit": "nightwatch src/**/__tests__/*"
"test:unit": "nightwatch src/**/__tests__/*",
"test": "npm run test:unit"
},
"dependencies": {
"vue": "^3.4.27"
Expand Down
3 changes: 2 additions & 1 deletiontemplate/config/nightwatch/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"test:e2e": "nightwatch tests/e2e/*"
"test:e2e": "nightwatch tests/e2e/*",
"test": "npm run test:e2e"
},
"devDependencies": {
"nightwatch": "^3.6.3",
Expand Down
3 changes: 2 additions & 1 deletiontemplate/config/playwright/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"test:e2e": "playwright test"
"test:e2e": "playwright test",
"test": "npm run test:e2e"
},
"devDependencies": {
"@playwright/test": "^1.44.1"
Expand Down
3 changes: 2 additions & 1 deletiontemplate/config/vitest/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"test:unit": "vitest"
"test:unit": "vitest",
"test": "npm run test:unit"
},
"dependencies": {
"vue": "^3.4.27"
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp