Skip to content

Commit

Permalink
build(deps): replace yarn with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
markokajzer committed Sep 9, 2024
1 parent 43e8a82 commit d0612d1
Show file tree
Hide file tree
Showing 7 changed files with 5,691 additions and 4,301 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
!src

!package.json
!yarn.lock
!package-lock.json
!tsconfig.json
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: yarn
cache: npm

- run: yarn install
- run: yarn format:check
- run: npm install
- run: npm run format:check

lint:
runs-on: ubuntu-latest
Expand All @@ -32,10 +32,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: yarn
cache: npm

- run: yarn install
- run: yarn lint --quiet
- run: npm install
- run: npm run lint --quiet

test:
runs-on: ubuntu-latest
Expand All @@ -46,7 +46,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: yarn
cache: npm

- run: yarn install
- run: yarn test
- run: npm install
- run: npm test
22 changes: 7 additions & 15 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,17 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v3.3.0
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: npm

- name: Checkout
uses: actions/checkout@v3
- run: npm install
- run: npm run build
- run: npm pack

- name: Install dependencies
run: yarn install

- name: Build project
run: yarn build

- name: Pack tarball
run: npm pack

- name: Publish to npm
run: npm publish --access public
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ FROM builder AS build
COPY --chown=node:node . /app

# Install compile dependencies
RUN yarn install --frozen-lockfile && \
yarn cache clean --force
RUN npm install && \
npm cache clean --force

# Build project
RUN yarn build
RUN npm run build

####################################################################################################

Expand All @@ -52,4 +52,4 @@ COPY --from=build --chown=node:node /app .
USER node
ENV NODE_ENV=production
ENTRYPOINT ["/tini", "--"]
CMD ["yarn", "serve"]
CMD ["npm", "run", "serve"]
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ When not using Docker, make sure to install **Node.js v20.0.0** or newer and **F
#### Building manually

+ Clone the repository.
+ Install the dependencies with `yarn install`.
+ Run the bot with `yarn start`.
+ Install the dependencies with `npm install`.
+ Run the bot with `npm start`.

Need details? You can find more detailed installation guides for [Unix](../../wiki/Unix) (including your Raspberry Pi), [macOS](../../wiki/macOS), and [Windows](../../wiki/Windows).

Expand All @@ -65,9 +65,6 @@ You can also add the bot as a project dependency to your Node project, by simply
```
# For npm
$ npm install discord-soundbot
# For yarn
$ yarn add discord-soundbot
```

Start the bot.
Expand Down
Loading

0 comments on commit d0612d1

Please sign in to comment.