File tree Expand file tree Collapse file tree 11 files changed +72
-5789
lines changed
Expand file tree Collapse file tree 11 files changed +72
-5789
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77 runs-on : ubuntu-latest
88 steps :
99 - name : Checkout
10- uses : actions/checkout@v3
10+ uses : actions/checkout@v4
1111
12- - name : Setup Node.js
13- uses : actions/setup-node@v3
14- with :
15- node-version : ' 18.x'
12+ - name : Setup Bun
13+ uses : oven-sh/setup-bun@v2
1614
1715 - name : Install dependencies
18- run : npm install
16+ run : bun install
1917
2018 - name : Unit Tests
2119 run : npm run test
20+
21+ - name : Build
22+ run : npm run build:prod
Original file line number Diff line number Diff line change 1- FROM node:14-alpine as builder
1+ FROM oven/bun:1 AS base
2+ WORKDIR /usr/src/app
23
3- ARG NODE_ENV=development
4- ENV NODE_ENV=${NODE_ENV}
4+ FROM base AS install
5+ RUN mkdir -p /temp/dev
6+ COPY package.json bun.lockb /temp/dev/
7+ RUN cd /temp/dev && bun install --frozen-lockfile
58
6- WORKDIR /usr/src/app
9+ RUN mkdir -p /temp/prod
10+ COPY package.json bun.lockb /temp/prod/
11+ RUN cd /temp/prod && bun install --frozen-lockfile --production
712
8- COPY package.json package-lock.json tsconfig.json ./
9- RUN npm install
10- COPY src ./
11- RUN npm run tsc
13+ FROM base AS prerelease
14+ COPY --from=install /temp/dev/node_modules node_modules
15+ COPY . .
1216
13- FROM node:14-alpine
17+ ENV NODE_ENV=production
18+ RUN bun test
19+ RUN bun run build:prod
1420
15- WORKDIR /usr/src/app
16- COPY --from=builder /usr/src/app/package.json package.json
17- COPY --from=builder /usr/src/app/node_modules node_modules
18- COPY --from=builder /usr/src/app/build build
21+ FROM base AS release
22+ COPY --from=install /temp/prod/node_modules node_modules
23+ COPY --from=prerelease /usr/src/app/build/* build/
24+ COPY --from=prerelease /usr/src/app/package.json .
1925
20- CMD [ "npm" , "run" , "start:prod" ]
26+ # run the app
27+ USER bun
28+ EXPOSE 3000/tcp
29+ ENTRYPOINT [ "bun" , "run" , "start:prod" ]
Original file line number Diff line number Diff line change @@ -18,17 +18,16 @@ sequenceDiagram
1818
1919## Requirements
2020
21- - NPM
22- - Node
23- - Bun (for running locally, so we can run TypeScript directly)
21+ - Bun
2422
2523## Running Locally
2624
2725The easiest way to test is to set this up in a standalone Slack instance and
2826then use a local proxy like [ ngrok] ( https://ngrok.com/ ) .
2927
3028- Create a Slack application (see Slack Bolt API link below)
31- - Run ` npm run dev ` (it defaults to port 3000)
29+ - Run ` bun install ` to install dependencies
30+ - Run ` bun run dev ` (it defaults to port 3000)
3231- Run ngrok to create a proxy to your Bolt app (` ngrok serve 3000 ` )
3332- Point your Slack's event subscription to your ngrok URL
3433- Set up [ Sonos Proxy] ( https://github.com/clearfunction/sonos_proxy_nodejs )
Original file line number Diff line number Diff line change 1+ // @ts -check
2+
3+ import eslint from '@eslint/js' ;
4+ import tseslint from 'typescript-eslint' ;
5+ import eslintConfigPrettier from 'eslint-config-prettier' ;
6+
7+ export default tseslint . config (
8+ eslint . configs . recommended ,
9+ ...tseslint . configs . strict ,
10+ ...tseslint . configs . stylistic ,
11+ {
12+ rules : {
13+ '@typescript-eslint/no-empty-object-type' : [
14+ 'error' ,
15+ { allowInterfaces : 'always' } ,
16+ ] ,
17+ } ,
18+ ignores : [ 'dist' , 'node_modules' ] ,
19+ } ,
20+ eslintConfigPrettier
21+ ) ;
You can’t perform that action at this time.
0 commit comments