File tree Expand file tree Collapse file tree 4 files changed +43
-17
lines changed Expand file tree Collapse file tree 4 files changed +43
-17
lines changed Original file line number Diff line number Diff line change @@ -21,31 +21,21 @@ COPY ./ ./
2121RUN pnpm install --offline
2222
2323
24- FROM node:20.12.2-alpine@sha256:ec0c413b1d84f3f7f67ec986ba885930c57b5318d2eb3abc6960ee05d4f2eb28 AS build
25-
26- WORKDIR /srv/app/
27-
28- COPY --from=prepare /srv/app/ ./
24+ FROM prepare AS build
2925
3026ENV NODE_ENV=production
3127
3228RUN corepack enable && \
3329 pnpm install --offline --ignore-scripts
3430
3531
36- FROM node:20.12.2-alpine@sha256:ec0c413b1d84f3f7f67ec986ba885930c57b5318d2eb3abc6960ee05d4f2eb28 AS test
37-
38- WORKDIR /srv/app/
39-
40- COPY --from=prepare /srv/app/ ./
32+ FROM prepare AS test
4133
4234RUN corepack enable && \
4335 pnpm run test
4436
4537
46- FROM node:20.12.2-alpine@sha256:ec0c413b1d84f3f7f67ec986ba885930c57b5318d2eb3abc6960ee05d4f2eb28 AS collect
47-
48- WORKDIR /srv/app/
38+ FROM prepare AS collect
4939
5040COPY --from=build /srv/app/ /srv/app/
5141COPY --from=test /srv/app/package.json /tmp/package.json
Original file line number Diff line number Diff line change 1414 "devDependencies" : {
1515 "@commitlint/cli" : " 19.2.2" ,
1616 "@commitlint/config-conventional" : " 19.2.2" ,
17+ "@types/diff" : " 5.0.9" ,
18+ "@types/json2md" : " 1.5.4" ,
19+ "@types/yargs" : " 17.0.32" ,
1720 "eslint" : " 9.0.0" ,
1821 "eslint-config-prettier" : " 9.1.0" ,
1922 "eslint-plugin-prettier" : " 5.1.3" ,
Original file line number Diff line number Diff line change @@ -2,18 +2,19 @@ import fs from 'node:fs'
22import path from 'node:path'
33
44import deepMerge from 'deepmerge'
5- import diff from 'diff'
5+ import { diffLines } from 'diff'
66import json2md from 'json2md'
77import yaml from 'yaml'
88import yargs from 'yargs'
9+ import { hideBin } from 'yargs/helpers'
910
1011const DEVELOPMENT_ONLY_REGEX = / ^ \s * D A R G S T A C K - R E M O V E \s * $ /
1112
1213json2md . converters . vanilla = function ( input , _json2md ) {
1314 return input
1415}
1516
16- const argv = yargs
17+ const argv = yargs ( hideBin ( process . argv ) )
1718 . option ( 'path' , {
1819 alias : 'p' ,
1920 description : 'Path to a DargStack stack project' ,
@@ -25,7 +26,8 @@ const argv = yargs
2526 type : 'boolean' ,
2627 } )
2728 . help ( )
28- . alias ( 'help' , 'h' ) . argv
29+ . alias ( 'help' , 'h' )
30+ . parse ( )
2931
3032const projectPath = argv . path || process . cwd ( )
3133const validate = argv . validate || false
@@ -252,7 +254,7 @@ if (validate) {
252254 throw new Error ( 'README.md file not found!' )
253255 }
254256
255- const difference = diff . diffLines ( md + '\n' , readme )
257+ const difference = diffLines ( md + '\n' , readme )
256258
257259 if ( difference . length > 1 ) {
258260 console . error (
You can’t perform that action at this time.
0 commit comments