{"name":"@marijn/buildtool","version":"0.1.6","author":{"url":"http://marijnhaverbeke.nl","name":"Marijn Haverbeke","email":"marijn@haverbeke.berlin"},"license":"MIT","_id":"@marijn/buildtool@0.1.6","maintainers":[{"name":"marijn","email":"marijn@haverbeke.berlin"}],"homepage":"https://github.com/marijnh/buildtool#readme","bugs":{"url":"https://github.com/marijnh/buildtool/issues"},"dist":{"shasum":"56eebfa82397c81b89ffa08f30eb1e960666cd33","tarball":"http://registry-npm.ywwl.com/@marijn/buildtool/download/@marijn/buildtool-0.1.6.tgz","fileCount":8,"integrity":"sha512-rcA2wljsM24MFAwx2U5vSBrt7IdIaPh4WPRfJPS8PuCUlbuQ8Pmky4c/ec00v3YFu90rZSbkVLnPuCeb/mUEng==","signatures":[{"sig":"MEUCIQCAnel2jfHLkTQ6S46a+qbiA79K809S99tRSSwJzQM1pwIgHPQF6wKMShanFEHAQ3Bs4kTzOiAvR632uDLyW2vYMnk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32170,"size":8401,"noattachment":false,"key":"/@marijn/buildtool/-/@marijn/buildtool-0.1.6.tgz"},"main":"./src/buildtool.js","gitHead":"8faab32f55885d96b1b010708750afac88af8834","scripts":{"prepare":"tsc","build-readme":"builddocs --name buildtool --main src/README.md --format markdown src/*.ts > README.md"},"_npmUser":{"name":"marijn","email":"marijn@haverbeke.berlin"},"repository":{"url":"git+https://github.com/marijnh/buildtool.git","type":"git"},"_npmVersion":"9.6.7","description":"Tool for building TypeScript packages","directories":{},"_nodeVersion":"19.7.0","dependencies":{"acorn":"^8.10.0","rollup":"^3.28.0","acorn-walk":"^8.2.0","typescript":"^5.1.6","@types/mocha":"^9.1.1","rollup-plugin-dts":"^5.3.1"},"_hasShrinkwrap":false,"devDependencies":{"builddocs":"^1.0.7","getdocs-ts":"^0.1.6","@types/node":"^14.14.33"},"_npmOperationalInternal":{"tmp":"tmp/buildtool_0.1.6_1692281422372_0.6339835804156355","host":"s3://npm-registry-packages"},"readme":"# @marijn/buildtool\n\nUtility to build TypeScript projects that conform to a given set of\nconventions quickly and cleanly. Exports functions that wrap the\nTypeScript compiler and Rollup to build or watch one or more projects\nin one go, performing a single shared build (so that files from\ndifferent projects aren't compiled twice).\n\nAssumes your projects are set up like this:\n\n - TypeScript files in an `src` directory, will be compiled to\n   `dist/index.js` (ES module), `dist/index.cjs` (CommonJS), and\n   `dist/index.d.ts` (TypeScript) files.\n\n - Tests, if any, under `test`, will be compiled in-place to `.js`\n   files, which are ES modules.\n\n - Doc comments prefixed with triple slash `///` syntax will be\n   converted to `/**` JSDoc comments in the output, so that TypeScript\n   tooling picks them up.\n\n## API\n\n * **`build`**`(main: string | readonly string[], options?: BuildOptions = {}) → Promise`\\\n   Build the package with main entry point `main`, or the set of\n   packages with the given entry point files. Output files will be\n   written to the `dist` directory one level up from the entry file.\n   Any TypeScript files in a `test` directory one level up from main\n   files will be built in-place.\n\n\n * **`watch`**`(mains: readonly string[], extra?: readonly string[] = [], options?: BuildOptions = {})`\\\n   Build the given packages, along with an optional set of extra\n   files, and keep rebuilding them every time an input file changes.\n\n\n### interface BuildOptions\n\nOptions passed to `build` or `watch`.\n\n * **`typeCheck`**`?: boolean`\\\n   Fail the build on type errors. defaults to false\n\n * **`sourceMap`**`?: boolean`\\\n   Generate sourcemap when generating bundle. defaults to false\n\n * **`tsOptions`**`?: any`\\\n   Additional compiler options to pass to TypeScript.\n\n * **`bundleName`**`?: string`\\\n   Base filename to use for the output bundle and declaration\n   files. Defaults to `\"index\"`.\n\n * **`expandLink`**`?: fn(anchor: string) → string | null`\\\n   When given, this is used to convert anchor links in the `///`\n   comments to full URLs.\n\n * **`expandRootLink`**`?: string`\\\n   When given, prefix this to links in the comments that start with\n   a `/`.\n\n * **`outputPlugin`**`?: fn(root: string) → Plugin | Promise`\\\n   Adds a Rollup output plugin to use.\n\n * **`cjsOutputPlugin`**`?: fn(root: string) → Plugin`\\\n   Adds an output plugin to use only for CommonJS bundles.\n\n * **`pureTopCalls`**`?: boolean`\\\n   When set to true, add a `/*@__PURE__*/` comment before top level\n   function calls, so that tree shakers will consider them pure.\n   Note that this can break your code if it makes top-level\n   function calls that have side effects.\n\n * **`onRebuildStart`**`?: fn(packages: readonly string[])`\\\n   Function to call when starting a rebuild via `watch`, passing\n   the root directories of the packages that are being built. The\n   default is to just log the base names of the directories.\n\n * **`onRebuildEnd`**`?: fn(packages: readonly string[])`\\\n   Function to call when finishing a rebuild.\n\n\n## Community\n\nThis is open source software released under an\n[MIT license](https://code.haverbeke.berlin/marijn/buildtool/src/branch/main/LICENSE).\n\nDevelopment happens on\n[Forgejo](https://code.haverbeke.berlin/marijn/buildtool). Use the [bug\ntracker](https://code.haverbeke.berlin/marijn/buildtool/issues) to report\nproblems.\n\n","publish_time":1692281422526,"_cnpm_publish_time":1692281422526,"dist-tags":{"latest":"1.2.1"}}