chore: init Nx monorepo
This commit is contained in:
parent
2adf134ddd
commit
a570ea2a55
14 changed files with 15943 additions and 2 deletions
1
.eslintignore
Normal file
1
.eslintignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
node_modules
|
||||
35
.eslintrc.json
Normal file
35
.eslintrc.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"root": true,
|
||||
"ignorePatterns": ["**/*"],
|
||||
"plugins": ["@nx"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {
|
||||
"@nx/enforce-module-boundaries": [
|
||||
"error",
|
||||
{
|
||||
"enforceBuildableLibDependency": true,
|
||||
"allow": [],
|
||||
"depConstraints": [
|
||||
{
|
||||
"sourceTag": "*",
|
||||
"onlyDependOnLibsWithTags": ["*"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"extends": ["plugin:@nx/typescript"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"extends": ["plugin:@nx/javascript"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
.nx/installation
|
||||
.nx/cache
|
||||
|
||||
# Next.js
|
||||
.next
|
||||
/node_modules
|
||||
4
.prettierignore
Normal file
4
.prettierignore
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Add files here to ignore them from prettier formatting
|
||||
/dist
|
||||
/coverage
|
||||
/.nx/cache
|
||||
3
.prettierrc
Normal file
3
.prettierrc
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"singleQuote": true
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component, PropTypes } from 'react';
|
||||
import { head, of, take, compose, when, prop, not, isNil, ifElse, always, map, pipe } from 'ramda';
|
||||
import Typeahead from 'react-bootstrap-typeahead';
|
||||
import { getSubjectsAutocomplete } from 'api/debats';
|
||||
import { getSubjectsAutocomplete } from 'api/debats_api';
|
||||
import { flattenAttributes } from 'api/jsonApiParser';
|
||||
import { enrichWithRelationships } from 'store/selectors/entities';
|
||||
import { makeCancelable } from 'helpers/promises';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { ApolloProvider } from 'react-apollo'
|
|||
import { Provider } from 'react-redux'
|
||||
import { Router } from 'react-router'
|
||||
import routes from '../routes'
|
||||
import { apolloClient } from '../api/debats'
|
||||
import { apolloClient } from '../api/debats_api'
|
||||
|
||||
const Root = ({ store, history }) => (
|
||||
<ApolloProvider client={apolloClient}>
|
||||
|
|
|
|||
5
jest.config.ts
Normal file
5
jest.config.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { getJestProjects } from '@nx/jest';
|
||||
|
||||
export default {
|
||||
projects: getJestProjects(),
|
||||
};
|
||||
3
jest.preset.js
Normal file
3
jest.preset.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
const nxPreset = require('@nx/jest/preset').default;
|
||||
|
||||
module.exports = { ...nxPreset };
|
||||
50
nx.json
Normal file
50
nx.json
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"targetDefaults": {
|
||||
"test": {
|
||||
"cache": true
|
||||
},
|
||||
"@nx/vite:test": {
|
||||
"cache": true,
|
||||
"inputs": ["default", "^default"]
|
||||
},
|
||||
"lint": {
|
||||
"cache": true,
|
||||
"inputs": [
|
||||
"default",
|
||||
"{workspaceRoot}/.eslintrc.json",
|
||||
"{workspaceRoot}/.eslintignore",
|
||||
"{workspaceRoot}/eslint.config.js"
|
||||
]
|
||||
},
|
||||
"@nx/jest:jest": {
|
||||
"cache": true,
|
||||
"inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"],
|
||||
"options": {
|
||||
"passWithNoTests": true
|
||||
},
|
||||
"configurations": {
|
||||
"ci": {
|
||||
"ci": true,
|
||||
"codeCoverage": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"affected": {
|
||||
"defaultBase": "master"
|
||||
},
|
||||
"generators": {
|
||||
"@nx/react": {
|
||||
"application": {
|
||||
"babel": true
|
||||
},
|
||||
"library": {}
|
||||
},
|
||||
"@nx/next": {
|
||||
"application": {
|
||||
"style": "styled-components",
|
||||
"linter": "eslint"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15738
package-lock.json
generated
Normal file
15738
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
75
package.json
Normal file
75
package.json
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"name": "debats",
|
||||
"version": "0.0.1",
|
||||
"description": "Débats.co",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "nx exec -- npm run _test -- ",
|
||||
"nx": "nx"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://framagit.org/debats/debats"
|
||||
},
|
||||
"author": "Jalil Arfaoui <jalil@arfaoui.net>",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@nx/devkit": "17.2.8",
|
||||
"@nx/eslint": "17.2.8",
|
||||
"@nx/eslint-plugin": "17.2.8",
|
||||
"@nx/jest": "17.2.8",
|
||||
"@nx/js": "17.2.8",
|
||||
"@nx/next": "^17.2.8",
|
||||
"@nx/playwright": "17.2.8",
|
||||
"@nx/react": "17.2.8",
|
||||
"@nx/vite": "17.2.8",
|
||||
"@playwright/test": "^1.36.0",
|
||||
"@swc-node/register": "~1.6.7",
|
||||
"@swc/cli": "~0.1.62",
|
||||
"@swc/core": "~1.3.85",
|
||||
"@swc/plugin-styled-components": "^1.5.67",
|
||||
"@testing-library/react": "14.0.0",
|
||||
"@types/jest": "^29.4.0",
|
||||
"@types/node": "18.16.9",
|
||||
"@types/react": "18.2.33",
|
||||
"@types/react-dom": "18.2.14",
|
||||
"@types/react-is": "18.2.2",
|
||||
"@types/styled-components": "5.1.26",
|
||||
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
||||
"@typescript-eslint/parser": "^6.9.1",
|
||||
"@vitest/coverage-v8": "~0.34.6",
|
||||
"@vitest/ui": "~0.34.6",
|
||||
"babel-jest": "^29.4.1",
|
||||
"babel-plugin-styled-components": "1.10.7",
|
||||
"eslint": "~8.48.0",
|
||||
"eslint-config-next": "13.4.4",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"eslint-plugin-jsx-a11y": "6.7.1",
|
||||
"eslint-plugin-playwright": "^0.15.3",
|
||||
"eslint-plugin-react": "7.32.2",
|
||||
"eslint-plugin-react-hooks": "4.6.0",
|
||||
"jest": "^29.4.1",
|
||||
"jest-environment-jsdom": "^29.4.1",
|
||||
"nx": "17.2.8",
|
||||
"prettier": "^2.6.2",
|
||||
"ts-jest": "^29.1.0",
|
||||
"ts-node": "10.9.1",
|
||||
"typescript": "~5.2.2",
|
||||
"vite": "^5.0.0",
|
||||
"vite-plugin-dts": "~2.3.0",
|
||||
"vitest": "~0.34.6"
|
||||
},
|
||||
"nx": {
|
||||
"targets": {}
|
||||
},
|
||||
"dependencies": {
|
||||
"@swc/helpers": "~0.5.2",
|
||||
"next": "13.4.4",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-is": "18.2.0",
|
||||
"styled-components": "5.3.6",
|
||||
"tslib": "^2.3.0"
|
||||
}
|
||||
}
|
||||
20
tsconfig.base.json
Normal file
20
tsconfig.base.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"module": "esnext",
|
||||
"lib": ["es2020", "dom"],
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {}
|
||||
},
|
||||
"exclude": ["node_modules", "tmp"]
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue