An A-Frame 1.3.0 boilerplate with Typescript, ESLint, and Webpack.
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
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
.
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.
To run Typescript ESLint, enter the following command in the terminal:
npm run lint
You can find all the rules here and add/remove them in the
.eslintrc.cjs
file.
To make ESLint ignore files you must add them in the .eslintignore
file.
This boilerplate is made in such a way that it can easily be hosted by making use of GitHub Pages.
This boilerplate is free software and is distributed under an MIT License.