Initial monorepo setup

This commit is contained in:
Jai A
2024-07-03 11:05:58 -07:00
parent 12a3520563
commit 68f0e68343
60 changed files with 13681 additions and 39 deletions

View File

@@ -0,0 +1,18 @@
{
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-typescript",
"@vue/eslint-config-prettier/skip-formatting",
"../../.eslintrc.json"
],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx", "*.vue"],
"rules": {
"vue/multi-word-component-names": "off"
}
}
]
}

7
libs/omorphia/README.md Normal file
View File

@@ -0,0 +1,7 @@
# omorphia
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test omorphia` to execute the unit tests via [Vitest](https://vitest.dev/).

View File

@@ -0,0 +1,12 @@
{
"name": "@monorepo/omorphia",
"version": "0.0.1",
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
".": {
"import": "./index.mjs",
"require": "./index.js"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"name": "omorphia",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/omorphia/src",
"projectType": "library",
"tags": [],
"// targets": "to see all targets run: nx show project omorphia --web",
"targets": {}
}

View File

5
libs/omorphia/src/vue-shims.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
declare module '*.vue' {
import { defineComponent } from 'vue';
const component: ReturnType<typeof defineComponent>;
export default component;
}

View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"allowJs": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,
"jsx": "preserve",
"jsxImportSource": "vue",
"moduleResolution": "node",
"resolveJsonModule": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
}
],
"extends": "../../tsconfig.base.json"
}

View File

@@ -0,0 +1,27 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["vite/client"]
},
"exclude": [
"src/**/__tests__/*",
"src/**/*.spec.ts",
"src/**/*.test.ts",
"src/**/*.spec.tsx",
"src/**/*.test.tsx",
"src/**/*.spec.js",
"src/**/*.test.js",
"src/**/*.spec.jsx",
"src/**/*.test.jsx",
"src/**/*.spec.vue",
"src/**/*.test.vue"
],
"include": [
"src/**/*.js",
"src/**/*.jsx",
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue"
]
}

View File

@@ -0,0 +1,49 @@
/// <reference types='vitest' />
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import dts from 'vite-plugin-dts';
import * as path from 'path';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
export default defineConfig({
root: __dirname,
cacheDir: '../../node_modules/.vite/libs/omorphia',
plugins: [
vue(),
nxViteTsPaths(),
dts({
entryRoot: 'src',
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
}),
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
// Configuration for building your library.
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
outDir: '../../dist/libs/omorphia',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
lib: {
// Could also be a dictionary or array of multiple entry points.
entry: 'src/index.ts',
name: 'omorphia',
fileName: 'index',
// Change this to the formats you want to support.
// Don't forget to update your package.json as well.
formats: ['es', 'cjs'],
},
rollupOptions: {
// External packages that should not be bundled into your library.
external: [],
},
},
});

8
libs/theseus/Cargo.toml Normal file
View File

@@ -0,0 +1,8 @@
[package]
name = "theseus"
version = "0.1.0"
edition = "2021"
[dependencies]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

37
libs/theseus/project.json Normal file
View File

@@ -0,0 +1,37 @@
{
"name": "theseus",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/theseus/src",
"targets": {
"build": {
"executor": "@monodon/rust:check",
"outputs": ["{options.target-dir}"],
"options": {
"target-dir": "dist/target/theseus"
}
},
"test": {
"cache": true,
"executor": "@monodon/rust:test",
"outputs": ["{options.target-dir}"],
"options": {
"target-dir": "dist/target/theseus"
},
"configurations": {
"production": {
"release": true
}
}
},
"lint": {
"cache": true,
"executor": "@monodon/rust:lint",
"outputs": ["{options.target-dir}"],
"options": {
"target-dir": "dist/target/theseus"
}
}
},
"tags": []
}

8
libs/theseus/src/lib.rs Normal file
View File

@@ -0,0 +1,8 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}

View File

@@ -0,0 +1,8 @@
[package]
name = "theseus_macros"
version = "0.1.0"
edition = "2021"
[dependencies]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@@ -0,0 +1,43 @@
{
"name": "theseus_macros",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "libs/theseus_macros/src",
"targets": {
"build": {
"executor": "@monodon/rust:check",
"outputs": [
"{options.target-dir}"
],
"options": {
"target-dir": "dist/target/theseus_macros"
}
},
"test": {
"cache": true,
"executor": "@monodon/rust:test",
"outputs": [
"{options.target-dir}"
],
"options": {
"target-dir": "dist/target/theseus_macros"
},
"configurations": {
"production": {
"release": true
}
}
},
"lint": {
"cache": true,
"executor": "@monodon/rust:lint",
"outputs": [
"{options.target-dir}"
],
"options": {
"target-dir": "dist/target/theseus_macros"
}
}
},
"tags": []
}

View File

@@ -0,0 +1,8 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
}