build intructions

This commit is contained in:
David Reed 2022-09-15 17:52:23 -04:00
parent 8525734527
commit ada56b2317
3 changed files with 30 additions and 3 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
node_modules/ node_modules/
dist/ dist/
*.tgz

View file

@ -10,4 +10,28 @@ Ultraviolet works by intercepting HTTP requests with a service worker script tha
This repository is the bare-bones of Ultraviolet. This only contains the source code required to compile `uv.bundle.js`. This repository is the bare-bones of Ultraviolet. This only contains the source code required to compile `uv.bundle.js`.
See [Ultraviolet-Node](https://github.com/titaniumnetwork-development/Ultraviolet-Node) for easy instructions to deploy an Ultraviolet website. See [Ultraviolet-Node](https://github.com/titaniumnetwork-development/Ultraviolet-Node) for easy instructions to deploy an Ultraviolet website.
## How do I package this?
This is primarily for maintainers building then releasing on GitHub. We don't have an official NPM package.
```sh
$ git clone https://github.com/titaniumnetwork-development/Ultraviolet.git
> Cloning into Ultraviolet...
$ cd Ultraviolet
```
```sh
$ npm install
```
```sh
$ npm run build
```
```sh
$ npm pack
```
Package will be named `ultraviolet-X.X.X.tgz`

View file

@ -2,6 +2,7 @@
"name": "ultraviolet", "name": "ultraviolet",
"version": "1.0.0", "version": "1.0.0",
"description": "Proxy", "description": "Proxy",
"main": "lib/index.js",
"scripts": { "scripts": {
"build": "cross-env NODE_ENV=production webpack-cli", "build": "cross-env NODE_ENV=production webpack-cli",
"build:dev": "cross-env NODE_ENV=development webpack-cli", "build:dev": "cross-env NODE_ENV=development webpack-cli",
@ -30,6 +31,7 @@
}, },
"files": [ "files": [
"dist", "dist",
"src" "src",
"lib"
] ]
} }