Skip to content

Commit

Permalink
migrate to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondMofeng committed Jul 19, 2024
1 parent 9eac4c7 commit 6e2dc90
Show file tree
Hide file tree
Showing 6 changed files with 1,509 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
- [ ] Test passed
- [ ] Coding style (indentation, etc)
- [ ] Edits have been made to `src/` files not `index.d.ts`
- [ ] Run `npm run dtslint` to update `index.d.ts`
- [ ] Run `npm run compile` to update `index.d.ts`
9 changes: 6 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# cache: "npm
cache: "pnpm"

- name: Install dependencies
run: npm i
run: pnpm i

- name: Lint
run: npm run lint:test
run: pnpm lint
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ dist/screeps.ts
dist/screeps.js
dist/screeps-tests.js
.vscode/tasks.json

# we do not need package.lock file
package-lock.json
pnpm-lock.yaml
yarn.lock
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ npm install @types/screeps

# yarn
yarn add @types/screeps

# pnpm
pnpm add @types/screeps
```

## Differences from **[Screeps-Typescript-Declarations](https://github.com/screepers/Screeps-Typescript-Declarations)**
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"format": "npm run format:build && npm run format:src",
"format:build": "prettier --write 'build/**/*.js'",
"format:src": "prettier --write 'src/**/*.ts'",
"test": "npm run compile && npm run lint:test",
"lint": "eslint -c eslint.config.mjs",
"lint:test": "eslint -c eslint.config.test.mjs dist/screeps-tests.ts",
"pre-commit": "npm run compile && git add dist/index.d.ts",
Expand All @@ -27,6 +28,7 @@
"license": "MIT",
"devDependencies": {
"eslint": "^9.7.0",
"eslint-plugin-expect-type": "^0.4.0",
"husky": "^7.0.4",
"lint-staged": "^12.3.8",
"prepend": "^1.0.2",
Expand Down
Loading

0 comments on commit 6e2dc90

Please sign in to comment.