Repository
Current version released
4 years ago
Dependencies
gist.github.com
std
unpkg.com
packup v0.0.4
Zero-config web application packager in Deno.
ā ļø This tool is still in its early development stage.
Usage
Install via deno.land/x:
deno install --unstable --allow-read --allow-write=. --allow-run --allow-net -fq https://deno.land/x/packup@v0.0.4/cli.ts
Write HTML and JavaScript:
index.html
<html>
<body>
<script src="./index.js"></script>
<h1>Hi from packup!</h1>
</body>
</html>
index.js
console.log("hello world");
packup
has the development server builtin. Run the following command to start the server.
packup index.html
Then open http://localhost:1234/ in your browser.
0.1 roadmap
- Assets in
static/
dir are served/copied as is. (Use this for images and other assets.)- Something like https://github.com/elwin013/parcel-plugin-static-files-copy
- hot reload
- āport support (serve)
- ādist-dir support (build)
- doc web site in packup
- optimize esbuild loading
- give the example way of properly typing the typescripts
- Maybe use lib: [ādomā] ?
0.2.0 roadmap
- āpublic-url
- āopen option
- optimize (minify) option
- css import support
- image import support
1.0 roadmap
- sourcemap support
- scss support
Done items
- Runs parcels original examples (with Deno specific stuff modification).
- Doesnāt work because it includes commonjs references which I donāt want to support.
- List asset sizes
- Bundle javascript using esbuild
- Bundle javascript using swc
-
deno run cli.ts [serve] index.html
starts server at localhost port 1234, watch all dependencies, rebuild all assets when changed. -
deno run cli.ts build index.html
builds static assets to ādistā directory. - Referenced scripts from
<script>
tags are bundled and served/built. - Stylesheets referenced from
<link />
tags are just served/copied as is.
Prior art
License
MIT