Giter Club home page Giter Club logo

packup's Introduction

packup v0.1.14

ci

Zero-config web application packager in Deno.

Features

  • ๐Ÿ“ฆ Bundle web application like Parcel.
  • โœจ Support TypeScript out of the box.
  • ๐Ÿฆ• Deno-compatible ES Modules resolution.
  • ๐Ÿ’จ Fast build with esbuild-wasm bundler.

Usage

Install via deno.land/x:

deno run -A https://deno.land/x/[email protected]/install.ts

Write HTML and JavaScript:

index.html

<html>
  <body>
    <script src="./main.ts"></script>
    <h1>Hi from packup!</h1>
  </body>
</html>

main.ts

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.

See packup serve -h and packup build -h for more usages.

Typings

You can type check the script with Deno.

You need the following tsconfig.json for your frontend scripts correctly type checked.

{
  "compilerOptions": {
    "lib": ["esnext", "dom"]
  }
}

If you use vscode you need to set 'deno.config' property in .vscode/settings.json file to point the tsconfig.json:

{
  "deno.enable": true,
  "deno.lint": true,
  "deno.unstable": true,
  "deno.config": "./tsconfig.json"
}

If you'd prefer to use CLI directly to type check your script, you can use the following command for it:

deno cache --config tsconfig.json <script>

See the example repository for more details.

Advanced usages

If you want to use packup without installing globally, you can use the following command.

deno run --allow-env --allow-read --allow-write --allow-net=deno.land https://deno.land/x/[email protected]/ensure_esbuild_wasm.ts
deno run -A https://deno.land/x/[email protected]/cli.ts <your parameters>

The first command ensures the esbuild wasm installed on your machine. The second command is the actual entrypoint of the packup program.

0.2.0 roadmap

  • --public-url
  • twind example
  • Make esbuild.wasm path configurable
  • optimize (minify) option
  • css import support
  • image import support
  • scss @import support

1.0 roadmap

  • import map support
  • sourcemap support

Prior art

History

  • 2022-09-11 v0.1.14 Add import map support. #47
  • 2022-07-12 v0.1.13 Add <DOCTYPE html> to html by default. #44 tag. #39
  • 2021-12-27 v0.1.11 Add support of <img> srcset attribute and <source> tag. #39
  • 2021-12-22 v0.1.11 Add support of image imports (in html). #33
  • 2021-12-05 v0.1.10 Install wasm under DENO_DIR when it's specified. #31
  • 2021-12-05 v0.1.9 Add logging related to sass.
  • 2021-11-29 v0.1.8 Add --static-dist-prefix option #30
  • 2021-11-29 v0.1.7 Add --public-url option #29
  • 2021-10-21 v0.1.6 CLI start up time improvement
  • 2021-10-20 v0.1.5 Remove the use of unstable flag #28
  • 2021-10-19 v0.1.4 Change esbuild wasm file name.
  • 2021-09-19 v0.1.3 Skip processing http(s):// url references in html #22.
  • 2021-09-17 v0.1.2 Fix -p option.
  • 2021-09-16 v0.1.1 Add ensure_esbuild_wasm.ts entrypoint.
  • 2021-09-15 v0.1.0 Add basic support of scss #18
  • 2021-09-08 v0.0.17 Support multiple entrypoints #14
  • 2021-09-01 v0.0.16 Fix the message when the server starts #11
  • 2021-07-31 v0.0.15 Update iterable_file_server
  • 2021-07-01 v0.0.14 Fix @import-maps/resolve dependency https://github.com/kt3k/packup/commit/4c502652315d5d15755be340318263dbd75fb12f . Remove --bundler options https://github.com/kt3k/packup/commit/e66c76695e0415c9aeb97e8c1b477a828daf5c52
  • 2021-06-21 v0.0.13 Fix for windows kt3k#5.

License

MIT

packup's People

Contributors

austincummings avatar karelklima avatar kt3k avatar tjosepo avatar uki00a avatar ultirequiem avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.