Skip to content

Commit

Permalink
feat: create bundler bin
Browse files Browse the repository at this point in the history
Signed-off-by: hxtree <[email protected]>
  • Loading branch information
hxtree committed Oct 28, 2023
1 parent ce56ba6 commit 8ad31b0
Show file tree
Hide file tree
Showing 24 changed files with 55 additions and 140 deletions.
3 changes: 3 additions & 0 deletions platform/create-bundle/bin/create-bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node
// dedicated bin file required due to https://github.com/microsoft/rushstack/issues/1100
require('../dist/create-bundle-bin.js');
2 changes: 1 addition & 1 deletion platform/create-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@cats-cradle/create-bundle",
"license": "MIT",
"bin": {
"create-bundle": "./dist/create-bundle-bin.js"
"create-bundle": "bin/create-bundle"
},
"main": "./dist/index.js",
"version": "1.0.0",
Expand Down
15 changes: 3 additions & 12 deletions services/admin-client/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --esm --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --esm --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/", "pages/", "components/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
15 changes: 3 additions & 12 deletions services/authentication-service/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
3 changes: 2 additions & 1 deletion services/authentication-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"cdk:diff": "cdk diff",
"cdk:synth": "cdk synth",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:deploy": "create-bundle && cdk deploy",
"cdk:deploy": "cdk deploy",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck",
"typecheck": "tsc --noEmit"
Expand Down
15 changes: 3 additions & 12 deletions services/billing-system/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
1 change: 1 addition & 0 deletions services/billing-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"cdk:diff": "cdk diff",
"cdk:deploy": "cdk deploy",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down
15 changes: 3 additions & 12 deletions services/character-sheet/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
3 changes: 2 additions & 1 deletion services/character-sheet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"cdk:diff": "cdk diff",
"cdk:synth": "cdk synth",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:deploy": "create-bundle && cdk deploy",
"cdk:deploy": "cdk deploy",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck",
"typecheck": "tsc --noEmit"
Expand Down
15 changes: 3 additions & 12 deletions services/design-system/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts --esm bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts --esm bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/", "pages/", "components/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
1 change: 1 addition & 0 deletions services/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"cdk:synth": "cdk synth",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:deploy": "storybook build && cdk deploy",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down
15 changes: 3 additions & 12 deletions services/email-service/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
1 change: 1 addition & 0 deletions services/email-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"cdk:synth": "cdk synth",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:deploy": "cdk deploy",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down
15 changes: 3 additions & 12 deletions services/graphql/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
1 change: 1 addition & 0 deletions services/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"cdk:diff": "cdk diff",
"cdk:deploy": "cdk deploy",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down
15 changes: 3 additions & 12 deletions services/html-to-pdf/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
5 changes: 3 additions & 2 deletions services/html-to-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"cdk:bootstrap": "cdk bootstrap",
"cdk:synth": "cdk synth",
"cdk:diff": "cdk diff",
"cdk:deploy": "create-bundle && cdk deploy",
"cdk:hotswap": "create-bundle && cdk deploy --hotswap",
"cdk:deploy": "cdk deploy",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down
15 changes: 3 additions & 12 deletions services/jukebox/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/", "public/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
3 changes: 2 additions & 1 deletion services/jukebox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"cdk:diff": "cdk diff",
"cdk:synth": "cdk synth",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:deploy": "create-bundle && cdk deploy",
"cdk:deploy": "cdk deploy",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down
2 changes: 1 addition & 1 deletion services/jukebox/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<div class="container-fluid">
<span
class="navbar-brand mb-0 fs-1 border-dark border border-3 px-4 bg-white text-dark"
>Cats Cradle Jukebox</span
>Cats Cradle::Jukebox</span
>

<div id="info" class="d-flex text-center bg-info px-4 rounded-0">
Expand Down
15 changes: 3 additions & 12 deletions services/luck-by-dice/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
4 changes: 3 additions & 1 deletion services/luck-by-dice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"scripts": {
"artifact": "create-artifact @cats-cradle/luck-by-dice",
"bundle": "create-bundle --watch",
"dev": "nest start --debug --watch",
"build": "tsc",
"build:all": "rush build -t .",
Expand All @@ -21,8 +22,9 @@
"cdk:bootstrap": "cdk bootstrap",
"cdk:synth": "cdk synth",
"cdk:diff": "cdk diff",
"cdk:deploy": "create-bundle && cdk deploy",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:deploy": "cdk deploy",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down
15 changes: 3 additions & 12 deletions services/weather-control/cdk.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"app": "npx ts-node --prefer-ts-exts bin/app.ts",
"app": "create-bundle && npx ts-node --prefer-ts-exts bin/app.ts",
"watch": {
"include": ["dist/"],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"node_modules",
"__tests__"
]
"include": ["src/", "stacks/"],
"exclude": ["__tests__", "*.test.ts", "*.e2e-spec.ts"]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
Expand Down
1 change: 1 addition & 0 deletions services/weather-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"cdk:synth": "cdk synth",
"cdk:hotswap": "cdk deploy --hotswap",
"cdk:deploy": "cdk deploy",
"cdk:watch": "cdk watch",
"cdk:destroy": "cdk destroy",
"depcheck": "npx depcheck"
},
Expand Down

0 comments on commit 8ad31b0

Please sign in to comment.