Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit c552e9a8 authored by Danny Lin's avatar Danny Lin
Browse files

Add TypeScript build support

parent 90561534
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
    },
    "devDependencies": {
        "@rollup/plugin-node-resolve": "^11.1.0",
        "@rollup/plugin-typescript": "^8.2.1",
        "better-docs": "^2.3.2",
        "eslint": "^7.18.0",
        "eslint-config-prettier": "^7.2.0",
+3 −2
Original line number Diff line number Diff line
import { terser } from "rollup-plugin-terser";
import { nodeResolve } from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";

export default {
    input: "lib/index.js",
    input: "src/index.js",
    output: [
        {
            file: "dist/fastboot.cjs",
@@ -27,5 +28,5 @@ export default {
            plugins: [terser()],
        },
    ],
    plugins: [nodeResolve()],
    plugins: [nodeResolve(), typescript()],
};

tsconfig.json

0 → 100644
+15 −0
Original line number Diff line number Diff line
{
    "compilerOptions": {
        "target": "ES2020",
        "module": "es2020",
        "allowJs": true,
        "rootDir": "./src",
        "outDir": "./dist",
        "strict": true,
        "esModuleInterop": true,
        "skipLibCheck": true,
        "forceConsistentCasingInFileNames": true,
        "moduleResolution": "node"
    },
    "include": ["./src/**/*"]
}
+23 −0
Original line number Diff line number Diff line
@@ -235,6 +235,14 @@
    is-module "^1.0.0"
    resolve "^1.19.0"

"@rollup/plugin-typescript@^8.2.1":
  version "8.2.1"
  resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.2.1.tgz#f1a32d4030cc83432ce36a80a922280f0f0b5d44"
  integrity sha512-Qd2E1pleDR4bwyFxqbjt4eJf+wB0UKVMLc7/BAFDGVdAXQMCsD4DUv5/7/ww47BZCYxWtJqe1Lo0KVNswBJlRw==
  dependencies:
    "@rollup/pluginutils" "^3.1.0"
    resolve "^1.17.0"

"@rollup/pluginutils@^3.1.0":
  version "3.1.0"
  resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
@@ -967,6 +975,13 @@ is-core-module@^2.1.0:
  dependencies:
    has "^1.0.3"

is-core-module@^2.2.0:
  version "2.3.0"
  resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.3.0.tgz#d341652e3408bca69c4671b79a0954a3d349f887"
  integrity sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw==
  dependencies:
    has "^1.0.3"

is-expression@^3.0.0:
  version "3.0.0"
  resolved "https://registry.yarnpkg.com/is-expression/-/is-expression-3.0.0.tgz#39acaa6be7fd1f3471dc42c7416e61c24317ac9f"
@@ -1560,6 +1575,14 @@ resolve@^1.1.6, resolve@^1.19.0:
    is-core-module "^2.1.0"
    path-parse "^1.0.6"

resolve@^1.17.0:
  version "1.20.0"
  resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
  integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
  dependencies:
    is-core-module "^2.2.0"
    path-parse "^1.0.6"

right-align@^0.1.1:
  version "0.1.3"
  resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"