├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ └── main.yml ├── .gitignore ├── .prettierrc ├── CHANGELOG.md ├── LICENSE ├── README.md ├── example ├── package.json ├── src │ └── index.ts ├── tsconfig.build.json ├── tsconfig.dev.json ├── tsconfig.json └── yarn.lock ├── jest.config.js ├── lask.config.json ├── package.json ├── src ├── __tests__ │ ├── build.test.ts │ ├── cli.test.ts │ └── dev.test.ts ├── buildLibrary.ts ├── cli.ts ├── devLibrary.ts ├── index.ts └── lask.ts ├── tsconfig.build.json ├── tsconfig.dev.json ├── tsconfig.json ├── tsconfig.tsbuildinfo └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # @format 2 | 3 | github: [steveruizok] 4 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # @format 2 | 3 | name: CI 4 | on: push 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | # install modules 11 | - name: Install modules 12 | run: yarn 13 | # build 14 | - name: Build Packages 15 | run: yarn build 16 | # run unit tests 17 | - name: Jest Annotations & Coverage 18 | run: yarn test:ci 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/dist 2 | **/.DS_Store 3 | 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | 11 | # Runtime data 12 | pids 13 | *.pid 14 | *.seed 15 | *.pid.lock 16 | 17 | # Directory for instrumented libs generated by jscoverage/JSCover 18 | lib-cov 19 | 20 | # Coverage directory used by tools like istanbul 21 | coverage 22 | 23 | # nyc test coverage 24 | .nyc_output 25 | 26 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 27 | .grunt 28 | 29 | # Bower dependency directory (https://bower.io/) 30 | bower_components 31 | 32 | # node-waf configuration 33 | .lock-wscript 34 | 35 | # Compiled binary addons (https://nodejs.org/api/addons.html) 36 | build/Release 37 | 38 | # Dependency directories 39 | node_modules/ 40 | jspm_packages/ 41 | 42 | # TypeScript v1 declaration files 43 | typings/ 44 | 45 | # Optional npm cache directory 46 | .npm 47 | 48 | # Optional eslint cache 49 | .eslintcache 50 | 51 | # Optional REPL history 52 | .node_repl_history 53 | 54 | # Output of 'npm pack' 55 | *.tgz 56 | 57 | # Yarn Integrity file 58 | .yarn-integrity 59 | 60 | # dotenv environment variables file 61 | .env 62 | 63 | # parcel-bundler cache (https://parceljs.org/) 64 | .cache 65 | 66 | # next.js build output 67 | .next 68 | 69 | # nuxt.js build output 70 | .nuxt 71 | 72 | # vuepress build output 73 | .vuepress/dist 74 | 75 | # Serverless directories 76 | .serverless 77 | 78 | # FuseBox cache 79 | .fusebox/ 80 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "singleQuote": true, 4 | "semi": false, 5 | "printWidth": 100, 6 | "tabWidth": 2 7 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## 0.0.16 4 | 5 | - Improve errors during dev. 6 | 7 | ## 0.0.15 8 | 9 | - Fix paths handling, remove logs. 10 | 11 | ## 0.0.11 12 | 13 | - Fix paths handling. 14 | 15 | ## 0.0.8 16 | 17 | - Fix paths detection. 18 | 19 | ## 0.0.8 20 | 21 | - Improve paths detection. 22 | 23 | ## 0.0.7 24 | 25 | - Fix type output. 26 | 27 | ## 0.0.6 28 | 29 | - Fix dependencies. 30 | 31 | ## 0.0.4 32 | 33 | - Simplify dependencies. 34 | 35 | ## 0.0.4 36 | 37 | - Add Github repo to package.json. 38 | 39 | ## 0.0.3 40 | 41 | - Add `outDir` option. 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Steve Ruiz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # lask 4 | 5 | `lask` is a build tool for TypeScript libraries. It uses esbuild to build and bundle code and tsc to generate types. It is pretty opinionated. You might use it as a reference for building your own mini build tool. 6 | 7 | ## Installation 8 | 9 | ```bash 10 | npm install lask --dev 11 | ``` 12 | 13 | or 14 | 15 | ```bash 16 | yarn add lask --dev 17 | ``` 18 | 19 | ## Usage 20 | 21 | - Install `lask` to your project's `devDependencies`. 22 | - Run `yarn lask` to build your project, or `yarn lask -d` to start your project in development mode. 23 | 24 | If you like what you get, add `lask` to your `package.json`'s `scripts` section: 25 | 26 | ```json 27 | { 28 | "scripts": { 29 | "build": "lask", 30 | "dev": "lask -d", 31 | "test": "lask test" 32 | } 33 | } 34 | ``` 35 | 36 | ### Configuration 37 | 38 | By default, `lask` expects your root directory to have: 39 | 40 | - source code in the `src` directory 41 | - output in the `dist` directory 42 | - a `tsconfig.json` file in the root directory 43 | - a `tsconfig.dev.json` file in the root directory 44 | - a `tsconfig.build.json` file in the root directory 45 | - a `package.json` with the following fields: 46 | 47 | You can configure `lask` by creating a `lask.config.json` (sorry) in your project's root directory. 48 | 49 | This config can include some or all of the following properties: 50 | 51 | ```ts 52 | interface Options { 53 | isDev: boolean 54 | isNode: boolean 55 | entryPoints: string[] 56 | outDir: string 57 | clean: boolean 58 | external: { 59 | dependencies: boolean 60 | devDependencies: boolean 61 | peerDependencies: boolean 62 | } 63 | target: string 64 | format: 'esm' | 'cjs' | ('esm' | 'cjs')[] 65 | devFormat: 'esm' | 'cjs' 66 | devConfig: string 67 | buildConfig: string 68 | define: { [key: string]: string } 69 | calculateSize: boolean 70 | } 71 | ``` 72 | 73 | For example: 74 | 75 | ```json 76 | { 77 | "isNode": true, 78 | "entryPoints": ["./src/index.ts"], 79 | "clean": true, 80 | "outDir": "dist", 81 | "external": { 82 | "dependencies": true, 83 | "devDependencies": true, 84 | "peerDependencies": true 85 | }, 86 | "devConfig": "tsconfig.dev.json", 87 | "buildConfig": "tsconfig.build.json", 88 | "format": ["cjs", "esm"], 89 | "calculateSize": true 90 | } 91 | ``` 92 | 93 | ### `isNode` 94 | 95 | Whether to build / develop for node, rather than neutral JavaScript. 96 | 97 | ### `outDir` 98 | 99 | Where to place the output files. By default, this is `dist`. This means that your `package.json` should look like: 100 | 101 | ```json 102 | "main": "./dist/index.js", 103 | "module": "./dist/index.mjs", 104 | "types": "./dist/index.d.ts", 105 | "source": "./src/index.ts", 106 | ``` 107 | 108 | If you set a different value for `outDir`, be sure to also update those fields in your `package.json`. 109 | 110 | ### `buildConfig` 111 | 112 | The location of the `tsconfig` file to use for `lask`. Defaults to `tsconfig.build.json`. 113 | 114 | ### `devConfig` 115 | 116 | The location of the `tsconfig` file to use for `lask -d`. Defaults to `tsconfig.dev.json`. 117 | 118 | ### `clean` 119 | 120 | Whether to remove the `dist` folder before building. Defaults to `true`. 121 | 122 | ### `external` 123 | 124 | By default, all three options here are set to `true`, which means that `lask` will **exclude** all dependencies / peerDependencies / devDependencies from the bundled output. 125 | 126 | #### `define` 127 | 128 | Passed to esbuild's `define` option. By default, `define` is set to either `{ "process.env.NODE_ENV": "production" }` or `{ "process.env.NODE_ENV": "development" }` depending on the `isDev` option. 129 | 130 | ### `format` 131 | 132 | Whether to build to `"esm"`, `"cjs"`, or `["cjs", "esm"]`. Defaults to `["cjs", "esm"]`. 133 | 134 | ### `calculateSize` 135 | 136 | Whether to calculate the size of the output for each format. Defaults to `true`. 137 | 138 | ## Troubleshooting 139 | 140 | ### Path aliases aren't being converted? 141 | 142 | Be sure that the `outDir` in your `tsconfig.json` (or `tsconfig.build.json`, etc.) is pointing to the correct folder. If you're outputting types to `./dist` but your `tsconfig.json` has an `outDir` set to `./dist/types`, the conversion won't work. 143 | 144 | ## License 145 | 146 | This project is MIT licensed. 147 | 148 | ## Author 149 | 150 | - Steve Ruiz ([Github](https://github.com/steveruizok) / [Twitter](https://twitter.com/steveruizok)) 151 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.0.0", 4 | "private": true, 5 | "main": "./dist/index.js", 6 | "module": "./dist/index.mjs", 7 | "types": "./dist/index.d.ts", 8 | "source": "./src/index.ts", 9 | "bin": "./dist/cli.js", 10 | "files": [ 11 | "dist/**/*" 12 | ], 13 | "scripts": { 14 | "dev": "lask -d", 15 | "build": "lask", 16 | "clean": "rm -rf node_modules && rm -rf dist" 17 | }, 18 | "devDependencies": { 19 | "lask": "../" 20 | } 21 | } -------------------------------------------------------------------------------- /example/src/index.ts: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | export function greet() { 4 | return "Hello, world!" 5 | } 6 | -------------------------------------------------------------------------------- /example/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": [ 4 | "node_modules", 5 | "**/*.test.tsx", 6 | "**/*.test.ts", 7 | "**/*.spec.tsx", 8 | "**/*.spec.ts", 9 | "src/test", 10 | "dist", 11 | "docs" 12 | ], 13 | "compilerOptions": { 14 | "composite": false, 15 | "incremental": false, 16 | "declaration": true, 17 | "declarationMap": true, 18 | "sourceMap": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /example/tsconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": [ 4 | "node_modules", 5 | "**/*.test.tsx", 6 | "**/*.test.ts", 7 | "**/*.spec.tsx", 8 | "**/*.spec.ts", 9 | "src/test", 10 | "dist", 11 | "docs" 12 | ], 13 | "compilerOptions": { 14 | "composite": false, 15 | "incremental": false, 16 | "declaration": true, 17 | "declarationMap": true, 18 | "sourceMap": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["src"], 3 | "exclude": ["node_modules", "dist", "docs"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "declaration": true, 7 | "declarationMap": false, 8 | "sourceMap": false, 9 | "emitDeclarationOnly": true, 10 | "allowSyntheticDefaultImports": true, 11 | "esModuleInterop": true, 12 | "experimentalDecorators": true, 13 | "forceConsistentCasingInFileNames": false, 14 | "importHelpers": true, 15 | "resolveJsonModule": true, 16 | "incremental": true, 17 | "jsx": "preserve", 18 | "lib": ["dom", "esnext"], 19 | "module": "esnext", 20 | "moduleResolution": "node", 21 | "noFallthroughCasesInSwitch": true, 22 | "noImplicitAny": true, 23 | "noImplicitReturns": true, 24 | "noUnusedLocals": false, 25 | "noUnusedParameters": false, 26 | "skipLibCheck": true, 27 | "strict": true, 28 | "strictFunctionTypes": true, 29 | "strictNullChecks": true, 30 | "stripInternal": true, 31 | "useDefineForClassFields": true, 32 | "target": "es6", 33 | "typeRoots": ["node_modules/@types", "node_modules/jest"], 34 | "types": ["node", "jest"], 35 | "outDir": "./dist", 36 | "rootDir": "src", 37 | "baseUrl": "." 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /example/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | lask@../: 6 | version "0.0.0" 7 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | module.exports = { 4 | roots: ["/src"], 5 | transform: { 6 | "^.+\\.(tsx|jsx|ts|js|mjs)?$": [ 7 | "@swc-node/jest", 8 | { 9 | dynamicImport: true, 10 | experimentalDecorators: true, 11 | emitDecoratorMetadata: true, 12 | }, 13 | ], 14 | }, 15 | testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", 16 | moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], 17 | modulePathIgnorePatterns: [ 18 | "/test/__fixtures__", 19 | "/node_modules", 20 | "/dist", 21 | ], 22 | collectCoverageFrom: ["src/**/*.ts"], 23 | } 24 | -------------------------------------------------------------------------------- /lask.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "./src/index.ts", 4 | "./src/cli.ts" 5 | ] 6 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lask", 3 | "version": "0.1.1", 4 | "private": false, 5 | "main": "./dist/index.js", 6 | "module": "./dist/index.mjs", 7 | "types": "./dist/index.d.ts", 8 | "source": "./src/index.ts", 9 | "bin": { 10 | "lask": "./dist/cli.js" 11 | }, 12 | "files": [ 13 | "dist/**/*" 14 | ], 15 | "description": "A manager for build and dev.", 16 | "author": "@steveruizok", 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/tldraw/lask.git" 20 | }, 21 | "scripts": { 22 | "dev": "ts-node ./src/cli.ts -d -n", 23 | "clean": "rm -rf node_modules && rm -rf dist", 24 | "build": "ts-node ./src/cli.ts -n", 25 | "test": "jest", 26 | "prepublish": "yarn build && yarn test" 27 | }, 28 | "dependencies": { 29 | "commander": "^2.20.0", 30 | "esbuild": "^0.14.18", 31 | "tsconfig-paths": "^3.12.0", 32 | "tsconfig-replace-paths": "^0.0.11", 33 | "zlib": "^1.0.5" 34 | }, 35 | "devDependencies": { 36 | "@swc-node/jest": "^1.4.3", 37 | "@types/jest": "^26.0.22", 38 | "@types/node": "^17.0.16", 39 | "jest": "^26.6.3", 40 | "ts-node": "^10.4.0", 41 | "tslib": "^2.3.1", 42 | "typescript": "^4.5.5" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/__tests__/build.test.ts: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | describe('The build script', () => { 4 | it.todo('Builds a package') 5 | }) 6 | -------------------------------------------------------------------------------- /src/__tests__/cli.test.ts: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | describe('The cli', () => { 4 | it.todo('Builds a package') 5 | it.todo('Develops a package') 6 | it.todo('Develops a node package') 7 | }) 8 | -------------------------------------------------------------------------------- /src/__tests__/dev.test.ts: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | describe('The dev script', () => { 4 | it.todo('Develops a package') 5 | it.todo('Develops a node package') 6 | }) 7 | -------------------------------------------------------------------------------- /src/buildLibrary.ts: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import path from 'path' 3 | import { buildSync } from 'esbuild' 4 | import { gzip } from 'zlib' 5 | import { spawn } from 'child_process' 6 | 7 | export function buildLibrary({ 8 | name, 9 | isNode, 10 | outdir, 11 | tsconfig, 12 | external, 13 | format, 14 | target, 15 | define, 16 | entryPoints, 17 | calculateSize, 18 | }: { 19 | name: string 20 | outdir: string 21 | calculateSize: boolean 22 | entryPoints: string[] 23 | isNode: boolean 24 | format: 'esm' | 'cjs' | ('esm' | 'cjs')[] 25 | target: string 26 | tsconfig: string 27 | external: string[] 28 | define: Record 29 | }) { 30 | return new Promise(async (resolve) => { 31 | const { log } = console 32 | try { 33 | let didBuild = false 34 | let didTypes = false 35 | 36 | function finish(types = false, build = false) { 37 | if (build) didBuild = true 38 | if (types) didTypes = true 39 | if (didBuild && didTypes) { 40 | log(`✔ ${name}: Build complete`) 41 | resolve() 42 | } 43 | } 44 | 45 | // Build types 46 | const ts = spawn(`tsc`, [`--project`, tsconfig, `--outDir`, outdir], { shell: true }) 47 | 48 | ts.stdout.on('data', function (data: any) { 49 | const str = data.toString() 50 | log(`✔ ${name}: ${str}`) 51 | }) 52 | 53 | ts.on('exit', () => { 54 | log(`✔ ${name}: Built types`) 55 | // Replace paths (if config / build config includes paths) 56 | const base_cfg = require(path.join(process.cwd(), 'tsconfig.json')) 57 | let cfgWithPaths = '' 58 | if (base_cfg?.compilerOptions?.paths) { 59 | cfgWithPaths = 'tsconfig.json' 60 | } else { 61 | const cfg = require(tsconfig) 62 | if (cfg?.compilerOptions?.paths) { 63 | cfgWithPaths = tsconfig 64 | } 65 | } 66 | if (cfgWithPaths) { 67 | const trp = spawn(`tsconfig-replace-paths`, [`-p`, cfgWithPaths], { shell: true }) 68 | trp.on('exit', () => { 69 | log(`✔ ${name}: Resolved paths`) 70 | finish(true) 71 | }) 72 | } else { 73 | finish(true) 74 | } 75 | }) 76 | // Build packages 77 | await Promise.all( 78 | (Array.isArray(format) ? format : [format]).map((fmt) => { 79 | const extension = fmt === 'esm' ? '.mjs' : '.js' 80 | const buildResult = buildSync({ 81 | entryPoints, 82 | outdir, 83 | tsconfig, 84 | external, 85 | define, 86 | format: fmt, 87 | platform: isNode ? 'node' : 'neutral', 88 | outExtension: { '.js': extension }, 89 | bundle: true, 90 | metafile: true, 91 | minify: false, 92 | sourcemap: true, 93 | treeShaking: true, 94 | target, 95 | }) 96 | 97 | if (calculateSize) { 98 | // Calculate the size of the output esm module (standard and zipped) 99 | fs.readFile(path.join(outdir, `index${extension}`), (_err, data) => { 100 | gzip(data, (_err, result) => { 101 | const size = Object.values(buildResult.metafile!.outputs).reduce( 102 | (acc, { bytes }) => acc + bytes, 103 | 0 104 | ) 105 | log( 106 | `✔ ${name}: Built ${fmt} package (${(size / 1000).toFixed(1)}kb / ${( 107 | result.length / 1000 108 | ).toFixed(1)}kb gzipped)` 109 | ) 110 | }) 111 | }) 112 | } 113 | }) 114 | ) 115 | 116 | finish(false, true) 117 | } catch (e) { 118 | log(`x ${name}: Build failed due to an error.`) 119 | // log(e) 120 | } 121 | }) 122 | } 123 | -------------------------------------------------------------------------------- /src/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /** @format */ 3 | 4 | import path from 'path' 5 | import fs from 'fs' 6 | import program, { Command } from 'commander' 7 | import { lask } from './lask' 8 | import type { Options } from './lask' 9 | 10 | interface CLI extends Command { 11 | dev?: boolean 12 | node?: boolean 13 | } 14 | 15 | program 16 | .version('0.0.0') 17 | .option('-d, --dev', 'Develop') 18 | .option('-n, --node', 'Node') 19 | .parse(process.argv) 20 | 21 | const cli = program as CLI 22 | 23 | const { dev, node } = cli 24 | 25 | const options = {} as Partial 26 | 27 | try { 28 | const cwd = path.join(process.cwd()) 29 | // Try to load a lask.config.json file 30 | const configPath = path.join(cwd, 'lask.config.json') 31 | if (fs.existsSync(configPath)) { 32 | const config = require(configPath) 33 | Object.assign(options, config) 34 | } 35 | 36 | Object.assign(options, { 37 | isNode: options.isNode ?? node ?? false, 38 | isDev: options.isDev ?? dev ?? false, 39 | }) 40 | } catch (e) { 41 | // No config, noop 42 | } 43 | 44 | lask(options) 45 | -------------------------------------------------------------------------------- /src/devLibrary.ts: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | import { build, Format } from 'esbuild' 4 | import { spawn, ChildProcessWithoutNullStreams } from 'child_process' 5 | 6 | export async function devLibrary({ 7 | name, 8 | isNode, 9 | outdir, 10 | tsconfig, 11 | external, 12 | target, 13 | define, 14 | entryPoints, 15 | }: { 16 | name: string 17 | outdir: string 18 | calculateSize: boolean 19 | entryPoints: string[] 20 | isNode: boolean 21 | tsconfig: string 22 | external: string[] 23 | format: 'esm' | 'cjs' 24 | target: string 25 | define: Record 26 | }) { 27 | const { log } = console 28 | 29 | log(`‣ ${name}: Starting watch mode`) 30 | 31 | const ts = spawn(`tsc`, [`-w`, `--project`, tsconfig, `--pretty`, `--preserveWatchOutput`], { 32 | shell: true, 33 | }) 34 | 35 | const errRegex = /error(.*)TS/g 36 | const cleanRegex = /Found 0 errors\./g 37 | 38 | let hasError = false 39 | 40 | ts.stdout.on('data', function (data: any) { 41 | const str = data.toString() 42 | if (errRegex.test(str)) { 43 | hasError = true 44 | log(`‣ ${name}: ${str}`) 45 | } else if (cleanRegex.test(str) && hasError) { 46 | log(`‣ ${name}: TypeScript errors fixed.`) 47 | } 48 | }) 49 | 50 | try { 51 | log(`‣ ${name}: Starting incremental build`) 52 | 53 | const format = ['cjs', 'esm'] 54 | 55 | // Build packages 56 | ;(Array.isArray(format) ? format : [format]).forEach((fmt) => { 57 | const extension = fmt === 'esm' ? '.mjs' : '.js' 58 | build({ 59 | entryPoints, 60 | outdir, 61 | tsconfig, 62 | external, 63 | define, 64 | format: fmt as Format, 65 | target, 66 | platform: isNode ? 'node' : 'neutral', 67 | outExtension: { '.js': extension }, 68 | minify: false, 69 | bundle: true, 70 | treeShaking: true, 71 | metafile: true, 72 | sourcemap: true, 73 | incremental: true, 74 | watch: { 75 | onRebuild(err) { 76 | if (err) { 77 | throw Error(`${name}: Rebuild failed`) 78 | } 79 | log(`✔ ${name}: Rebuilt package`) 80 | }, 81 | }, 82 | }) 83 | }) 84 | } catch (err) { 85 | ts?.kill() 86 | process.exit(1) 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | export * from './lask' 4 | -------------------------------------------------------------------------------- /src/lask.ts: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | import fs from 'fs' 4 | import path from 'path' 5 | import { buildLibrary } from './buildLibrary' 6 | import { devLibrary } from './devLibrary' 7 | 8 | export interface Options { 9 | isDev: boolean 10 | isNode: boolean 11 | entryPoints: string[] 12 | clean: boolean 13 | outDir: string 14 | external: { 15 | dependencies: boolean 16 | devDependencies: boolean 17 | peerDependencies: boolean 18 | } 19 | target: string 20 | format: 'esm' | 'cjs' | ('esm' | 'cjs')[] 21 | devFormat: 'esm' | 'cjs' 22 | devConfig: string 23 | buildConfig: string 24 | define: { [key: string]: string } 25 | calculateSize: boolean 26 | } 27 | 28 | export async function lask(opts = {} as Partial) { 29 | const { 30 | isDev = false, 31 | isNode = false, 32 | entryPoints = ['src/index.ts'], 33 | clean = true, 34 | devConfig = 'tsconfig.dev.json', 35 | buildConfig = 'tsconfig.build.json', 36 | devFormat = 'esm', 37 | format = ['cjs', 'esm'], 38 | target = 'es6', 39 | outDir = 'dist', 40 | external = { 41 | dependencies: true, 42 | devDependencies: true, 43 | peerDependencies: true, 44 | }, 45 | define = { 46 | 'process.env.NODE_ENV': isDev ? '"development"' : '"production"', 47 | }, 48 | calculateSize = true, 49 | } = opts 50 | 51 | const cwd = process.cwd() 52 | const pkg = require(path.join(cwd, 'package.json')) 53 | 54 | // Collect externals from package 55 | const externals = [ 56 | ...(external.dependencies ? Object.keys(pkg.dependencies ?? {}) : []), 57 | ...(external.devDependencies ? Object.keys(pkg.devDependencies ?? {}) : []), 58 | ...(external.peerDependencies ? Object.keys(pkg.peerDependencies ?? {}) : []), 59 | ] 60 | 61 | // Absolute path to out directory 62 | const outDirAbs = path.join(cwd, outDir) 63 | 64 | // Absolute path to config 65 | let configAbs = path.join(cwd, isDev ? devConfig : buildConfig) 66 | if (!fs.existsSync(configAbs)) { 67 | const { log } = console 68 | log( 69 | `‣ ${pkg.name}: Could not find ${isDev ? 'dev' : 'build'} config file (${ 70 | isDev ? devConfig : buildConfig 71 | }), using tsconfig.json.` 72 | ) 73 | configAbs = path.join(cwd, 'tsconfig.json') 74 | } 75 | 76 | // Absolute paths to entry points 77 | const entryPointsAbs = entryPoints.map((entryPoint) => path.join(cwd, entryPoint)) 78 | 79 | if (isDev) { 80 | await buildLibrary({ 81 | name: pkg.name, 82 | outdir: outDirAbs, 83 | tsconfig: configAbs, 84 | external: externals, 85 | entryPoints: entryPointsAbs, 86 | format, 87 | target, 88 | isNode, 89 | define, 90 | calculateSize, 91 | }) 92 | 93 | return devLibrary({ 94 | name: pkg.name, 95 | outdir: outDirAbs, 96 | tsconfig: configAbs, 97 | external: externals, 98 | format: devFormat, 99 | target, 100 | entryPoints: entryPointsAbs, 101 | isNode, 102 | define, 103 | calculateSize, 104 | }) 105 | } else { 106 | // Delete dist 107 | if (clean) { 108 | if (fs.existsSync(outDirAbs)) { 109 | fs.rmSync(outDirAbs, { recursive: true }) 110 | } 111 | } 112 | 113 | return buildLibrary({ 114 | name: pkg.name, 115 | outdir: outDirAbs, 116 | tsconfig: configAbs, 117 | external: externals, 118 | entryPoints: entryPointsAbs, 119 | format, 120 | target, 121 | isNode, 122 | define, 123 | calculateSize, 124 | }) 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src/**/*"], 4 | "exclude": [ 5 | "node_modules", 6 | "**/*.test.tsx", 7 | "**/*.test.ts", 8 | "**/*.spec.tsx", 9 | "**/*.spec.ts", 10 | "src/test", 11 | "dist", 12 | "docs" 13 | ], 14 | "compilerOptions": { 15 | "composite": false, 16 | "incremental": false, 17 | "declaration": true, 18 | "declarationMap": true, 19 | "emitDeclarationOnly": true, 20 | "sourceMap": true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tsconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["src/**/*"], 4 | "exclude": [ 5 | "node_modules", 6 | "**/*.test.tsx", 7 | "**/*.test.ts", 8 | "**/*.spec.tsx", 9 | "**/*.spec.ts", 10 | "src/test", 11 | "dist", 12 | "docs" 13 | ], 14 | "compilerOptions": { 15 | "composite": false, 16 | "incremental": false, 17 | "declaration": true, 18 | "declarationMap": true, 19 | "emitDeclarationOnly": true, 20 | "sourceMap": true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["src"], 3 | "exclude": ["node_modules", "dist", "docs"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "declaration": true, 7 | "declarationMap": false, 8 | "sourceMap": false, 9 | "emitDeclarationOnly": true, 10 | "allowSyntheticDefaultImports": true, 11 | "esModuleInterop": true, 12 | "experimentalDecorators": true, 13 | "forceConsistentCasingInFileNames": false, 14 | "importHelpers": true, 15 | "resolveJsonModule": true, 16 | "incremental": true, 17 | "jsx": "preserve", 18 | "lib": ["dom", "esnext"], 19 | "module": "esnext", 20 | "moduleResolution": "node", 21 | "noFallthroughCasesInSwitch": true, 22 | "noImplicitAny": true, 23 | "noImplicitReturns": true, 24 | "noUnusedLocals": false, 25 | "noUnusedParameters": false, 26 | "skipLibCheck": true, 27 | "strict": true, 28 | "strictFunctionTypes": true, 29 | "strictNullChecks": true, 30 | "stripInternal": true, 31 | "useDefineForClassFields": true, 32 | "target": "es6", 33 | "typeRoots": ["node_modules/@types", "node_modules/jest"], 34 | "types": ["node", "jest"], 35 | "outDir": "./dist", 36 | "rootDir": "src", 37 | "baseUrl": "." 38 | }, 39 | "ts-node": { 40 | "transpileOnly": true, 41 | "compilerOptions": { 42 | "module": "commonjs" 43 | }, 44 | "require": ["tsconfig-paths/register"] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tsconfig.tsbuildinfo: -------------------------------------------------------------------------------- 1 | {"program":{"fileNames":["../tldraw/node_modules/typescript/lib/lib.es5.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.d.ts","../tldraw/node_modules/typescript/lib/lib.es2016.d.ts","../tldraw/node_modules/typescript/lib/lib.es2017.d.ts","../tldraw/node_modules/typescript/lib/lib.es2018.d.ts","../tldraw/node_modules/typescript/lib/lib.es2019.d.ts","../tldraw/node_modules/typescript/lib/lib.es2020.d.ts","../tldraw/node_modules/typescript/lib/lib.es2021.d.ts","../tldraw/node_modules/typescript/lib/lib.esnext.d.ts","../tldraw/node_modules/typescript/lib/lib.dom.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.core.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.collection.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.generator.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.promise.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../tldraw/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../tldraw/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../tldraw/node_modules/typescript/lib/lib.es2017.object.d.ts","../tldraw/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../tldraw/node_modules/typescript/lib/lib.es2017.string.d.ts","../tldraw/node_modules/typescript/lib/lib.es2017.intl.d.ts","../tldraw/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../tldraw/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../tldraw/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../tldraw/node_modules/typescript/lib/lib.es2018.intl.d.ts","../tldraw/node_modules/typescript/lib/lib.es2018.promise.d.ts","../tldraw/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../tldraw/node_modules/typescript/lib/lib.es2019.array.d.ts","../tldraw/node_modules/typescript/lib/lib.es2019.object.d.ts","../tldraw/node_modules/typescript/lib/lib.es2019.string.d.ts","../tldraw/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../tldraw/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../tldraw/node_modules/typescript/lib/lib.es2020.promise.d.ts","../tldraw/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../tldraw/node_modules/typescript/lib/lib.es2020.string.d.ts","../tldraw/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../tldraw/node_modules/typescript/lib/lib.es2020.intl.d.ts","../tldraw/node_modules/typescript/lib/lib.es2021.promise.d.ts","../tldraw/node_modules/typescript/lib/lib.es2021.string.d.ts","../tldraw/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../tldraw/node_modules/typescript/lib/lib.es2021.intl.d.ts","../tldraw/node_modules/typescript/lib/lib.esnext.intl.d.ts","./node_modules/tslib/tslib.d.ts","./node_modules/esbuild/lib/main.d.ts","./src/buildlibrary.ts","./node_modules/commander/typings/index.d.ts","./src/devlibrary.ts","./src/lask.ts","./src/cli.ts","./src/index.ts","./src/__tests__/build.test.ts","./src/__tests__/cli.test.ts","./src/__tests__/dev.test.ts","./node_modules/@types/node/assert.d.ts","./node_modules/@types/node/assert/strict.d.ts","./node_modules/@types/node/globals.d.ts","./node_modules/@types/node/async_hooks.d.ts","./node_modules/@types/node/buffer.d.ts","./node_modules/@types/node/child_process.d.ts","./node_modules/@types/node/cluster.d.ts","./node_modules/@types/node/console.d.ts","./node_modules/@types/node/constants.d.ts","./node_modules/@types/node/crypto.d.ts","./node_modules/@types/node/dgram.d.ts","./node_modules/@types/node/diagnostics_channel.d.ts","./node_modules/@types/node/dns.d.ts","./node_modules/@types/node/dns/promises.d.ts","./node_modules/@types/node/domain.d.ts","./node_modules/@types/node/events.d.ts","./node_modules/@types/node/fs.d.ts","./node_modules/@types/node/fs/promises.d.ts","./node_modules/@types/node/http.d.ts","./node_modules/@types/node/http2.d.ts","./node_modules/@types/node/https.d.ts","./node_modules/@types/node/inspector.d.ts","./node_modules/@types/node/module.d.ts","./node_modules/@types/node/net.d.ts","./node_modules/@types/node/os.d.ts","./node_modules/@types/node/path.d.ts","./node_modules/@types/node/perf_hooks.d.ts","./node_modules/@types/node/process.d.ts","./node_modules/@types/node/punycode.d.ts","./node_modules/@types/node/querystring.d.ts","./node_modules/@types/node/readline.d.ts","./node_modules/@types/node/repl.d.ts","./node_modules/@types/node/stream.d.ts","./node_modules/@types/node/stream/promises.d.ts","./node_modules/@types/node/stream/consumers.d.ts","./node_modules/@types/node/stream/web.d.ts","./node_modules/@types/node/string_decoder.d.ts","./node_modules/@types/node/timers.d.ts","./node_modules/@types/node/timers/promises.d.ts","./node_modules/@types/node/tls.d.ts","./node_modules/@types/node/trace_events.d.ts","./node_modules/@types/node/tty.d.ts","./node_modules/@types/node/url.d.ts","./node_modules/@types/node/util.d.ts","./node_modules/@types/node/v8.d.ts","./node_modules/@types/node/vm.d.ts","./node_modules/@types/node/wasi.d.ts","./node_modules/@types/node/worker_threads.d.ts","./node_modules/@types/node/zlib.d.ts","./node_modules/@types/node/globals.global.d.ts","./node_modules/@types/node/index.d.ts","./node_modules/jest-diff/build/cleanupsemantic.d.ts","./node_modules/jest-diff/build/types.d.ts","./node_modules/jest-diff/build/difflines.d.ts","./node_modules/jest-diff/build/printdiffs.d.ts","./node_modules/jest-diff/build/index.d.ts","./node_modules/pretty-format/build/types.d.ts","./node_modules/pretty-format/build/index.d.ts","./node_modules/@types/jest/index.d.ts"],"fileInfos":[{"version":"89f78430e422a0f06d13019d60d5a45b37ec2d28e67eb647f73b1b0d19a46b72","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","2cc028cd0bdb35b1b5eb723d84666a255933fffbea607f72cbd0c7c7b4bee144",{"version":"abba1071bfd89e55e88a054b0c851ea3e8a494c340d0f3fab19eb18f6afb0c9e","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"4378fc8122ec9d1a685b01eb66c46f62aba6b239ca7228bb6483bcf8259ee493","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"d071129cba6a5f2700be09c86c07ad2791ab67d4e5ed1eb301d6746c62745ea4","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},{"version":"10bbdc1981b8d9310ee75bfac28ee0477bb2353e8529da8cff7cb26c409cb5e8","affectsGlobalScope":true},"12f4cfe2fe60b810c3174537bc2ddb20c1067b7768643d12cb1266fd183afb75","92fba431c27422a033cf9a92e85fe23995641ee296f2f477f8e1a8f11d4ceab3","a1c63f2141f1529753057410ed9c3d6386958e97a9ed2ce1e8d8199f14d6e479","ce0594a0432dce2f4e9f6130d538a52d6292ca323e729b75d8e0febd9134dc65","e64d3334dcd36724ebac7246dcec98f43377590f77bd1e1c5f36f738e0c21303","05ceadc59deaec74a2bdf37c3a174049f72466ce84811380c0b1e31058078e10","fd4ccf147d525f0e729ad1a12e21568bd7668ff4249c627979b38f0ce161092e","88d7f49384b3eb913f0e595b35d86c20418994160a35eebf6fc653d4b1f2744d",{"version":"eac4e5ecbb9d3f6c54957e11ae9eb7c921212213227c7924827c49f24cc76607","affectsGlobalScope":true},{"version":"0137083603653fc42856dda57b1f70ffc0536745382cf2869d426f0953993540","affectsGlobalScope":true},{"version":"11bc53e9703cc87dc7ff6be11d11661e5b97c24003c8befd7c357080a6c349ae","affectsGlobalScope":true},"0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"c2ab70bbc7a24c42a790890739dd8a0ba9d2e15038b40dff8163a97a5d148c00","affectsGlobalScope":true},"422dbb183fdced59425ca072c8bd09efaa77ce4e2ab928ec0d8a1ce062d2a45a",{"version":"2a801b0322994c3dd7f0ef30265d19b3dd3bae6d793596879166ed6219c3da68","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","98a3ebfa494b46265634a73459050befba5da8fdc6ca0ef9b7269421780f4ff3","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","cc0b61316c4f37393f1f9595e93b673f4184e9d07f4c127165a490ec4a928668","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"7a5459efa09ea82088234e6533a203d528c594b01787fb90fba148885a36e8b6","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","ad41bb744149e92adb06eb953da195115620a3f2ad48e7d3ae04d10762dae197","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"5d0a9ea09d990b5788f867f1c79d4878f86f7384cb7dab38eecbf22f9efd063d","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"8207e7e6db9aa5fc7e61c8f17ba74cf9c115d26f51f91ee93f790815a7ea9dfb","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","00fa7ce8bc8acc560dc341bbfdf37840a8c59e6a67c9bfa3fa5f36254df35db2","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"cfe724f7c694aab65a9bdd1acb05997848c504548c9d4c71645c187a091cfa2a","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"3345c276cab0e76dda86c0fb79104ff915a4580ba0f3e440870e183b1baec476","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","e383ff72aabf294913f8c346f5da1445ae6ad525836d28efd52cbadc01a361a6","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"0c5004386ed814334d2d4abd1d8f2f0b63ea2134d5717d8fb2fb8aabc05288ef","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"9cafe917bf667f1027b2bb62e2de454ecd2119c80873ad76fc41d941089753b8","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","561eca7a381b96d6ccac6e4061e6d2ae53f5bc44203f3fd9f5b26864c32ae6e9","62ea38627e3ebab429f7616812a9394d327c2bc271003dfba985de9b4137369f","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"516a426e3960379f310107635b8f3a7e8c307c6c665080b128039d9299ec4087","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationMap":false,"emitDeclarationOnly":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitReturns":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":false,"strict":true,"strictNullChecks":true,"stripInternal":true,"target":2,"useDefineForClassFields":true},"fileIdsList":[[100,112,114],[57,100],[60,100],[61,66,100],[62,72,73,80,89,99,100],[62,63,72,80,100],[64,100],[65,66,73,81,100],[66,89,96,100],[67,69,72,80,100],[68,100],[69,70,100],[71,72,100],[72,100],[72,73,74,89,99,100],[72,73,74,89,100],[100],[75,80,89,99,100],[72,73,75,76,80,89,96,99,100],[75,77,89,96,99,100],[57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106],[72,78,100],[79,99,100],[69,72,80,89,100],[81,100],[82,100],[60,83,100],[84,98,100,104],[85,100],[86,100],[72,87,100],[87,88,100,102],[72,89,90,91,100],[89,91,100],[89,90,100],[92,100],[93,100],[72,94,95,100],[94,95,100],[66,80,89,96,100],[97,100],[80,98,100],[61,75,86,99,100],[66,100],[89,100,101],[100,102],[100,103],[61,66,72,74,83,89,99,100,102,104],[89,100,105],[100,108,109],[100,108,109,110,111],[100,113],[46,47,62,73,82,100,105],[46,49,51,73,82,100],[46,47,62,100],[46,51,100],[46,48,50,73,82,100]],"referencedMap":[[115,1],[57,2],[58,2],[60,3],[61,4],[62,5],[63,6],[64,7],[65,8],[66,9],[67,10],[68,11],[69,12],[70,12],[71,13],[72,14],[73,15],[74,16],[59,17],[106,17],[75,18],[76,19],[77,20],[107,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[49,17],[47,17],[108,17],[110,50],[112,51],[111,50],[109,17],[114,52],[113,17],[46,17],[54,17],[55,17],[56,17],[48,53],[52,54],[50,55],[53,56],[51,57],[10,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[40,17],[36,17],[37,17],[38,17],[39,17],[8,17],[44,17],[41,17],[42,17],[43,17],[1,17],[9,17],[45,17]],"exportedModulesMap":[[115,1],[57,2],[58,2],[60,3],[61,4],[62,5],[63,6],[64,7],[65,8],[66,9],[67,10],[68,11],[69,12],[70,12],[71,13],[72,14],[73,15],[74,16],[59,17],[106,17],[75,18],[76,19],[77,20],[107,21],[78,22],[79,23],[80,24],[81,25],[82,26],[83,27],[84,28],[85,29],[86,30],[87,31],[88,32],[89,33],[91,34],[90,35],[92,36],[93,37],[94,38],[95,39],[96,40],[97,41],[98,42],[99,43],[100,44],[101,45],[102,46],[103,47],[104,48],[105,49],[49,17],[47,17],[108,17],[110,50],[112,51],[111,50],[109,17],[114,52],[113,17],[46,17],[54,17],[55,17],[56,17],[48,53],[52,54],[50,55],[53,56],[51,57],[10,17],[12,17],[11,17],[2,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[19,17],[20,17],[3,17],[4,17],[24,17],[21,17],[22,17],[23,17],[25,17],[26,17],[27,17],[5,17],[28,17],[29,17],[30,17],[31,17],[6,17],[32,17],[33,17],[34,17],[35,17],[7,17],[40,17],[36,17],[37,17],[38,17],[39,17],[8,17],[44,17],[41,17],[42,17],[43,17],[1,17],[9,17],[45,17]],"semanticDiagnosticsPerFile":[115,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,59,106,75,76,77,107,78,79,80,81,82,83,84,85,86,87,88,89,91,90,92,93,94,95,96,97,98,99,100,101,102,103,104,105,49,47,108,110,112,111,109,114,113,46,54,55,56,48,52,[50,[{"file":"./src/devlibrary.ts","start":495,"length":11,"messageText":"Property 'hellsssss' does not exist on type 'String'.","category":1,"code":2339},{"file":"./src/devlibrary.ts","start":1711,"length":3,"messageText":"Cannot find name 'dir'.","category":1,"code":2304}]],53,[51,[{"file":"./src/lask.ts","start":583,"length":7,"messageText":"Property 'hello' does not exist on type 'Options'.","category":1,"code":2339}]],10,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,32,33,34,35,7,40,36,37,38,39,8,44,41,42,43,1,9,45]},"version":"4.5.5"} --------------------------------------------------------------------------------