mirror of
https://github.com/tiennm99/pikachu.git
synced 2026-08-20 22:24:11 +00:00
build: move from pnpm to npm
Replace pnpm-lock.yaml with package-lock.json. The security overrides move to package.json#overrides with their ranges intact, including the bounded '>=x <y' pins whose upper bounds keep the next major out. allowBuilds becomes package.json#allowScripts for the packages actually present in the tree.
This commit is contained in:
@@ -19,13 +19,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24'
|
||||
cache: 'pnpm'
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm test
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
|
||||
build-deploy:
|
||||
needs: test
|
||||
@@ -35,13 +34,12 @@ jobs:
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: pnpm/action-setup@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24'
|
||||
cache: 'pnpm'
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm build-nolog
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build-nolog
|
||||
- uses: actions/configure-pages@v6
|
||||
- uses: actions/upload-pages-artifact@v5
|
||||
with:
|
||||
|
||||
@@ -18,21 +18,21 @@ This template has been updated for:
|
||||
|
||||
## Requirements
|
||||
|
||||
[Node.js](https://nodejs.org) and [pnpm](https://pnpm.io) are required to install dependencies and run scripts.
|
||||
[Node.js](https://nodejs.org) and npm are required to install dependencies and run scripts.
|
||||
|
||||
## Available Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `pnpm install` | Install project dependencies |
|
||||
| `pnpm dev` | Launch a development web server |
|
||||
| `pnpm build` | Create a production build in the `dist` folder |
|
||||
| `pnpm dev-nolog` | Launch a development web server without sending anonymous data (see "About log.js" below) |
|
||||
| `pnpm build-nolog` | Create a production build in the `dist` folder without sending anonymous data (see "About log.js" below) |
|
||||
| `npm install` | Install project dependencies |
|
||||
| `npm run dev` | Launch a development web server |
|
||||
| `npm run build` | Create a production build in the `dist` folder |
|
||||
| `npm run dev-nolog` | Launch a development web server without sending anonymous data (see "About log.js" below) |
|
||||
| `npm run build-nolog` | Create a production build in the `dist` folder without sending anonymous data (see "About log.js" below) |
|
||||
|
||||
## Writing Code
|
||||
|
||||
After cloning the repo, run `pnpm install` from your project directory. Then, you can start the local development server by running `pnpm dev`.
|
||||
After cloning the repo, run `npm install` from your project directory. Then, you can start the local development server by running `npm run dev`.
|
||||
|
||||
The local development server runs on `http://localhost:8080` by default. Please see the Next.js documentation if you wish to change this, or add SSL support.
|
||||
|
||||
@@ -162,7 +162,7 @@ When you issue the `npm run build` command, all static assets are automatically
|
||||
|
||||
## Deploying to Production
|
||||
|
||||
After you run the `pnpm build` command, your code will be built into a single bundle and saved to the `dist` folder, along with any other assets your project imported, or stored in the public assets folder.
|
||||
After you run the `npm run build` command, your code will be built into a single bundle and saved to the `dist` folder, along with any other assets your project imported, or stored in the public assets folder.
|
||||
|
||||
In order to deploy your game, you will need to upload *all* of the contents of the `dist` folder to a public facing web server.
|
||||
|
||||
@@ -187,13 +187,13 @@ However, if you don't want to send any data, you can use these commands instead:
|
||||
Dev:
|
||||
|
||||
```bash
|
||||
pnpm dev-nolog
|
||||
npm run dev-nolog
|
||||
```
|
||||
|
||||
Build:
|
||||
|
||||
```bash
|
||||
pnpm build-nolog
|
||||
npm run build-nolog
|
||||
```
|
||||
|
||||
Or, to disable the log entirely, simply delete the file `log.js` and remove the call to it in the `scripts` section of `package.json`:
|
||||
|
||||
Generated
+5361
File diff suppressed because it is too large
Load Diff
+57
-52
@@ -1,53 +1,58 @@
|
||||
{
|
||||
"name": "template-nextjs",
|
||||
"version": "1.2.0",
|
||||
"packageManager": "pnpm@11.1.1",
|
||||
"description": "A Phaser 3 Next.js project template that demonstrates Next.js with React communication and uses Vite for bundling.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/phaserjs/template-nextjs.git"
|
||||
},
|
||||
"author": "Phaser Studio <support@phaser.io> (https://phaser.io/)",
|
||||
"license": "MIT",
|
||||
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
|
||||
"bugs": {
|
||||
"url": "https://github.com/phaserjs/template-nextjs/issues"
|
||||
},
|
||||
"homepage": "https://github.com/phaserjs/template-nextjs#readme",
|
||||
"keywords": [
|
||||
"phaser",
|
||||
"phaser3",
|
||||
"next",
|
||||
"nextjs",
|
||||
"vite",
|
||||
"javascript"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "node log.cjs dev & next dev -p 8080",
|
||||
"build": "node log.cjs build & next build",
|
||||
"dev-nolog": "next dev -p 8080",
|
||||
"build-nolog": "next build",
|
||||
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
|
||||
"test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch",
|
||||
"test:coverage": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage",
|
||||
"test:i": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/i-pattern.test.js",
|
||||
"test:l": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/l-pattern.test.js",
|
||||
"test:u": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/u-pattern.test.js",
|
||||
"test:z": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/z-pattern.test.js",
|
||||
"test:verbose": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --verbose",
|
||||
"test:silent": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --silent"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "16.2.11",
|
||||
"phaser": "^4.2.0",
|
||||
"react": "19.2.7",
|
||||
"react-dom": "19.2.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest": "^30.4.2"
|
||||
},
|
||||
"type": "module",
|
||||
"pnpm": {
|
||||
"ignoredBuiltDependencies": ["sharp"]
|
||||
}
|
||||
}
|
||||
"name": "template-nextjs",
|
||||
"version": "1.2.0",
|
||||
"description": "A Phaser 3 Next.js project template that demonstrates Next.js with React communication and uses Vite for bundling.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/phaserjs/template-nextjs.git"
|
||||
},
|
||||
"author": "Phaser Studio <support@phaser.io> (https://phaser.io/)",
|
||||
"license": "MIT",
|
||||
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
|
||||
"bugs": {
|
||||
"url": "https://github.com/phaserjs/template-nextjs/issues"
|
||||
},
|
||||
"homepage": "https://github.com/phaserjs/template-nextjs#readme",
|
||||
"keywords": [
|
||||
"phaser",
|
||||
"phaser3",
|
||||
"next",
|
||||
"nextjs",
|
||||
"vite",
|
||||
"javascript"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "node log.cjs dev & next dev -p 8080",
|
||||
"build": "node log.cjs build & next build",
|
||||
"dev-nolog": "next dev -p 8080",
|
||||
"build-nolog": "next build",
|
||||
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
|
||||
"test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch",
|
||||
"test:coverage": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage",
|
||||
"test:i": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/i-pattern.test.js",
|
||||
"test:l": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/l-pattern.test.js",
|
||||
"test:u": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/u-pattern.test.js",
|
||||
"test:z": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js test/patterns/z-pattern.test.js",
|
||||
"test:verbose": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --verbose",
|
||||
"test:silent": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --silent"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "16.2.11",
|
||||
"phaser": "^4.2.0",
|
||||
"react": "19.2.7",
|
||||
"react-dom": "19.2.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest": "^30.4.2"
|
||||
},
|
||||
"type": "module",
|
||||
"overrides": {
|
||||
"@babel/core": "7.29.7",
|
||||
"js-yaml": "4.3.0",
|
||||
"postcss": "8.5.16"
|
||||
},
|
||||
"allowScripts": {
|
||||
"sharp": true,
|
||||
"unrs-resolver": true
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-3358
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
allowBuilds:
|
||||
sharp: true
|
||||
unrs-resolver: true
|
||||
|
||||
overrides:
|
||||
'@babel/core': 7.29.7
|
||||
js-yaml: 4.3.0
|
||||
postcss: 8.5.16
|
||||
Reference in New Issue
Block a user