File tree 5 files changed +19
-27
lines changed
5 files changed +19
-27
lines changed Original file line number Diff line number Diff line change
1
+ * .tgz
Original file line number Diff line number Diff line change 1
- # ultraviolet-scripts
2
- Core Ultraviolet scripts
1
+ # Ultraviolet-Static
3
2
4
- # Configuration
5
- Configure Ultraviolet for both client-hooking & service worker in ` uv.config.js `
6
- ``` javascript
7
- self .__uv$config = {
8
- bare: ' /bare/' ,
9
- prefix: ' /service/' ,
10
- encodeUrl: Ultraviolet .codec .xor .encode ,
11
- decodeUrl: Ultraviolet .codec .xor .decode ,
12
- handler: ' /uv.handler.js' ,
13
- bundle: ' /uv.bundle.js' ,
14
- config: ' /uv.config.js' ,
15
- };
16
- ```
3
+ Static files/assets used to spin up an Ultraviolet website.
17
4
5
+ ## Packaging
18
6
19
- # Example Usage
20
- ``` javascript
21
- importScripts (' /PATHTOSCRIPTS/uv.sw.js' );
22
-
23
- const sw = new UVServiceWorker ();
24
-
25
- self .addEventListener (' fetch' , event =>
26
- event .respondWith (
27
- sw .fetch (event )
28
- )
29
- );
30
- ```
7
+ Run ` npm pack ` to produce a tgz containing the assets as an NPM package.
Original file line number Diff line number Diff line change
1
+ export const publicPath : string ;
Original file line number Diff line number Diff line change
1
+ import { fileURLToPath } from 'url' ;
2
+
3
+ export const publicPath = fileURLToPath ( new URL ( '../public/' , import . meta. url ) ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " ultraviolet-static" ,
3
+ "main" : " lib/index.js" ,
4
+ "version" : " 1.0.0" ,
5
+ "type" : " module" ,
6
+ "files" : [
7
+ " public" ,
8
+ " lib"
9
+ ]
10
+ }
You can’t perform that action at this time.
0 commit comments