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

Commitb517e40

Browse files
authored
Merge pull request#531 from rtfpessoa/use-npm
use npm instead of yarn
2 parents4de87bf +dea1d30 commitb517e40

File tree

7 files changed

+17766
-8931
lines changed

7 files changed

+17766
-8931
lines changed

‎.github/workflows/test-and-publish.yml‎

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ jobs:
6161
uses:actions/setup-node@v3
6262
with:
6363
node-version:${{ matrix.node-version }}
64-
cache:'yarn'
64+
cache:'npm'
6565
-name:Log environment setup
6666
run:|
6767
node -v
68-
yarn -v
68+
npm -v
6969
-name:Install dependencies
70-
run:yarn install --ignore-engines
70+
run:npm install
7171
-name:Build templates
72-
run:yarn run build:templates
72+
run:npm run build:templates
7373
-name:Build library
74-
run:yarn run build
74+
run:npm run build
7575

7676
publish:
7777
runs-on:ubuntu-latest
@@ -97,12 +97,12 @@ jobs:
9797
repo-token:"${{ secrets.GITHUB_TOKEN }}"
9898
tag:"${{ env.version }}"
9999
-name:Install dependencies
100-
run:yarn
100+
run:npm install
101101
-uses:actions/setup-node@v3
102102
with:
103103
registry-url:'https://registry.npmjs.org'
104104
node-version:'18.x'
105-
-name:ConfigureYarn version
105+
-name:ConfigureNPM version
106106
env:
107107
NODE_AUTH_TOKEN:${{ secrets.NPM_TOKEN }}
108108
run:|
@@ -112,19 +112,17 @@ jobs:
112112
echo "registry=https://registry.npmjs.org/" >> .npmrc
113113
echo "access=public" >> .npmrc
114114
echo "save-exact=true" >> .npmrc
115-
yarn config set version-tag-prefix ""
116-
yarn config set version-git-message "Release version %s"
117115
-name:Version package
118116
run:|
119117
# Update version in packages to publish
120-
yarn version--non-interactive --new-version$(cat .version)
118+
npm version $(cat .version) -m "Release version %s"
121119
-name:Publish to NPM
122-
run:yarn publish --tag $(cat .tag) --non-interactive --new-version $(cat .version)
120+
run:npm publish --tag $(cat .tag)
123121
-uses:actions/setup-node@v3
124122
with:
125123
node-version:'18.x'
126124
registry-url:'https://npm.pkg.github.com'
127-
-name:ConfigureYarn version
125+
-name:ConfigureNPM version
128126
env:
129127
NODE_AUTH_TOKEN:${{ secrets.GITHUB_TOKEN }}
130128
run:|
@@ -134,18 +132,12 @@ jobs:
134132
echo "@rtfpessoa:registry=https://npm.pkg.github.com/" >> .npmrc
135133
echo "access=public" >> .npmrc
136134
echo "save-exact=true" >> .npmrc
137-
yarn config set version-tag-prefix ""
138-
yarn config set version-git-message "Release version %s"
139-
-name:Version package
140-
run:|
141-
# Update version in packages to publish
142-
yarn version --non-interactive --new-version $(cat .version)
143135
-name:Publish to GPR
144136
run:|
145137
# HACK: Override npm package name to be able to publish in GitHub
146138
sed -i 's/^ "name":.*/ "name": "@rtfpessoa\/diff2html",/g' package.json
147139
echo "Going to publish version $(cat .version) to GitHub"
148-
yarn publish --tag $(cat .tag) --non-interactive --new-version $(cat .version)
140+
npm publish --tag $(cat .tag)
149141
# HACK: Restore npm package name
150142
sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json
151143
-name:Upload docs

‎.husky/pre-commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
."$(dirname"$0")/_/husky.sh"
33

4-
npxlint-staged
4+
npm runlint:staged

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
- Before sending a pull request make sure your code is tested.
1212

13-
- Before sending a pull request for a feature, be sure to run tests with`yarn test`.
13+
- Before sending a pull request for a feature, be sure to run tests with`npm run test`.
1414

15-
- Use the same coding style as the rest of the codebase, most of the check can be performed with`yarn run lint`.
15+
- Use the same coding style as the rest of the codebase, most of the check can be performed with`npm run run lint`.
1616

1717
- Use`git rebase` (not`git merge`) to sync your work from time to time with the master branch.
1818

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ import { Controller } from '@hotwired/stimulus';
321321

322322
import {Diff2HtmlUI,Diff2HtmlUIConfig }from'diff2html/lib/ui/js/diff2html-ui-slim.js';
323323

324-
// Requires `yarn add highlight.js`
324+
// Requires `npm install highlight.js`
325325
import'highlight.js/styles/github.css';
326326
import'diff2html/bundles/css/diff2html.min.css';
327327

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp