{"_id":"@bycedric/ncc","name":"@bycedric/ncc","dist-tags":{"latest":"0.38.1-patch.1"},"versions":{"0.38.1-patch.1":{"name":"@bycedric/ncc","description":"Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.","version":"0.38.1-patch.1","repository":{"type":"git","url":"git+https://github.com/vercel/ncc.git"},"license":"MIT","main":"./dist/ncc/index.js","bin":{"ncc":"dist/ncc/cli.js"},"scripts":{"build":"node scripts/build.js","build-test-binary":"cd test/binary && node-gyp rebuild && cp build/Release/hello.node ../integration/hello.node","test":"node --expose-gc --max_old_space_size=4096 node_modules/jest/bin/jest.js","test-coverage":"node --expose-gc --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --globals \"{\\\"coverage\\\":true}\"","prepublishOnly":"node scripts/build.js --no-cache"},"devDependencies":{"@azure/cosmos":"^3.17.3","@bugsnag/js":"^7.21.0","@ffmpeg-installer/ffmpeg":"^1.0.17","@google-cloud/bigquery":"^5.7.0","@google-cloud/firestore":"^6.7.0","@sentry/node":"^7.66.0","@slack/web-api":"^6.9.0","@vercel/webpack-asset-relocator-loader":"1.7.3","analytics-node":"^6.2.0","apollo-server-express":"^2.2.2","arg":"^5.0.2","auth0":"^2.14.0","aws-sdk":"^2.1448.0","axios":"^0.21.1","azure-storage":"^2.10.2","browserify-middleware":"^8.1.1","bytes":"^3.1.2","canvas":"^2.11.2","chromeless":"^1.5.2","consolidate":"^0.16.0","copy":"^0.3.2","core-js":"^2.5.7","cowsay":"^1.3.1","esm":"^3.2.22","express":"^4.18.2","fetch-h2":"^3.0.2","firebase":"^7.24.0","firebase-admin":"^11.10.1","fluent-ffmpeg":"^2.1.2","fontkit":"^1.7.7","get-folder-size":"^2.0.0","glob":"^8.0.3","got":"^12.5.2","graceful-fs":"^4.2.11","graphql":"^15.5.1","hot-shots":"^8.5.0","ioredis":"^5.3.2","isomorphic-unfetch":"^4.0.2","jest":"^27.5.1","jimp":"^0.16.1","jugglingdb":"2.0.1","koa":"^2.14.2","leveldown":"^6.0.0","license-webpack-plugin":"^4.0.2","lighthouse":"^8.1.0","loopback":"^3.24.0","mailgun":"^0.5.0","mariadb":"^2.0.1-beta","memcached":"^2.2.2","memory-fs":"^0.5.0","mkdirp":"^1.0.4","mongoose":"^5.3.12","mysql":"^2.16.0","node-gyp":"^9.4.0","npm":"^6.13.4","oracledb":"^6.1.0","passport":"^0.6.0","passport-google-oauth":"^2.0.0","path-platform":"^0.11.15","pdfkit":"^0.13.0","pg":"^8.11.3","pug":"^3.0.1","react":"^17.0.2","react-dom":"^17.0.2","redis":"^3.1.1","request":"^2.88.0","rxjs":"^7.8.1","saslprep":"^1.0.2","sequelize":"^6.32.1","sharp":"^0.32.5","shebang-loader":"^0.0.1","socket.io":"^4.7.2","source-map-support":"^0.5.9","stripe":"^8.167.0","swig":"^1.4.2","terser":"^5.31.0","the-answer":"^1.0.0","tiny-json-http":"^7.5.1","ts-loader":"^9.4.4","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","twilio":"^3.23.2","typescript":"^5.2.2","vm2":"^3.9.19","vue":"^2.5.17","vue-server-renderer":"^2.5.17","web-vitals":"^0.2.4","webpack":"5.76.0","when":"^3.7.8"},"_id":"@bycedric/ncc@0.38.1-patch.1","gitHead":"453fc390b4249502c9ce32a5e464d1783443af4a","bugs":{"url":"https://github.com/vercel/ncc/issues"},"homepage":"https://github.com/vercel/ncc#readme","_nodeVersion":"20.13.1","_npmVersion":"10.7.0","dist":{"integrity":"sha512-TkqZj7wnWWQavlhHb2zsuexiYAWv3kfEz0tqta7LuzYE3ve9b/nFquEDeAWgqpLld0vYbMy46od6ovwu9Pdqsg==","shasum":"1b14c83057655471dd8e1617d20265767bd3c437","tarball":"https://registry.npmjs.org/@bycedric/ncc/-/ncc-0.38.1-patch.1.tgz","fileCount":116,"unpackedSize":16611024,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqSxYy0zKRvXpjwrqWWPtcC3rc2HE3W1iYDrXzth7CvgIgcEstLPJow8YctWrHKlVoiZnzOKygyaJMN1Jx7w4qFuE="}]},"_npmUser":{"name":"bycedric","email":"me@bycedric.com"},"directories":{},"maintainers":[{"name":"bycedric","email":"me@bycedric.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ncc_0.38.1-patch.1_1717514248794_0.40161497115318645"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-04T15:17:28.636Z","0.38.1-patch.1":"2024-06-04T15:17:29.068Z","modified":"2024-06-04T15:17:29.415Z"},"maintainers":[{"name":"bycedric","email":"me@bycedric.com"}],"description":"Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.","homepage":"https://github.com/vercel/ncc#readme","repository":{"type":"git","url":"git+https://github.com/vercel/ncc.git"},"bugs":{"url":"https://github.com/vercel/ncc/issues"},"license":"MIT","readme":"# ncc\n\n[![CI Status](https://github.com/vercel/ncc/workflows/CI/badge.svg)](https://github.com/vercel/ncc/actions?workflow=CI)\n\nSimple CLI for compiling a Node.js module into a single file,\ntogether with all its dependencies, gcc-style.\n\n## Motivation\n\n- Publish minimal packages to npm\n- Only ship relevant app code to serverless environments\n- Don't waste time configuring bundlers\n- Generally faster bootup time and less I/O overhead\n- Compiled language-like experience (e.g.: `go`)\n\n## Design goals\n\n- Zero configuration\n- TypeScript built-in\n- Only supports Node.js programs as input / output\n- Support all Node.js patterns and npm modules\n\n## Usage\n\n### Installation\n```bash\nnpm i -g @vercel/ncc\n```\n\n### Usage\n\n```bash\n$ ncc <cmd> <opts>\n```\nEg:\n```bash\n$ ncc build input.js -o dist\n```\n\nIf building an `.mjs` or `.js` module inside a `\"type\": \"module\"` [package boundary](https://nodejs.org/dist/latest-v16.x/docs/api/packages.html#packages_package_json_and_file_extensions), an ES module output will be created automatically.\n\nOutputs the Node.js compact build of `input.js` into `dist/index.js`.\n\n> Note: If the input file is using a `.cjs` extension, then so will the corresponding output file.\n> This is useful for packages that want to use `.js` files as modules in native Node.js using\n> a `\"type\": \"module\"` in the package.json file.\n\n#### Commands:\n```\n  build <input-file> [opts]\n  run <input-file> [opts]\n  cache clean|dir|size\n  help\n  version\n```\n\n#### Options:\n```\n  -o, --out [dir]          Output directory for build (defaults to dist)\n  -m, --minify             Minify output\n  -C, --no-cache           Skip build cache population\n  -s, --source-map         Generate source map\n  -a, --asset-builds       Build nested JS assets recursively, useful for\n                           when code is loaded as an asset eg for workers.\n  --no-source-map-register Skip source-map-register source map support\n  -e, --external [mod]     Skip bundling 'mod'. Can be used many times\n  -q, --quiet              Disable build summaries / non-error outputs\n  -w, --watch              Start a watched build\n  -t, --transpile-only     Use transpileOnly option with the ts-loader\n  --v8-cache               Emit a build using the v8 compile cache\n  --license [file]         Adds a file containing licensing information to the output\n  --stats-out [file]       Emit webpack stats as json to the specified output file\n  --target [es]            ECMAScript target to use for output (default: es2015)\n                           Learn more: https://webpack.js.org/configuration/target\n  -d, --debug              Show debug logs\n```\n\n### Execution Testing\n\nFor testing and debugging, a file can be built into a temporary directory and executed with full source maps support with the command:\n\n```bash\n$ ncc run input.js\n```\n\n### With TypeScript\n\nThe only requirement is to point `ncc` to `.ts` or `.tsx` files. A `tsconfig.json`\nfile is necessary. Most likely you want to indicate `es2015` support:\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"es2015\",\n    \"moduleResolution\": \"node\"\n  }\n}\n```\n\nIf typescript is found in `devDependencies`, that version will be used.\n\n### Package Support\n\nSome packages may need some extra options for ncc support in order to better work with the static analysis.\n\nSee [package-support.md](package-support.md) for some common packages and their usage with ncc.\n\n### Programmatically From Node.js\n\n```js\nrequire('@vercel/ncc')('/path/to/input', {\n  // provide a custom cache path or disable caching\n  cache: \"./custom/cache/path\" | false,\n  // externals to leave as requires of the build\n  externals: [\"externalpackage\"],\n  // directory outside of which never to emit assets\n  filterAssetBase: process.cwd(), // default\n  minify: false, // default\n  sourceMap: false, // default\n  assetBuilds: false, // default\n  sourceMapBasePrefix: '../', // default treats sources as output-relative\n  // when outputting a sourcemap, automatically include\n  // source-map-support in the output file (increases output by 32kB).\n  sourceMapRegister: true, // default\n  watch: false, // default\n  license: '', // default does not generate a license file\n  target: 'es2015', // default\n  v8cache: false, // default\n  quiet: false, // default\n  debugLog: false // default\n}).then(({ code, map, assets }) => {\n  console.log(code);\n  // Assets is an object of asset file names to { source, permissions, symlinks }\n  // expected relative to the output code (if any)\n})\n```\n\nWhen `watch: true` is set, the build object is not a promise, but has the following signature:\n\n```js\n{\n  // handler re-run on each build completion\n  // watch errors are reported on \"err\"\n  handler (({ err, code, map, assets }) => { ... })\n  // handler re-run on each rebuild start\n  rebuild (() => {})\n  // close the watcher\n  void close ();\n}\n```\n\n## Caveats\n\n- Files / assets are relocated based on a [static evaluator](https://github.com/vercel/webpack-asset-relocator-loader#how-it-works). Dynamic non-statically analyzable asset loads may not work out correctly\n","readmeFilename":"readme.md"}