diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 10aea616..28e494cb 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -15,7 +15,7 @@ overrides: - files: ["*/src/*.ts"] parser: "@typescript-eslint/parser" parserOptions: - project: ./tsconfig.json + project: ./fluent-*/tsconfig.json extends: - eslint:recommended - ./eslint-base.yaml diff --git a/fluent-bundle/tsconfig.json b/fluent-bundle/tsconfig.json index 5a446b00..9ea82c48 100644 --- a/fluent-bundle/tsconfig.json +++ b/fluent-bundle/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "./esm" + "outDir": "./esm", + "rootDir": "./src" }, "include": ["./src/**/*.ts"] } diff --git a/fluent-react/package.json b/fluent-react/package.json index c11200ba..72e2b040 100644 --- a/fluent-react/package.json +++ b/fluent-react/package.json @@ -41,9 +41,9 @@ "reactjs" ], "scripts": { - "build": "tsc", + "build": "tsc -p ./tsconfig.build.json", "postbuild": "rollup -c ../rollup.config.mjs --globals @fluent/sequence:FluentSequence,cached-iterable:CachedIterable,react:React,prop-types:PropTypes", - "docs": "typedoc --options ../typedoc.config.cjs", + "docs": "typedoc --options ../typedoc.config.cjs --tsconfig ./tsconfig.build.json", "test": "jest --collect-coverage" }, "engines": { diff --git a/fluent-react/tsconfig.build.json b/fluent-react/tsconfig.build.json new file mode 100644 index 00000000..5a446b00 --- /dev/null +++ b/fluent-react/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "./esm" + }, + "include": ["./src/**/*.ts"] +} diff --git a/fluent-react/tsconfig.json b/fluent-react/tsconfig.json index 5a446b00..7fcf1668 100644 --- a/fluent-react/tsconfig.json +++ b/fluent-react/tsconfig.json @@ -1,7 +1,10 @@ { - "extends": "../tsconfig.json", + "extends": "./tsconfig.build.json", "compilerOptions": { - "outDir": "./esm" - }, - "include": ["./src/**/*.ts"] + "baseUrl": ".", + "paths": { + "@fluent/bundle": ["../fluent-bundle/src/index.ts"], + "@fluent/sequence": ["../fluent-sequence/src/index.ts"] + } + } } diff --git a/fluent-sequence/package.json b/fluent-sequence/package.json index 9c227eb8..1bb35a71 100644 --- a/fluent-sequence/package.json +++ b/fluent-sequence/package.json @@ -27,9 +27,9 @@ "ftl" ], "scripts": { - "build": "tsc", + "build": "tsc -p ./tsconfig.build.json", "postbuild": "rollup -c ../rollup.config.mjs", - "docs": "typedoc --options ../typedoc.config.cjs", + "docs": "typedoc --options ../typedoc.config.cjs --tsconfig ./tsconfig.build.json", "test": "mocha 'test/*_test.js'" }, "engines": { diff --git a/fluent-sequence/tsconfig.build.json b/fluent-sequence/tsconfig.build.json new file mode 100644 index 00000000..9ea82c48 --- /dev/null +++ b/fluent-sequence/tsconfig.build.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "./esm", + "rootDir": "./src" + }, + "include": ["./src/**/*.ts"] +} diff --git a/fluent-sequence/tsconfig.json b/fluent-sequence/tsconfig.json index 5a446b00..c27fc392 100644 --- a/fluent-sequence/tsconfig.json +++ b/fluent-sequence/tsconfig.json @@ -1,7 +1,9 @@ { - "extends": "../tsconfig.json", + "extends": "./tsconfig.build.json", "compilerOptions": { - "outDir": "./esm" + "baseUrl": ".", + "paths": { + "@fluent/bundle": ["../fluent-bundle/src/index.ts"] + } }, - "include": ["./src/**/*.ts"] }