diff --git a/packages/express-partial-content/.swcrc b/packages/express-partial-content/.swcrc new file mode 100644 index 000000000..73fa88b8d --- /dev/null +++ b/packages/express-partial-content/.swcrc @@ -0,0 +1,22 @@ +{ + "jsc": { + "target": "es2017", + "parser": { + "syntax": "typescript", + "decorators": true, + "dynamicImport": true + }, + "transform": { + "decoratorMetadata": true, + "legacyDecorator": true + }, + "keepClassNames": true, + "externalHelpers": true, + "loose": true + }, + "module": { + "type": "commonjs" + }, + "sourceMaps": true, + "exclude": ["jest.config.ts",".*\\.spec.tsx?$",".*\\.test.tsx?$","./src/jest-setup.ts$","./**/jest-setup.ts$",".*.js$"] +} diff --git a/packages/express-partial-content/README.md b/packages/express-partial-content/README.md new file mode 100644 index 000000000..c0794e164 --- /dev/null +++ b/packages/express-partial-content/README.md @@ -0,0 +1,7 @@ +# express-partial-content + +This library was generated with [Nx](https://nx.dev). + +## Building + +Run `nx build express-partial-content` to build the library. diff --git a/packages/express-partial-content/eslint.config.mjs b/packages/express-partial-content/eslint.config.mjs new file mode 100644 index 000000000..b0d78db72 --- /dev/null +++ b/packages/express-partial-content/eslint.config.mjs @@ -0,0 +1,23 @@ +import baseConfig from "../../eslint.config.mjs"; + +export default [ + ...baseConfig, + { + "files": [ + "**/*.json" + ], + "rules": { + "@nx/dependency-checks": [ + "error", + { + "ignoredFiles": [ + "{projectRoot}/eslint.config.{js,cjs,mjs}" + ] + } + ] + }, + "languageOptions": { + "parser": (await import('jsonc-eslint-parser')) + } + } +]; diff --git a/packages/express-partial-content/package.json b/packages/express-partial-content/package.json new file mode 100644 index 000000000..1c0bc6cb8 --- /dev/null +++ b/packages/express-partial-content/package.json @@ -0,0 +1,38 @@ +{ + "name": "@triliumnext/express-partial-content", + "version": "0.0.1", + "private": true, + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "development": "./src/index.ts", + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + }, + "nx": { + "name": "express-partial-content", + "targets": { + "build": { + "executor": "@nx/js:swc", + "outputs": [ + "{options.outputPath}" + ], + "options": { + "outputPath": "packages/express-partial-content/dist", + "tsConfig": "packages/express-partial-content/tsconfig.lib.json", + "packageJson": "packages/express-partial-content/package.json", + "main": "packages/express-partial-content/src/index.ts", + "stripLeadingPaths": true + } + } + } + }, + "dependencies": { + "tslib": "^2.3.0" + } +} diff --git a/packages/express-partial-content/src/index.ts b/packages/express-partial-content/src/index.ts new file mode 100644 index 000000000..12ae1407b --- /dev/null +++ b/packages/express-partial-content/src/index.ts @@ -0,0 +1 @@ +export * from './lib/express-partial-content.js'; diff --git a/packages/express-partial-content/src/lib/express-partial-content.ts b/packages/express-partial-content/src/lib/express-partial-content.ts new file mode 100644 index 000000000..3ec992c07 --- /dev/null +++ b/packages/express-partial-content/src/lib/express-partial-content.ts @@ -0,0 +1,3 @@ +export function expressPartialContent(): string { + return 'express-partial-content'; +} \ No newline at end of file diff --git a/packages/express-partial-content/tsconfig.json b/packages/express-partial-content/tsconfig.json new file mode 100644 index 000000000..c23e61c80 --- /dev/null +++ b/packages/express-partial-content/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.base.json", + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + } + ] +} diff --git a/packages/express-partial-content/tsconfig.lib.json b/packages/express-partial-content/tsconfig.lib.json new file mode 100644 index 000000000..12bcb935a --- /dev/null +++ b/packages/express-partial-content/tsconfig.lib.json @@ -0,0 +1,13 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "baseUrl": ".", + "rootDir": "src", + "outDir": "dist", + "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo", + "emitDeclarationOnly": false, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "references": [] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 947bf126d..69d5806b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -777,6 +777,12 @@ importers: specifier: ~0.5.11 version: 0.5.17 + packages/express-partial-content: + dependencies: + tslib: + specifier: ^2.3.0 + version: 2.8.1 + packages/turndown-plugin-gfm: dependencies: '@swc/helpers': diff --git a/tsconfig.json b/tsconfig.json index 0c1b0f48f..094d2a3fc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,6 +29,9 @@ }, { "path": "./apps/edit-docs" + }, + { + "path": "./packages/express-partial-content" } ] }