Skip to content

Commit

Permalink
Local Development
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpetrarca committed May 3, 2018
1 parent 64ef6a7 commit be12446
Show file tree
Hide file tree
Showing 28 changed files with 17,286 additions and 476 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
11 changes: 11 additions & 0 deletions .eslintrc
@@ -0,0 +1,11 @@
{
"env": {
"es6": true,
"browser": true,
"node": true
},
"extends": "eslint:recommended",
"rules": {
"no-console": "off"
}
}
6 changes: 0 additions & 6 deletions .firebaserc

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 &Samhoudmedia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
79 changes: 0 additions & 79 deletions README.md
@@ -1,80 +1 @@
# WebVR Boilerplate

WebVR Boilerplate is a toolkit for WebVR creators to develop, build and deploy static WebVR experiences to the web. WebVR Boilerplate comes with a hot-reload webserver, the latest builds of [Aframe](https://github.com/aframevr/aframe/) and [Aframe Extras](https://github.com/donmccurdy/aframe-extras/) and a Webpack build pipeline that packages your content for Firebase Hosting.

___

<img align="center" width="100%" height="100%" src="https://user-images.githubusercontent.com/1003196/29487874-39d7f72e-84ce-11e7-8e53-95c122a49f6e.png">

#### _WebVR_Boilerplate Scene (Physics, Shadows and Audio support out of the box!)_

___

## Installation

git clone https://github.com/ianpetrarca/webvr_boilerplate.git
cd webvr_boilerplate
npm install

### File Structure + Descriptions
├── dist # Webpack Production build output
├── src # Source material (unminifed)
├── .firebaserc # Connects your project to Firebase Hosting
├── firebase.json # Specifies which directory to upload to Firebase
├── package.json # NPM
├── webpack.config.dev.js # Creates hot-reload server (no optimization)
└── webpack.config.prod.js # Optimizes and builds code to the ./dist folder

├── ...
├── src # Source Files
│ ├── box.js # Module for box component
│ ├── index.html # Front-End HTML + Aframe code
| ├── index.js # Webpack entry point
│ └── styles.css # CSS
└── ...

## Hot-Reload Development Server

WebVR-Boilerplate uses Webpack-Dev-Server to host a hot-reloading http server of the _./dist_ directory. This is specified in _webpack.config.dev.js_:

devServer: {
contentBase: './dist',
hot: true
}
To spin up a development site, run the following code then point a WebVR friendly browser to http://localhost:8080/

npm run dev

To view realtime updates of the Webpack compiling process go to http://localhost:8080/webpack-dev-server/.

**WebVR-Boilerplate was designed for Single-Page-Applications** and does not handle multiple html files without reconfiguring the _webpack.config.prod.js_ and _webpack.config.dev.js_ files.

## Building

To build and optimze your HTML/JS/CSS run:

npm run build

This will build your ./source folder into the ./dist directory with the specifications made in the _webpack.config.prod.js_ file.

## Deploying

WebVR-Boilerplate uses Firebase for quick and easy static-asset hosting. If you haven't already, install Firebase by running:

npm install -g firebase-tools

After installing Firebase, run _init_ and setup a hosting connection:

firebase init

The _firebase.json_ file tells Firebase Hosting to use the _./dist_ directory. Find out more about Firebase Hosting [Here](https://firebase.google.com/docs/hosting/quickstart)

Once Firebase is installed and initialized, run the following code to build and deploy your code:

npm run deploy





33 changes: 0 additions & 33 deletions dist/404.html

This file was deleted.

Binary file removed dist/audio/chordone.mp3
Binary file not shown.
Binary file removed dist/audio/chordtwo.mp3
Binary file not shown.
Binary file removed dist/audio/wel.mp3
Binary file not shown.
2 changes: 0 additions & 2 deletions dist/bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/bundle.js.map

This file was deleted.

110 changes: 0 additions & 110 deletions dist/index.html

This file was deleted.

5 changes: 0 additions & 5 deletions firebase.json

This file was deleted.

0 comments on commit be12446

Please sign in to comment.