https://github.com/develephant/corona-html5-builder
A CLI tool to easily build, watch, and debug your Corona HTML5 projects.
https://github.com/develephant/corona-html5-builder
applications build cli corona corona-sdk coronasdk games html5 nodejs watcher
Last synced: about 1 year ago
JSON representation
A CLI tool to easily build, watch, and debug your Corona HTML5 projects.
- Host: GitHub
- URL: https://github.com/develephant/corona-html5-builder
- Owner: develephant
- License: apache-2.0
- Created: 2018-04-01T04:16:01.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T20:55:10.000Z (about 8 years ago)
- Last Synced: 2025-03-11T00:33:54.939Z (over 1 year ago)
- Topics: applications, build, cli, corona, corona-sdk, coronasdk, games, html5, nodejs, watcher
- Language: JavaScript
- Homepage:
- Size: 200 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Corona HTML5 Builder
___A CLI tool to easily build, watch, and debug your Corona HTML5 projects.___
## Requirements
You will need __[NodeJS](https://nodejs.org/en/download/)__ installed for _macOS_ or _Windows_.
## Installation
```
npm install -g @develephant/corona-html5-builder
```
The CLI will available globally via command line as `coronahtml5`.
### Screencast
[Click here to watch a screencast overview.](https://www.youtube.com/watch?v=pcc0OQC2FG0)
## Usage
### Setup
- Create a new base directory for your Corona project and HTML5 output.
- Using Corona, create a new project and select the base directory as the destination.
- Create a directory called __html5_output__ (or whatever) in the base directory as well.
The directory tree should end up looking something like:
```
/
/
main.lua
...
html5_output/
```
_Do not create the __html5_output__ directory in the directory._
### Initialize
Using a command line tool, navigate to the __/__ directory and run:
```
coronahtml5 init --app --html full/path/to//html5_output
```
This will create a _package.lua_ file in your ____ directory. ___Do not edit this file.___
It's a good idea to add this file to the __excludeFiles__ section, under the `all` key in your _build.settings_ file:
```
...
excludeFiles =
{
-- Exclude unnecessary files for each platform
all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", "package.lua" },
...
},
```
### Development
See the command line options below to start working with your project.
## CLI
All commands need to be run using a command line tool pointed at the __/__ directory.
## Commands
To get more details on each commands arguments, run `coronahtml5 -h`.
### init
Initialize the `package.lua` configuration file. See __[Initialize](#initialize)__ above.
```
coronahtml5 init --app --html
```
Note: _All arguments are required._
### build
Generate an HTML5 build of your project. The HTML5 files will be output to the __html5_output__ directory. See __[Setup](#setup)__ above.
```
coronahtml5 build [--clean]
```
__Note for macOS users__: To use the `build` command you must run the "Setup Corona Native.app" found in the `/Applications/Corona-/Native/` directory. You will need to do this for each new Corona build you install (if using dailies).
### watch
Start a live browser session of your HTML5 build. Add the `-d` flag to open a debug session.
```
coronahtml5 watch [-d] [--proxy ]
```
Note: _The watch process runs in its own shell session._
___
©2018 C. Byerley ([develephant](https://develephant.com))