chore: add nx/project.json to twenty-chrome-extension (#5217)
Fix for `build` CI on `twenty-chrome-extension` --------- Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
extends: ['../../.eslintrc.cjs', '../../.eslintrc.react.cjs'],
|
||||
ignorePatterns: ['!**/*', 'node_modules', 'dist', 'src/generated/*.tsx'],
|
||||
ignorePatterns: ['!**/*', 'node_modules', 'dist', '**/generated/*'],
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
|
||||
1
packages/twenty-chrome-extension/.prettierignore
Normal file
1
packages/twenty-chrome-extension/.prettierignore
Normal file
@ -0,0 +1 @@
|
||||
src/generated
|
||||
@ -5,19 +5,6 @@
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"nx": "NX_DEFAULT_PROJECT=twenty-chrome-extension node ../../node_modules/nx/bin/nx.js",
|
||||
"clean": "npx rimraf ./dist",
|
||||
"start": "yarn clean && VITE_MODE=development vite",
|
||||
"build": "yarn clean && npx tsc && npx vite build",
|
||||
"lint": "eslint . --report-unused-disable-directives --max-warnings 0 --config .eslintrc.cjs",
|
||||
"graphql:generate": "graphql-codegen",
|
||||
"fmt": "prettier --check \"src/**/*.ts\" \"src/**/*.tsx\"",
|
||||
"fmt:fix": "prettier --cache --write \"src/**/*.ts\" \"src/**/*.tsx\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/chrome": "^0.0.256"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@crxjs/vite-plugin": "^1.0.14"
|
||||
"build": "npx vite build"
|
||||
}
|
||||
}
|
||||
|
||||
69
packages/twenty-chrome-extension/project.json
Normal file
69
packages/twenty-chrome-extension/project.json
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"name": "twenty-chrome-extension",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"tags": ["scope:frontend"],
|
||||
"targets": {
|
||||
"build": {
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"outputPath": "{projectRoot}/dist"
|
||||
}
|
||||
},
|
||||
"start": {
|
||||
"executor": "@nx/vite:dev-server",
|
||||
"options": {
|
||||
"buildTarget": "twenty-chrome-extension:build",
|
||||
"hmr": true
|
||||
}
|
||||
},
|
||||
"preview": {
|
||||
"executor": "@nx/vite:preview-server",
|
||||
"options": {
|
||||
"buildTarget": "twenty-chrome-extension:build",
|
||||
"port": 3002,
|
||||
"open": true
|
||||
}
|
||||
},
|
||||
"reset:env": {
|
||||
"executor": "nx:run-commands",
|
||||
"inputs": ["{projectRoot}/.env.example"],
|
||||
"outputs": ["{projectRoot}/.env"],
|
||||
"cache": true,
|
||||
"options": {
|
||||
"cwd": "{projectRoot}",
|
||||
"command": "cp .env.example .env"
|
||||
}
|
||||
},
|
||||
"typecheck": {},
|
||||
"lint": {
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"{projectRoot}/src/**/*.{ts,tsx,json}",
|
||||
"{projectRoot}/package.json"
|
||||
],
|
||||
"maxWarnings": 0,
|
||||
"reportUnusedDisableDirectives": "error"
|
||||
},
|
||||
"configurations": {
|
||||
"ci": { "eslintConfig": "{projectRoot}/.eslintrc-ci.cjs" },
|
||||
"fix": {}
|
||||
}
|
||||
},
|
||||
"fmt": {
|
||||
"options": {
|
||||
"files": "src"
|
||||
},
|
||||
"configurations": {
|
||||
"fix": {}
|
||||
}
|
||||
},
|
||||
"graphql:generate": {
|
||||
"executor": "nx:run-commands",
|
||||
"options": {
|
||||
"cwd": "{projectRoot}",
|
||||
"command": "graphql-codegen"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,5 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../.cache/tsc"
|
||||
},
|
||||
"exclude": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.test.ts",
|
||||
@ -10,5 +7,5 @@
|
||||
"**/*.test.tsx",
|
||||
"jest.config.ts"
|
||||
],
|
||||
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
|
||||
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
||||
}
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../.cache/tsc",
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/options/modules/*"],
|
||||
"~/*": ["src/*"]
|
||||
"@/*": ["packages/twenty-chrome-extension/src/options/modules/*"],
|
||||
"~/*": ["packages/twenty-chrome-extension/src/*"]
|
||||
},
|
||||
|
||||
/* Bundler mode */
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../.cache/tsc",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"include": [
|
||||
"codegen.ts",
|
||||
"vite.config.ts",
|
||||
"jest.config.ts",
|
||||
"**/*.test.ts",
|
||||
|
||||
@ -19,6 +19,9 @@ const viteManifestHack: Plugin & {
|
||||
|
||||
export default defineConfig(() => {
|
||||
return {
|
||||
root: __dirname,
|
||||
cacheDir: '../../node_modules/.vite/packages/twenty-chrome-extension',
|
||||
|
||||
build: {
|
||||
emptyOutDir: true,
|
||||
outDir: 'dist',
|
||||
|
||||
Reference in New Issue
Block a user