diff --git a/package.json b/package.json index 655c9c9..eb3a8dc 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,10 @@ "scripts": { "dev": "concurrently -n web,audio npm:dev-web npm:dev-audio", "dev-web": "vite dev", - "dev-audio": "esbuild --bundle --watch ./src/lib/soundgen/index.js --outfile=./static/soundgen.bundle.js", + "dev-audio": "esbuild --bundle --watch --tsconfig=./tsconfig.soundgen.json ./src/lib/soundgen/index.js --outfile=./static/soundgen.bundle.js", "build": "concurrently -n web,audio npm:build-web npm:build-audio", "build-web": "vite build", - "build-audio": "esbuild --bundle ./src/lib/soundgen/index.js --outfile=./static/soundgen.bundle.js", + "build-audio": "esbuild --bundle --tsconfig=./tsconfig.soundgen.json ./src/lib/soundgen/index.js --outfile=./static/soundgen.bundle.js", "package": "svelte-kit package", "preview": "vite preview", "prepare": "svelte-kit sync", diff --git a/tsconfig.json b/tsconfig.json index 995fc6d..0f47472 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,9 +8,6 @@ "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, - "strict": true, - "lib": [ - "esnext" - ] + "strict": true } } diff --git a/tsconfig.soundgen.json b/tsconfig.soundgen.json new file mode 100644 index 0000000..5225049 --- /dev/null +++ b/tsconfig.soundgen.json @@ -0,0 +1,42 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "baseUrl": ".", + "paths": { + "$lib": [ + "src/lib" + ], + "$lib/*": [ + "src/lib/*" + ] + }, + "rootDirs": [ + "." + ], + "importsNotUsedAsValues": "error", + "isolatedModules": true, + "preserveValueImports": true, + "lib": [ + "esnext", + "DOM" + ], + "moduleResolution": "node", + "module": "esnext", + "target": "esnext" + }, + "include": [ + "./src/**/*.js", + "./src/**/*.ts", + "./src/**/*.svelte" + ], + "exclude": [ + "./node_modules/**" + ] +}