sparkar-bundler

0.3.0 • Public • Published

Spark AR Bundler

Bundler TypeScript for Meta Spark Studio based on esbuild. This tool resolve the type definition of Meta Spark API, so the IntelliSense (VSCode) will works for both Meta Spark API and node modules.

Usage

  1. Install this package with npm globally:

    npm i -g sparkar-bundler
  2. Create a empty project → Save it → Create a JavaScript → REMEMBER TO SAVE

  3. Open terminal in your target Meta Spark project:

    ~/myProject> sparkar-bundler
  4. The command line tool will guide you select a script target for outputting the bundled result.

  5. If everything is ready, you will see hello, world printed in Meta Spark Studio.

Project File Structure

This bundler support two types of project structure:

sparkar-project/
├── sparkar-project.arproj
├── scripts/
│   └── script.js
├── src/
│   └── main.ts
└── ...  

▲ This is the default structure when File→Save a new project in Meta Spark Studio.

node-project/
├── src/
│   └── main.ts
└── sparkar-project/
    ├── sparkar-project.arproj
    ├── scripts/
    │   └── script.js
    └── ...  

▲ This is the structure that wrapped the sparkar project with a parent directory, it's useful when you want to separate the spark ar project from the source code.

The ./src/main.ts will be generated by bundler if it not existed when first build.

Package Sidebar

Install

npm i sparkar-bundler

Weekly Downloads

1

Version

0.3.0

License

MIT

Unpacked Size

1.49 MB

Total Files

5

Last publish

Collaborators

  • pofulu