Skip to content

Commit

Permalink
Move a bunch of files that are just for react app
Browse files Browse the repository at this point in the history
  • Loading branch information
bjacobel committed May 11, 2024
1 parent bce6948 commit 6668835
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-scripts
- name: Build
run: yarn webpack
run: yarn run build
env:
NODE_ENV: production
GITHUB_SHA: ${{ github.sha }}
- name: Verify bucket exists
run: if [ "$(yarn --silent deploy-utils bucketExists)" = "false" ]; then exit 1; fi
run: if [ "$(yarn run --silent deploy-utils bucketExists)" = "false" ]; then exit 1; fi
- name: Upload dist to bucket
run: |
aws s3 sync dist s3://${{ steps.config.outputs.ProjectFQDomain }} \
Expand All @@ -59,7 +59,7 @@ jobs:
name: dist
path: ./dist
- name: Invalidate CloudFront
run: yarn deploy-utils invalidate "/index.html"
run: yarn run deploy-utils invalidate "/index.html"
sentry:
name: 'Track Deploy In Sentry'
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
- name: Validate peer dependencies
run: yarn check-peer-dependencies --runOnlyOnRootDependencies
- name: Lint
run: yarn lint
run: yarn run lint
- name: Test
run: yarn test --coverage
run: yarn run test --coverage
- uses: actions/upload-artifact@v4
with:
name: coverage
path: ./coverage
- name: Build
run: yarn webpack
run: yarn run build
env:
NODE_ENV: production
codecov:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion jest.setup.js → app/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '@testing-library/jest-dom';

import * as config from './config';
import * as config from '../config';

global.projectConfig = config;
File renamed without changes.
2 changes: 1 addition & 1 deletion app/src/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProjectConfig } from '../config';
import { ProjectConfig } from '../../config';

declare global {
const projectConfig: ProjectConfig;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions webpack.config.ts → app/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import TerserPlugin from 'terser-webpack-plugin';
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
import { GenerateSW } from 'workbox-webpack-plugin';

import config from './config';
import config from '../config';

const HASH_DIGEST_LENGTH = 20;

Expand All @@ -21,7 +21,7 @@ export default (env: Record<string, unknown> = {}, { mode }: { mode?: string } =

return {
entry: {
main: './src/index.tsx',
main: path.join(__dirname, './src/index.tsx'),
},
mode: isProd ? 'production' : 'development',
output: {
Expand Down Expand Up @@ -113,8 +113,8 @@ export default (env: Record<string, unknown> = {}, { mode }: { mode?: string } =
projectConfig: JSON.stringify(config),
}),
new HtmlWebpackPlugin({
template: './src/index.html.tsx',
favicon: './src/assets/images/favicon.ico',
template: path.join(__dirname, './src/index.html.tsx'),
favicon: path.join(__dirname, './src/assets/images/favicon.ico'),
title: config.ProjectName,
inject: true,
}),
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@
},
"scripts": {
"deploy-utils": "ts-node deploy/utils",
"style": "prettier -l --ignore-path .eslintignore . && eslint . && stylelint 'src/**/*.{js,ts,tsx}'",
"stylelint": "stylelint --config app/stylelint.config.js 'app/src/**/*.{js,ts,tsx}'",
"prettier": "prettier -l --ignore-path .eslintignore . ",
"style": "yarn run --silent prettier && eslint . && yarn run --silent stylelint",
"validate": "tsc --noEmit",
"lint": "yarn --silent style && yarn --silent validate",
"start": "webpack-dev-server",
"lint": "yarn run --silent style && yarn run --silent validate",
"build": "webpack -c app/webpack.config.ts",
"start": "webpack-dev-server -c app/webpack.config.ts",
"test": "jest --coverage && ./install-test.sh",
"prepublish": "webpack -c install/src/webpack.config.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"module": "CommonJS"
}
},
"include": ["./src/*", "./jest-setup.ts"]
"include": ["./app/src/*", "./app/jest-setup.ts"]
}

0 comments on commit 6668835

Please sign in to comment.