Skip to content

Commit 38e8d3f

Browse files
committed
2.0.0
1 parent 718bef6 commit 38e8d3f

File tree

3 files changed

+17
-70
lines changed

3 files changed

+17
-70
lines changed

.github/workflows/CI.yaml

Lines changed: 5 additions & 58 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,72 +38,19 @@ 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
64-
build:
65-
needs: [lint]
66-
strategy:
67-
matrix:
68-
os: [ubuntu-latest, macos-latest, windows-latest]
69-
node: ["16"]
70-
name: build - ${{ matrix.os }} - ${{ matrix.node }}
71-
runs-on: ${{ matrix.os }}
72-
steps:
73-
- uses: actions/checkout@v2
74-
- name: Use Node.js
75-
uses: actions/setup-node@v1
76-
with:
77-
node-version: ${{ matrix.node }}
78-
- name: Load node_modules
79-
uses: actions/cache@v2
80-
with:
81-
path: |
82-
node_modules
83-
*/*/node_modules
84-
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
85-
- run: yarn build
86-
- name: Upload artifact
87-
uses: actions/upload-artifact@v3
88-
with:
89-
name: build_output
90-
path: bin
9141
9242
publish:
9343
name: Publish
9444
runs-on: ubuntu-latest
95-
needs: [build]
45+
needs: [install]
9646
steps:
9747
- uses: actions/checkout@v2
9848
- name: Setup node
9949
uses: actions/setup-node@v1
10050
with:
10151
node-version: 16
102-
- name: Download artifacts
103-
uses: actions/download-artifact@v3
104-
with:
105-
name: build_output
106-
path: bin
52+
- name: build
53+
run: yarn build
10754
- name: Check out my other private repo
10855
uses: actions/checkout@master
10956
with:

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)