diff --git a/.github/workflows/cf-worker-deploy.yml b/.github/workflows/cf-worker-deploy.yml deleted file mode 100644 index 1259d2d..0000000 --- a/.github/workflows/cf-worker-deploy.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: cf-worker-deploy - -on: - # push: - # branches: - # - main - workflow_dispatch: - -jobs: - deploy: - runs-on: ubuntu-latest - environment: CF - name: Deploy - steps: - - uses: actions/checkout@v2 - - name: envsubst - run: | - envsubst < apps/cf-worker/wrangler.toml.tp > apps/cf-worker/wrangler.toml - if [[ $CUSTOM_DOMAIN ]]; then - echo cf_environment="custom" >> $GITHUB_ENV - else - echo "not set CUSTOM_DOMAIN" - fi - env: - CUSTOM_DOMAIN: ${{ secrets.CUSTOM_DOMAIN }} - - name: Publish - uses: cloudflare/wrangler-action@2.0.0 - with: - apiToken: ${{ secrets.CF_API_TOKEN }} - command: publish --env ${{ env.cf_environment || 'default' }} - workingDirectory: 'apps/cf-worker' - environment: ${{ env.cf_environment || 'default' }} - secrets: | - UUID - env: - UUID: ${{ secrets.UUID }} diff --git a/apps/cf-worker/.eslintrc.json b/apps/cf-page/.eslintrc.json similarity index 80% rename from apps/cf-worker/.eslintrc.json rename to apps/cf-page/.eslintrc.json index 9d9c0db..734ddac 100644 --- a/apps/cf-worker/.eslintrc.json +++ b/apps/cf-page/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["../../.eslintrc.json"], + "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], "ignorePatterns": ["!**/*"], "overrides": [ { diff --git a/apps/cf-page/index.html b/apps/cf-page/index.html new file mode 100644 index 0000000..255b6c6 --- /dev/null +++ b/apps/cf-page/index.html @@ -0,0 +1,16 @@ + + + + + CfPage + + + + + + + +
+ + + diff --git a/apps/cf-page/project.json b/apps/cf-page/project.json new file mode 100644 index 0000000..4e8d7c8 --- /dev/null +++ b/apps/cf-page/project.json @@ -0,0 +1,52 @@ +{ + "name": "cf-page", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "apps/cf-page/src", + "projectType": "application", + "targets": { + "build": { + "executor": "@nrwl/vite:build", + "outputs": ["{options.outputPath}"], + "defaultConfiguration": "production", + "options": { + "outputPath": "dist/apps/cf-page" + }, + "configurations": { + "development": {}, + "production": {} + } + }, + "serve": { + "executor": "@nrwl/vite:dev-server", + "defaultConfiguration": "development", + "options": { + "buildTarget": "cf-page:build" + }, + "configurations": { + "development": { + "buildTarget": "cf-page:build:development", + "hmr": true + }, + "production": { + "buildTarget": "cf-page:build:production", + "hmr": false + } + } + }, + "test": { + "executor": "@nrwl/vite:test", + "outputs": ["{projectRoot}/coverage"], + "options": { + "passWithNoTests": true + } + }, + "lint": { + "executor": "@nrwl/linter:eslint", + "outputs": ["{options.outputFile}"], + "options": { + "lintFilePatterns": ["apps/cf-page/**/*.{ts,tsx,js,jsx}"] + } + } + }, + "tags": [] +} diff --git a/apps/cf-page/public/favicon.ico b/apps/cf-page/public/favicon.ico new file mode 100644 index 0000000..317ebcb Binary files /dev/null and b/apps/cf-page/public/favicon.ico differ diff --git a/apps/cf-page/src/app/app.module.css b/apps/cf-page/src/app/app.module.css new file mode 100644 index 0000000..7b88fba --- /dev/null +++ b/apps/cf-page/src/app/app.module.css @@ -0,0 +1 @@ +/* Your styles goes here. */ diff --git a/apps/cf-page/src/app/app.spec.tsx b/apps/cf-page/src/app/app.spec.tsx new file mode 100644 index 0000000..1fcd97b --- /dev/null +++ b/apps/cf-page/src/app/app.spec.tsx @@ -0,0 +1,17 @@ +import { render } from '@testing-library/react'; + +import App from './app'; + +describe('App', () => { + it('should render successfully', () => { + const { baseElement } = render(); + + expect(baseElement).toBeTruthy(); + }); + + it('should have a greeting as the title', () => { + const { getByText } = render(); + + expect(getByText(/Welcome cf-page/gi)).toBeTruthy(); + }); +}); diff --git a/apps/cf-page/src/app/app.tsx b/apps/cf-page/src/app/app.tsx new file mode 100644 index 0000000..3e9d949 --- /dev/null +++ b/apps/cf-page/src/app/app.tsx @@ -0,0 +1,14 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import styles from './app.module.css'; +import NxWelcome from './nx-welcome'; + +export function App() { + return ( + <> + +
+ + ); +} + +export default App; diff --git a/apps/cf-page/src/app/nx-welcome.tsx b/apps/cf-page/src/app/nx-welcome.tsx new file mode 100644 index 0000000..3c1a440 --- /dev/null +++ b/apps/cf-page/src/app/nx-welcome.tsx @@ -0,0 +1,820 @@ +/* + * * * * * * * * * * * * * * * * * * * * * * * * * * * * + This is a starter component and can be deleted. + * * * * * * * * * * * * * * * * * * * * * * * * * * * * + Delete this file and get started with your project! + * * * * * * * * * * * * * * * * * * * * * * * * * * * * + */ +export function NxWelcome({ title }: { title: string }) { + return ( + <> +