Skip to content

Commit 21fbfec

Browse files
committed
2.0.0
1 parent 718bef6 commit 21fbfec

File tree

3 files changed

+18
-40
lines changed

3 files changed

+18
-40
lines changed

.github/workflows/CI.yaml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
20-
node: ["16"]
20+
node: ["24"]
2121
name: install - ${{ matrix.os }} - ${{ matrix.node }}
2222
runs-on: ${{ matrix.os }}
2323
steps:
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
node-version: ${{ matrix.node }}
2929
- name: restore lerna
30-
uses: actions/cache@v2
30+
uses: actions/cache@v4
3131
with:
3232
path: |
3333
node_modules
@@ -38,35 +38,13 @@ jobs:
3838
- name: Install dependencies
3939
run: |
4040
yarn
41-
42-
lint:
43-
needs: install
44-
strategy:
45-
matrix:
46-
os: [ubuntu-latest, macos-latest, windows-latest]
47-
node: ["16"]
48-
name: lint - ${{ matrix.os }} - ${{ matrix.node }}
49-
runs-on: ${{ matrix.os }}
50-
steps:
51-
- uses: actions/checkout@v2
52-
- name: Use Node.js
53-
uses: actions/setup-node@v1
54-
with:
55-
node-version: ${{ matrix.node }}
56-
- name: Load node_modules
57-
uses: actions/cache@v2
58-
with:
59-
path: |
60-
node_modules
61-
*/*/node_modules
62-
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
63-
- run: yarn lint
41+
6442
build:
65-
needs: [lint]
43+
needs: [install]
6644
strategy:
6745
matrix:
6846
os: [ubuntu-latest, macos-latest, windows-latest]
69-
node: ["16"]
47+
node: ["24"]
7048
name: build - ${{ matrix.os }} - ${{ matrix.node }}
7149
runs-on: ${{ matrix.os }}
7250
steps:
@@ -76,7 +54,7 @@ jobs:
7654
with:
7755
node-version: ${{ matrix.node }}
7856
- name: Load node_modules
79-
uses: actions/cache@v2
57+
uses: actions/cache@v4
8058
with:
8159
path: |
8260
node_modules

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-ssr-app",
3-
"version": "1.1.198",
3+
"version": "2.0.0",
44
"description": "Create Serverless SSR App",
55
"main": "./bin/init.js",
66
"scripts": {

src/init.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const init = async (options?: Options) => {
3535
message: 'Select ssr framework version (v6 or v7):',
3636
choices: [
3737
{ title: 'v7(Recommend, Support Rspack, Rolldown-Vite, Webpack@4)', value: 'v7' },
38-
{ title: 'v6(Support Webpack@4, Vite@2)', value: 'v6' },
38+
{ title: 'v6(Support Webpack@4, Vite@2)', value: 'v6' }
3939
]
4040
}, {
4141
onCancel: () => {
@@ -78,9 +78,9 @@ const init = async (options?: Options) => {
7878
{ title: 'Rspack', value: 'rspack' },
7979
...(!['nestjs-vue-ssr', 'midway-vue-ssr'].includes(template) ? [{ title: 'Rolldown-Vite', value: 'vite' }] : []),
8080
{ title: 'Webpack', value: 'webpack' }
81-
],
81+
]
8282
}
83-
]);
83+
])
8484
tools = response.tools
8585
}
8686
logGreen(`${template} is creating...`)
@@ -90,14 +90,14 @@ const init = async (options?: Options) => {
9090
const pkgJson = require(join(cwd, `./${targetDir}/package.json`))
9191
const bootstrapFileName = template.includes('nest') ? 'dist/main.js' : 'bootstrap.js'
9292
pkgJson.scripts = {
93-
"start": `ssr start ${tools[0] !== 'webpack' ? `--tool ${tools[0]}` : ''}`,
94-
...(tools.includes('vite') ? { "start:vite": "ssr start --tool vite" } : {}),
95-
...(tools.includes('rspack') ? { "start:rspack": "ssr start --tool rspack" } : {}),
96-
"prod": `ssr build ${tools[0] !== 'webpack' ? `--tool ${tools[0]}` : ''} && NODE_ENV=production node ${bootstrapFileName}`,
97-
...(tools.includes('vite') ? { "prod:vite": `ssr build --tool vite && NODE_ENV=production node ${bootstrapFileName}` } : {}),
98-
...(tools.includes('rspack') ? { "prod:rspack": `ssr build --tool rspack && NODE_ENV=production node ${bootstrapFileName}` } : {}),
99-
"lint": "biome format --diagnostic-level error",
100-
"lint:fix": "biome format --diagnostic-level error --write"
93+
start: `ssr start ${tools[0] !== 'webpack' ? `--tool ${tools[0]}` : ''}`,
94+
...(tools.includes('vite') ? { 'start:vite': 'ssr start --tool vite' } : {}),
95+
...(tools.includes('rspack') ? { 'start:rspack': 'ssr start --tool rspack' } : {}),
96+
prod: `ssr build ${tools[0] !== 'webpack' ? `--tool ${tools[0]}` : ''} && NODE_ENV=production node ${bootstrapFileName}`,
97+
...(tools.includes('vite') ? { 'prod:vite': `ssr build --tool vite && NODE_ENV=production node ${bootstrapFileName}` } : {}),
98+
...(tools.includes('rspack') ? { 'prod:rspack': `ssr build --tool rspack && NODE_ENV=production node ${bootstrapFileName}` } : {}),
99+
lint: 'biome format --diagnostic-level error',
100+
'lint:fix': 'biome format --diagnostic-level error --write'
101101
}
102102
const devDependencies = pkgJson.devDependencies
103103
if (!tools.includes('webpack')) {

0 commit comments

Comments
 (0)