这是indexloc提供的服务,不要输入任何密码
Skip to content

Mono repo nx #443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2abd080
Adding nx into subfolder
DennisAlund Sep 4, 2024
bc4ee85
Moving monorepo to root of project
DennisAlund Sep 4, 2024
143fc1d
Updating git ignore
DennisAlund Sep 5, 2024
d04ffb2
Updating nx.json
DennisAlund Sep 5, 2024
6a9a8b6
Updating configuration
DennisAlund Sep 5, 2024
1c872c6
Merge branch 'main' into mono-repo-nx
DennisAlund Sep 5, 2024
47eee6b
Adding cloud functions app
DennisAlund Sep 5, 2024
e7f2748
Adding packages
DennisAlund Sep 5, 2024
a6fb4c4
Configuring cloud functions
DennisAlund Sep 5, 2024
1740d62
Creating shared lib
DennisAlund Sep 5, 2024
59e735c
Moving cloud functions into apps
DennisAlund Sep 5, 2024
6c2b7b6
Configuring dependency scopes
DennisAlund Sep 5, 2024
b10ba39
Adding packages
DennisAlund Sep 5, 2024
bf094af
Renaming dummy app to cms
DennisAlund Sep 5, 2024
53b659c
Fixing cloud function import
DennisAlund Sep 5, 2024
08e6ec9
Updating packages installation
DennisAlund Sep 5, 2024
113d981
Starting to move hosting to cms app
DennisAlund Sep 5, 2024
0d58b5d
Removing unused code
DennisAlund Sep 5, 2024
ccc683a
Adding type export
DennisAlund Sep 5, 2024
163e399
Updating gitignore
DennisAlund Sep 5, 2024
11c5b49
Removing old hosting
DennisAlund Sep 5, 2024
24a87ea
Configuring base tsconfig
DennisAlund Sep 5, 2024
01415ed
Updating firbase json
DennisAlund Sep 5, 2024
50c737d
add env example
muzanella11 Sep 6, 2024
3e381c1
Renaming base tsconfig
DennisAlund Sep 6, 2024
f34a38c
Updating prettier config
DennisAlund Sep 6, 2024
8d5f474
Fixing lint issues
DennisAlund Sep 6, 2024
0dd6a45
Renaming shared domain models lib
DennisAlund Sep 6, 2024
c36a353
Adding backend domain lib for models
DennisAlund Sep 6, 2024
47737d7
Updating tscofig for import rules
DennisAlund Sep 6, 2024
aa19b14
Adding spelling exceptions
DennisAlund Sep 6, 2024
263fe4a
Making domain models into shared library
DennisAlund Sep 6, 2024
d7a8174
Spelling exceptions
DennisAlund Sep 6, 2024
d86740f
Lint fixing
DennisAlund Sep 6, 2024
25c9f45
Adding shared domain model export
DennisAlund Sep 6, 2024
67f2a74
Moving UI components
DennisAlund Sep 6, 2024
657f8cd
Removing unused code
DennisAlund Sep 6, 2024
779d5ed
Adding spelling exceptions
DennisAlund Sep 6, 2024
1d629dd
Fixing type imports
DennisAlund Sep 6, 2024
c38dfef
Removing unused file
DennisAlund Sep 6, 2024
7dd9b2e
Completing app refactoring with external components
DennisAlund Sep 6, 2024
610c12d
Updating contribution doc
DennisAlund Sep 6, 2024
c4b96f6
Fixing eslint
DennisAlund Sep 6, 2024
f18c536
Updating package.json
DennisAlund Sep 6, 2024
35d62c6
Updating tsconfig
DennisAlund Sep 6, 2024
83ec701
Renaming lib from "client" to "frontend"
DennisAlund Sep 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
112 changes: 112 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"root": true,
"ignorePatterns": [
"**/*"
],
"plugins": [
"@nx",
"@typescript-eslint",
"import",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended",
"google",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"files": [
"*.ts",
"*.tsx",
"*.js",
"*.jsx"
],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "app:frontend",
"onlyDependOnLibsWithTags": [
"lib:frontend"
]
},
{
"sourceTag": "app:backend",
"onlyDependOnLibsWithTags": [
"lib:backend"
]
},
{
"sourceTag": "lib:frontend",
"onlyDependOnLibsWithTags": [
"lib:frontend"
]
},
{
"sourceTag": "lib:shared",
"onlyDependOnLibsWithTags": [
"lib:shared"
]
}
]
}
]
}
},
{
"files": [
"*.ts",
"*.tsx"
],
"extends": [
"plugin:@nx/typescript"
],
"rules": {}
},
{
"files": [
"*.js",
"*.jsx"
],
"extends": [
"plugin:@nx/javascript"
],
"rules": {}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": [
"tsconfig.json",
"tsconfig.dev.json"
],
"sourceType": "module"
},
"rules": {
"quotes": "off", // Use config from prettier
"max-len": "off",
"require-jsdoc": "off",
"import/no-unresolved": 0,
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"operator-linebreak": [
"error",
"before"
],
"prettier/prettier": "error"
}
}
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
actions: read
contents: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

# This enables task distribution via Nx Cloud
# Run this command as early as possible, before dependencies are installed
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
- run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci"

# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- run: npm ci --legacy-peer-deps
- uses: nrwl/nx-set-shas@v4

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: npx nx-cloud record -- echo Hello World
# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected
- run: npx nx affected -t lint test build e2e-ci
115 changes: 59 additions & 56 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,65 +4,68 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript
# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

.nx/cache
.nx/workspace-data

# Next.js
.next
out

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

.ignore/
.ignore/

# Firebase
.runtimeconfig.json
**/.emulators/*
**/.firebase/*
database-debug.log
firestore-debug.log
pubsub-debug.log
ui-debug.log
firebase-export*
.secret.local

# Firebase cache
.firebase/
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/.nx/cache
/.nx/workspace-data
File renamed without changes.
5 changes: 5 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
"version": "0.2",
"language": "en",
"words": [
"Buildable",
"datepicker",
"firebaseui",
"firestore",
"formgroup",
"Genkit",
"googleai",
"linebreak",
"satoshi",
"tanam",
"tiptap"
]
Expand Down
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"nrwl.angular-console",
"esbenp.prettier-vscode",
"ms-playwright.playwright",
"firsttris.vscode-jest-runner"
]
}
18 changes: 18 additions & 0 deletions apps/cloud-functions/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
11 changes: 11 additions & 0 deletions apps/cloud-functions/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-disable */
export default {
displayName: 'cloud-functions',
preset: '../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/cloud-functions',
};
Loading
Loading