sparkar-bundler is a command-line interface (CLI) tool designed to bundle TypeScript projects specifically for use within Meta Spark Studio. It leverages `esbuild` for high-performance bundling, enabling developers to write Spark AR scripts in TypeScript while benefiting from features like IntelliSense for both Meta Spark API definitions and external Node.js modules. This tool aims to streamline the development workflow by abstracting away complex bundling configurations. Currently at version 0.3.0, it is in active development with a focus on providing a seamless experience for integrating modern JavaScript/TypeScript practices into the Spark AR ecosystem. Its primary differentiator is the specialized handling of Meta Spark API type definitions, which is crucial for developer tooling in a proprietary environment. The release cadence is currently irregular as it's an early-stage project.
npm install sparkar-bundlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates the global installation and basic command-line usage to bundle a TypeScript source file into a Meta Spark Studio project.
Always refer to the latest README or GitHub documentation for usage. Pin your CLI tool version or expect to update your workflow with new releases.
Stay informed about Meta Spark Studio updates and check the sparkar-bundler GitHub repository for compatibility notes or required updates to the bundler itself.
Report issues on the GitHub repository if IntelliSense stops working after a Meta Spark Studio update. Consider contributing updated type definitions if you identify the changes.
Ensure you install the package globally using `npm install -g sparkar-bundler`. Verify your PATH includes the global npm bin directory.
Open your Meta Spark Studio project, create a new JavaScript script (e.g., `script.js`), save the project, and ensure the script is referenced in the project's properties. Then rerun `sparkar-bundler`.
Install the missing module using `npm install module-name` and, if necessary, its type definitions with `npm install --save-dev @types/module-name`.