{"id":15762216,"url":"https://github.com/artiomtr/aqu","last_synced_at":"2025-05-08T07:42:23.831Z","repository":{"id":44818116,"uuid":"338585599","full_name":"ArtiomTr/aqu","owner":"ArtiomTr","description":"🌊 Powerful tool for easy typescript/javascript package development powered by esbuild and DTS bundle generator.","archived":false,"fork":false,"pushed_at":"2023-07-20T05:29:49.000Z","size":41774,"stargazers_count":3,"open_issues_count":11,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-29T15:04:39.691Z","etag":null,"topics":["bundle","cli","npm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArtiomTr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-13T13:53:25.000Z","updated_at":"2022-12-02T15:30:06.000Z","dependencies_parsed_at":"2024-06-19T01:54:34.430Z","dependency_job_id":"386f0529-8ad8-4247-8ae3-90a29216ea8e","html_url":"https://github.com/ArtiomTr/aqu","commit_stats":{"total_commits":66,"total_committers":3,"mean_commits":22.0,"dds":0.3939393939393939,"last_synced_commit":"95395b99f9f34f2684f64d667d73c8a2bdde8db4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtiomTr%2Faqu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtiomTr%2Faqu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtiomTr%2Faqu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtiomTr%2Faqu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArtiomTr","download_url":"https://codeload.github.com/ArtiomTr/aqu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253025320,"owners_count":21842407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle","cli","npm","typescript"],"created_at":"2024-10-04T11:07:53.506Z","updated_at":"2025-05-08T07:42:23.814Z","avatar_url":"https://github.com/ArtiomTr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/usage.gif\" width=\"540\" alt=\"Aqu usage\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\n  🌊 Aqu\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Powerful tool for easy \u003cb\u003etypescript/javascript\u003c/b\u003e package development powered by \u003ca href=\"https://github.com/evanw/esbuild#readme\"\u003eesbuild\u003c/a\u003e and \u003ca href=\"https://github.com/timocov/dts-bundle-generator#readme\"\u003eDTS bundle generator\u003c/a\u003e.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/aqu\"\u003e\n    \u003cimg  alt=\"package version\" src=\"https://img.shields.io/npm/v/aqu\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/aqu\"\u003e\n    \u003cimg alt=\"package downloads\" src=\"https://img.shields.io/npm/dw/aqu\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/aqu\"\u003e\n    \u003cimg alt=\"vulnerabilities\" src=\"https://img.shields.io/snyk/vulnerabilities/npm/aqu\"\u003e\n  \u003c/a\u003e\n  \u003ca  href=\"https://github.com/ArtiomTr/aqu/issues\"\u003e\n    \u003cimg alt=\"issues\" src=\"https://img.shields.io/github/issues/ArtiomTr/aqu\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eInstall\u003c/a\u003e → \n  \u003ca href=\"#create\"\u003eCreate package\u003c/a\u003e → \n  \u003ca href=\"#config\"\u003eCustomize\u003c/a\u003e → \n  \u003ca href=\"#develop\"\u003eDevelop\u003c/a\u003e → \n  \u003ca href=\"#publish\"\u003ePublish\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Inspiration\n\nThis package highly inspired by [TSDX](https://github.com/formium/tsdx), [Microbundle](https://github.com/developit/microbundle), [Create React Library](https://github.com/transitive-bullshit/create-react-library#readme).\n\n## ✨ Features \u003ca name=\"features\"\u003e\u003c/a\u003e\n\n- One dependency for your code bundling 📦\n- Supports vanilla JS, [TypeScript](https://github.com/microsoft/TypeScript#readme) and [React](https://github.com/facebook/react/#readme) ⚛\n- No dealing with configurations (automatically generates CJS and esm outputs) ⚙\n- Easy project creation, build, management 🔧\n- Supports different package managers - [npm](https://github.com/npm/cli#readme), [yarn](https://github.com/yarnpkg/berry#readme) and [pnpm](https://github.com/pnpm/pnpm#readme) 🚀\n- Fast, optimized builds thanks to [esbuild](https://github.com/evanw/esbuild#readme) ⏩\n- Generates types, using common emit or [dts bundle](https://github.com/timocov/dts-bundle-generator#readme)\n- Supports tree shaking 🗑\n- Automatically configures [ESLint](https://github.com/eslint/eslint#readme), [Prettier](https://github.com/prettier/prettier#readme), [Jest](https://github.com/facebook/jest#readme) 📃\n- Multiple entries and outputs 🤹‍♂️\n\n## 🔨 Installation \u003ca name=\"installation\"\u003e\u003c/a\u003e\n\nYou can create new package or integrate **aqu** into existing package. For package creation, we recommend to install aqu globally.\n\n### 🌎 Global installation: \u003ca name=\"global-installation\"\u003e\u003c/a\u003e\n\n```sh\nnpm i -g aqu\n```\n\nThen, you can create new package:\n\n```sh\naqu create \u003cpackage\u003e\n```\n\n### 🗾 Local installation:\n\n```sh\nnpm i aqu -D\n```\n\nThen, add to your `package.json`:\n\n```json\n{\n    ...\n    \"scripts\": {\n        \"build\": \"aqu build\",\n        \"start\": \"aqu watch\",\n        \"test\": \"aqu test\",\n        \"lint\": \"aqu lint\"\n    }\n}\n```\n\nBy default, **aqu** will search for `index` file in `src` or `lib` folder (available extensions: `.js`, `.jsx`, `.cjs`, `.mjs`, `.ts`, `.tsx`)\n\nIf this doesn't suit for your package, you can specify `source` property in your `package.json`:\n\n```json\n{\n    ...\n    \"source\": \"my/entry.js\"\n}\n```\n\nOr, if you want to specify multiple entrypoints, you can do it in [aqu configuration file](#configuration).\n\n## ⚒ New package \u003ca name=\"create\"\u003e\u003c/a\u003e\n\nFor creating new package, we recommend to install [aqu globally](#global-installation).\n\nIn the shell, enter the command:\n\n```sh\naqu create\n```\n\nOr using npx:\n\n```sh\nnpx aqu create\n```\n\nEnter the details about your package and pick a template. Examples of generated projects you can find [here](https://github.com/ArtiomTr/aqu/tree/master/example)\n\nIf you don't want to enter all the information, you can automatically pick all defaults, by toggling `-y` flag:\n\n```sh\nnpx aqu create \u003cpackage\u003e -y\n```\n\n## ⚙ Configuration \u003ca name=\"config\"\u003e\u003c/a\u003e\n\n**aqu** automatically creates optimal configuration for your package on-the-fly.\n\nDefault **aqu** configuration:\n\n```js\nvar defaultConfig = {\n\tformat: ['cjs', 'esm'], // will generate multiple outputs: one for cjs and one for esm\n\tcjsMode: 'mixed', // will generate separate files for development and production\n\toutdir: 'dist', // default output directory\n\tdeclaration: 'bundle', // will bundle declarations using https://github.com/timocov/dts-bundle-generator\n\texternalNodeModules: true, // automatically will mark all node_modules as external\n\ttsconfig: 'tsconfig.json', // default path to tsconfig\n\tincremental: true, // will build incrementally\n\tbuildOptions: {}, // custom esbuild options\n\twatchOptions: {\n\t\t// chokidar watch options\n\t\tignored: ['node_modules/**', 'dist/**', 'build/**', 'out/**'], // by default, will ignore those folders\n\t\tfollowSymlinks: false, // will not follow symlinks\n\t},\n};\n```\n\nFor input, **aqu** will search `index` file inside `lib` or `src` folder (available extensions for index: `.js`, `.jsx`, `.cjs`, `.mjs`, `.ts`, `.tsx`)\n\nAlso, **aqu** will read your `package.json` and take `source` option to determine entrypoint, and name for package's name.\n\nYou can specify your own **aqu** configuration. By default, these files will be read inside your working directory:\n\n1. `aqu.config.js`\n2. `aqu.config.cjs`\n3. `aqu.config.mjs`\n4. `aqu.config.ts`\n5. `aqu.config.json`\n6. `.aqurc`\n\nIf your configuration has different name, you can specify `--config` option for **aqu**. Example:\n\n```sh\naqu build --config=myconfig.js\n```\n\n### 📃 Config schema\n\nConfiguration file can export one configuration, as well as array of configurations. For example:\n\n```js\n// aqu.config.js\n\n// this works\nmodule.exports = {\n\tinput: './asdf.js',\n};\n\n// as well as this\nmodule.exports = [\n\t{\n\t\tinput: './asdf.js',\n\t},\n\t{\n\t\tinput: './hello.js',\n\t},\n];\n```\n\nAvailable configuration options:\n\n1. [name](#name)\n2. [input](#input)\n3. [outdir](#outdir)\n4. [outfile](#outfile)\n5. [format](#format)\n6. [cjsMode](#cjsMode)\n7. [declaration](#declaration)\n8. [tsconfig](#tsconfig)\n9. [incremental](#incremental)\n10. [externalNodeModules](#externalNodeModules)\n11. [buildOptions](#buildOptions)\n12. [watchOptions](#watchOptions)\n\n#### name\n\ntype: `string`\n\nSpecify custom library name. By default, **aqu** will try to load package name from `package.json` in current working directory.\n\n#### input\n\ntype: `string | string[]`\n\nYour library entrypoints. For each entrypoint **aqu** will generate output files, using this configuration. Default: `index` file in `src` or `lib` directories.\n\n#### outdir\n\ntype: `string`\n\nDirectory, where will all files be generaten. Default: `dist`\n\n#### outfile\n\ntype: `string`\n\nOutput file. Do not works when configuration should generate multiple outputs (multiple formats or multiple entrypoints or `cjsMode: \"multiple\"`)\n\n#### format\n\ntype: `Format | Format[]`\n\nOutput formats. Available formats: `cjs`, `esm`, `iife`. When `cjs` format picken, configuration option `cjsMode` works. Default `[\"cjs\", \"esm\"]` For more information about formats, see [esbuild](https://github.com/evanw/esbuild#readme).\n\n#### cjsMode\n\ntype: `\"development\" | \"production\" | \"mixed\"`\n\nCommonJS generation mode. Works only when `format` includes `cjs`. If `production` - will generate minified bundle, `development` - normal development build, `mixed` - will generate both with one entrypoint - `index.js`. Default `\"mixed\"`\n\n#### declaration\n\ntype: `DeclarationType`\n\nAlgorithm to emit declarations. Available options - `none`, `normal`, `bundle`. `none` - do not emit declarations, `normal` - default declaration emit (same as tsc does), `bundle` - generate declarations bundle using [dts-bundle-generator](https://github.com/timocov/dts-bundle-generator#readme). Default `bundle`.\n\n#### tsconfig\n\ntype: `string`\n\nPath to tsconfig. Default `join(process.cwd(), \"tsconfig.json\")`.\n\n#### incremental\n\ntype: `boolean`\n\nBuild incrementally. Default `true`. For more information, see [esbuild](https://github.com/evanw/esbuild#readme).\n\n#### externalNodeModules\n\ntype: `boolean`\n\nShould exclude node_modules packages from bundle? Default `true`.\n\n#### buildOptions\n\ntype: `ESBuildOptions`\n\nSpecify custom [esbuild options](https://esbuild.github.io/api/#simple-options).\n\n#### watchOptions\n\ntype: `ChokidarOptions`\n\nSpecify custom [chokidar watch options](https://github.com/paulmillr/chokidar#readme).\n\n### Other configurations\n\n**aqu** creates default configs for [ESLint](https://github.com/eslint/eslint#readme), [Prettier](https://github.com/prettier/prettier#readme), [Jest](https://github.com/facebook/jest#readme). If you don't like the defaults, you can create your own configuration and override all options.\n\n## 🔧 Package development \u003ca name=\"develop\"\u003e\u003c/a\u003e\n\n**aqu** makes your life easier. It automatically handles Jest, ESlint, Prettier, ESBuild and typings emit.\n\n### build\n\nRun command to build your package.\n\nUsage:\n\n```sh\naqu build\n```\n\n### watch\n\nWatch your files and automatically rebuild project\n\nUsage:\n\n```sh\naqu watch\n```\n\n### lint\n\nLint files using ESLint.\n\nUsage:\n\n```sh\naqu lint\n```\n\n### test\n\nRun jest. Passes all rest arguments to jest.\n\nUsage:\n\n```sh\naqu test.\n```\n\n## ✨ Publishing your package \u003ca name=\"publish\"\u003e\u003c/a\u003e\n\nWe highly recommend to use [np](https://github.com/sindresorhus/np#readme) for your package publishing.\n\nIf you have created your package using `aqu create`, then you can just run:\n\n```sh\nnpm run publish\n```\n\nOr\n\n```sh\nyarn publish\n```\n\n## Related\n\n- [ESBuild](https://github.com/evanw/esbuild#readme) - An extremely fast JavaScript bundler\n- [DTS Bundle generator](https://github.com/timocov/dts-bundle-generator) - Tool to generate a single bundle of dts\n- [Microbundle](https://github.com/developit/microbundle) - Zero-configuration bundler for tiny JS libs, powered by Rollup.\n- [TSDX](https://github.com/formium/tsdx) - Zero-config TypeScript package development\n- [Create React Library](https://github.com/transitive-bullshit/create-react-library#readme) - CLI for easily bootstrapping modern react libraries\n\n## License\n\nMIT © [Artiom Tretjakovas](https://github.com/ArtiomTr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartiomtr%2Faqu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartiomtr%2Faqu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartiomtr%2Faqu/lists"}