A command-line tool for building, managing, and publishing A-Frame scenes.
npm install aframe-cliA command-line tool for building, managing, and publishing A-Frame scenes.
> ⚠ NOTE:️ This is not meant to be used just yet. This is a WIP!
> _TODO: Upstream changes to angle._
``sh`
npm install -g aframe-cli
aframe
To get a list of all commands and options:
`sh`
aframe --help
#### aframe new
To create a new A-Frame scene in the working directory:
`sh`
aframe new
To create a new A-Frame scene in a different directory:
`sh`
aframe new my-project-directory
To bootstrap a new A-Frame scene from a boilerplate template:
`sh`
aframe new my-project-directory --template default
From a GitHub repository (such as aframevr/aframe-default-template):
`sh`
aframe new my-project-directory --template aframevr/aframe-default-template
#### aframe build
To build the static files (i.e., HTML/CSS/JS) for your A-Frame scene in the working directory:
`sh`
aframe build
The files will be written to the .public directory, by default, in your A-Frame project's working directory (you can override the paths.public value in your own custom Brunch config file). This default Brunch config file will be used if a brunch-config.js file does not exist and the --config flag is not passed when calling aframe build).
For other options, refer to the usage information returned from aframe serve --help:
`
Command: aframe build
Usage: build|b [options] [path]
Build an A-Frame project in path (default: current directory).
Options:
-h, --help output usage information
-e, --env [setting] specify a set of override settings to apply
-p, --production same as --env production`
-d, --debug [pattern] print verbose debug output to stdout
-j, --jobs [num] parallelize the build
-c, --config [path] specify a path to Brunch config file
#### aframe serve
To start a local development server for your A-Frame scene from your project's directory:
`sh`
aframe serve
The server (which defaults to listening on port 3333) you can now load here: http://localhost:3333/
To create an A-Frame scene in a different directory:
`sh`
aframe serve my-project-directory
To run in the production mode (how your site would look when published and deployed online):
`sh`
aframe serve my-project-directory --production
To change the server port, for example, to 8080:
`sh`
aframe serve -P 8080
For other options, refer to the usage information returned from aframe serve --help:
`
Command: aframe serve
Usage: serve|s [options] [path]
Serve an A-Frame project in path (default: current directory).
Options:
-h, --help output usage information
-e, --env [setting] specify a set of override settings to apply
-p, --production same as --env productionserver
-s, --server run a simple HTTP server for the public directory on localhost
-n, --network if was given, allow access from the networkserver
-P, --port [port] if was given, listen on this port`
-d, --debug [pattern] print verbose debug output to stdout
-j, --jobs [num] parallelize the build
-c, --config [path] specify a path to Brunch config file
--stdin listen to stdin and exit when stdin closes
#### aframe install
Install a component from the A-Frame Registry to an HTML file. This will detect the A-Frame version from your HTML file and install the appropriate version of the component as a