Skip to content

An A-Frame 1.3.0 boilerplate with Typescript, ESLint, and Webpack.

License

Notifications You must be signed in to change notification settings

PlinioDeVos/A-FRAME-TS-BOILERPLATE

Repository files navigation

A-FRAME-TS-BOILERPLATE

An A-Frame 1.3.0 boilerplate with Typescript, ESLint, and Webpack.

Hello World

Setup

To get started, you can fork this repository or use the 'Use this template' button up top.

After you have forked this repository, you can clone your fork locally and get it ready by following this example:

git clone https://github.com/PlinioDeVos/A-FRAME-TS-BOILERPLATE.git
cd A-FRAME-TS-BOILERPLATE
npm install

Commands

Development server

To start the Webpack development server, enter the following command in the terminal:

npm run start

If you'd like to change the server settings then you must modify devServer in webpack.config.js.

Bundling

To create the bundle file, you can enter the following command in the terminal:

npm run bundle

By default everything in main.ts will be bundled and placed in docs > scripts as bundle.js.
Every A-Frame component should be placed in the components folder, these will be bundled as well.

If you'd like to change bundle behaviour then you must modify the webpack.config.js file.

Linter

To run Typescript ESLint, enter the following command in the terminal:

npm run lint

Rules

You can find all the rules here and add/remove them in the .eslintrc.cjs file.

Ignoring files

To make ESLint ignore files you must add them in the .eslintignore file.

Hosting

This boilerplate is made in such a way that it can easily be hosted by making use of GitHub Pages.

License

This boilerplate is free software and is distributed under an MIT License.

About

An A-Frame 1.3.0 boilerplate with Typescript, ESLint, and Webpack.

Topics

Resources

License

Stars

Watchers

Forks