Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/feathersui/vite-plugin-openfl
A Vite plugin for OpenFL and Feathers UI projects targeting html5
https://github.com/feathersui/vite-plugin-openfl
feathers-ui haxe openfl openfl-target-html5 vite vite-plugin vitejs
Last synced: 4 months ago
JSON representation
A Vite plugin for OpenFL and Feathers UI projects targeting html5
- Host: GitHub
- URL: https://github.com/feathersui/vite-plugin-openfl
- Owner: feathersui
- Created: 2022-06-29T16:55:31.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T00:32:34.000Z (about 2 years ago)
- Last Synced: 2024-10-01T16:20:00.474Z (4 months ago)
- Topics: feathers-ui, haxe, openfl, openfl-target-html5, vite, vite-plugin, vitejs
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# OpenFL Plugin for Vite
A custom plugin to build [OpenFL](https://openfl.org) (and [Feathers UI](https://feathersui.com/)) projects with [Vite](http://vitejs.dev).
## Usage
Create a new directory for your project.
Create the necessary files for an OpenFL project, including _project.xml_ inside the project's root directory and your _.hx_ source files. Then, follow the remaining steps to setup Vite and vite-plugin-openfl.
In a terminal, run the following command in the root of your project to create a _package.json_ file:
```sh
npm init -y
```Then, run the following command to install the required dependencies:
```sh
npm install --save-dev vite vite-plugin-openfl
```Open the _package.json_ file, and modify the `scripts` section:
```json
"scripts": {
"start": "vite",
"build": "vite build"
}
```Create a _vite.config.js_ file in the root of your project:
```js
import { defineConfig } from "vite";
import openflPlugin from "vite-plugin-openfl";export default defineConfig({
plugins: [openflPlugin()],
});
```To start a local development server, run the following command. Then, open _http://localhost:5173/_ in a web browser.
```sh
npm start
```To build a production JavaScript bundle, run the following command:
```sh
npm run build
```