├── .bmp.yml
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ ├── custom.md
│ └── feature_request.md
└── workflows
│ └── ci.yml
├── .gitignore
├── LICENSE
├── Makefile
├── README.md
├── build_test.ts
├── bundle_util.ts
├── bundle_util_test.ts
├── cli.ts
├── cli_test.ts
├── deno.json
├── deps.ts
├── docs
├── .gitignore
├── Makefile
├── _config.js
├── _includes
│ └── layout.njk
├── _site
│ ├── examples
│ │ ├── preact
│ │ │ └── index.html
│ │ ├── react
│ │ │ └── index.html
│ │ ├── simple
│ │ │ └── index.html
│ │ └── styled-components
│ │ │ └── index.html
│ ├── getting-started
│ │ ├── cli-command
│ │ │ └── index.html
│ │ ├── getting-started
│ │ │ └── index.html
│ │ └── type-checking
│ │ │ └── index.html
│ ├── guides
│ │ ├── registry-cdn
│ │ │ └── index.html
│ │ └── static-dir
│ │ │ └── index.html
│ ├── index.html
│ ├── logo-v2.svg
│ ├── markdown.css
│ ├── monaco-editor
│ │ └── min
│ │ │ └── vs
│ │ │ ├── basic-languages
│ │ │ ├── bat
│ │ │ │ └── bat.js
│ │ │ ├── coffee
│ │ │ │ └── coffee.js
│ │ │ ├── css
│ │ │ │ └── css.js
│ │ │ ├── dockerfile
│ │ │ │ └── dockerfile.js
│ │ │ ├── graphql
│ │ │ │ └── graphql.js
│ │ │ ├── handlebars
│ │ │ │ └── handlebars.js
│ │ │ ├── html
│ │ │ │ └── html.js
│ │ │ ├── ini
│ │ │ │ └── ini.js
│ │ │ ├── javascript
│ │ │ │ └── javascript.js
│ │ │ ├── less
│ │ │ │ └── less.js
│ │ │ ├── markdown
│ │ │ │ └── markdown.js
│ │ │ ├── powershell
│ │ │ │ └── powershell.js
│ │ │ ├── pug
│ │ │ │ └── pug.js
│ │ │ ├── restructuredtext
│ │ │ │ └── restructuredtext.js
│ │ │ ├── scss
│ │ │ │ └── scss.js
│ │ │ ├── shell
│ │ │ │ └── shell.js
│ │ │ ├── typescript
│ │ │ │ └── typescript.js
│ │ │ ├── xml
│ │ │ │ └── xml.js
│ │ │ └── yaml
│ │ │ │ └── yaml.js
│ │ │ ├── editor
│ │ │ ├── editor.main.css
│ │ │ ├── editor.main.js
│ │ │ └── editor.main.nls.js
│ │ │ ├── language
│ │ │ ├── css
│ │ │ │ └── cssMode.js
│ │ │ ├── html
│ │ │ │ └── htmlMode.js
│ │ │ ├── json
│ │ │ │ └── jsonMode.js
│ │ │ └── typescript
│ │ │ │ └── tsMode.js
│ │ │ └── loader.js
│ └── styles.css
├── deploy.js
├── examples
│ ├── _data.yml
│ ├── preact.md
│ ├── react.md
│ ├── simple.md
│ └── styled-components.md
├── getting-started
│ ├── _data.yml
│ ├── cli-command.md
│ ├── getting-started.md
│ └── type-checking.md
├── guides
│ ├── _data.yml
│ ├── registry-cdn.md
│ └── static-dir.md
├── index.md
├── logo-v2.svg
├── logo.png
├── logo.sketch
├── markdown.css
├── monaco-editor
│ └── min
│ │ └── vs
│ │ ├── basic-languages
│ │ ├── bat
│ │ │ └── bat.js
│ │ ├── coffee
│ │ │ └── coffee.js
│ │ ├── css
│ │ │ └── css.js
│ │ ├── dockerfile
│ │ │ └── dockerfile.js
│ │ ├── graphql
│ │ │ └── graphql.js
│ │ ├── handlebars
│ │ │ └── handlebars.js
│ │ ├── html
│ │ │ └── html.js
│ │ ├── ini
│ │ │ └── ini.js
│ │ ├── javascript
│ │ │ └── javascript.js
│ │ ├── less
│ │ │ └── less.js
│ │ ├── markdown
│ │ │ └── markdown.js
│ │ ├── powershell
│ │ │ └── powershell.js
│ │ ├── pug
│ │ │ └── pug.js
│ │ ├── restructuredtext
│ │ │ └── restructuredtext.js
│ │ ├── scss
│ │ │ └── scss.js
│ │ ├── shell
│ │ │ └── shell.js
│ │ ├── typescript
│ │ │ └── typescript.js
│ │ ├── xml
│ │ │ └── xml.js
│ │ └── yaml
│ │ │ └── yaml.js
│ │ ├── editor
│ │ ├── editor.main.css
│ │ ├── editor.main.js
│ │ └── editor.main.nls.js
│ │ ├── language
│ │ ├── css
│ │ │ └── cssMode.js
│ │ ├── html
│ │ │ └── htmlMode.js
│ │ ├── json
│ │ │ └── jsonMode.js
│ │ └── typescript
│ │ │ └── tsMode.js
│ │ └── loader.js
├── package.json
├── script.js
├── styles.css
└── twd.ts
├── examples
├── external-reference
│ ├── index.html
│ └── main.js
├── import-map
│ ├── css
│ │ └── style.css
│ ├── import_map.json
│ ├── index.html
│ ├── js
│ │ └── script.tsx
│ └── tsconfig.json
├── react-router
│ ├── css
│ │ └── style.css
│ ├── index.html
│ ├── js
│ │ └── script.tsx
│ └── tsconfig.json
├── react-simple
│ ├── css
│ │ └── style.css
│ ├── index.html
│ ├── js
│ │ └── script.tsx
│ └── tsconfig.json
├── scss-no-import
│ ├── index.html
│ └── style.scss
├── simple
│ └── index.html
├── static-dir
│ ├── css
│ │ └── style.css
│ ├── hi.html
│ ├── index.html
│ ├── js
│ │ ├── foo.js
│ │ └── script.js
│ └── static
│ │ ├── bar.txt
│ │ ├── baz.txt
│ │ └── foo.txt
├── styled-components
│ ├── index.html
│ ├── js
│ │ └── script.tsx
│ └── tsconfig.json
├── with-imports
│ ├── css
│ │ └── style.css
│ ├── images
│ │ ├── logo.svg
│ │ └── logo.webp
│ ├── index.html
│ └── js
│ │ ├── foo.js
│ │ └── script.js
└── with-simple-assets
│ ├── css
│ └── style.css
│ ├── hi.html
│ ├── images
│ └── logo.svg
│ ├── index.html
│ └── js
│ └── script.js
├── generate_assets.ts
├── generate_assets_test.ts
├── generate_static_assets.ts
├── livereload_server.ts
├── livereload_server_test.ts
├── logger_util.ts
├── sass_util.ts
├── sass_util_test.ts
├── serve_test.ts
├── test_deps.ts
├── testdata
├── bar.js
├── baz.js
└── foo.js
├── util.ts
└── util_test.ts
/.bmp.yml:
--------------------------------------------------------------------------------
1 | version: 0.2.6
2 | commit: 'chore: bump to %.%.%'
3 | files:
4 | README.md:
5 | - packup v%.%.%
6 | - packup@v%.%.%
7 | deps.ts: const VERSION = "v%.%.%";
8 | docs/_includes/layout.njk:
9 | - 'https://deno.land/x/packup@v%.%.%'
10 | - v%.%.%
11 | docs/getting-started/getting-started.md:
12 | - 'https://deno.land/x/packup@v%.%.%/cli.ts'
13 | - packup v%.%.%
14 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ""
5 | labels: ""
6 | assignees: ""
7 | ---
8 |
9 | **Describe the bug** A clear and concise description of what the bug is.
10 |
11 | **To Reproduce** Steps to reproduce the behavior:
12 |
13 | 1. Go to '...'
14 | 2. Click on '....'
15 | 3. Scroll down to '....'
16 | 4. See error
17 |
18 | **Expected behavior** A clear and concise description of what you expected to
19 | happen.
20 |
21 | **Screenshots** If applicable, add screenshots to help explain your problem.
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/custom.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Custom issue template
3 | about: Describe this issue template's purpose here.
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.** A clear and
11 | concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like** A clear and concise description of what you
14 | want to happen.
15 |
16 | **Describe alternatives you've considered** A clear and concise description of
17 | any alternative solutions or features you've considered.
18 |
19 | **Additional context** Add any other context or screenshots about the feature
20 | request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: ci
2 | on:
3 | push:
4 | branches: main
5 | pull_request:
6 | branches: main
7 | jobs:
8 | build:
9 | strategy:
10 | matrix:
11 | os:
12 | - ubuntu-latest
13 | - windows-latest
14 | runs-on: ${{ matrix.os }}
15 | timeout-minutes: 5
16 | steps:
17 | - uses: actions/checkout@v4
18 | - uses: denoland/setup-deno@v1
19 | with:
20 | deno-version: v1.x
21 | - run: deno fmt --check
22 | if: matrix.os == 'ubuntu-latest'
23 | - run: deno lint
24 | if: matrix.os == 'ubuntu-latest'
25 | - run: deno task cov
26 | - uses: codecov/codecov-action@v3
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | coverage
2 | dist
3 | /.vscode
4 | /.vim
5 |
6 | # parcel
7 | .parcel-cache
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 | Copyright © 2021 Yoshiya Hinosawa ( @kt3k )
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is
9 | furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in
12 | all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | ex-build:
2 | deno run -A cli.ts build examples/simple/index.html
3 |
4 | ex-serve:
5 | deno run -A cli.ts serve examples/simple/index.html
6 |
7 | ex2:
8 | deno run -A cli.ts serve --static-dir examples/static-dir/static examples/with-imports/index.html
9 |
10 | ex2-o:
11 | deno run -A cli.ts serve -o --static-dir examples/static-dir/static examples/with-imports/index.html
12 |
13 | ex2-debug:
14 | deno run -A cli.ts serve --log-level=debug --static-dir examples/static-dir/static examples/with-imports/index.html
15 |
16 | ex2-build:
17 | deno run -A cli.ts build --static-dir examples/static-dir/static examples/with-imports/index.html
18 |
19 | ex2-build-debug:
20 | deno run -A cli.ts build --log-level=debug --static-dir examples/static-dir/static examples/with-imports/index.html
21 |
22 | ex-react:
23 | deno run -A cli.ts serve examples/react-simple/index.html
24 |
25 | ex-rr:
26 | deno run -A cli.ts serve examples/react-router/index.html
27 |
28 | ex-sc:
29 | deno run -A cli.ts serve -L debug examples/styled-components/index.html
30 |
31 | publish-doc:
32 | $(MAKE) -C docs d
33 | git add docs/_site
34 | git commit -m "chore: update doc site"
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # packup v0.2.6
4 |
5 | [](https://github.com/kt3k/packup/actions/workflows/ci.yml)
6 | [](https://codecov.io/gh/kt3k/packup)
7 |
8 | > Zero-config web application packager for [Deno][Deno].
9 |
10 | # Features
11 |
12 | - 📦 Bundle web application like [Parcel][Parcel].
13 | - ✨ Support TypeScript out of the box.
14 | - 🦕 Deno-compatible ES Modules resolution.
15 | - 💨 Fast build with [esbuild][esbuild] bundler.
16 |
17 | # Usage
18 |
19 | Install via deno.land/x:
20 |
21 | ```shell
22 | deno install -qAf https://deno.land/x/packup@v0.2.6/cli.ts
23 | ```
24 |
25 | Write HTML and JavaScript:
26 |
27 | index.html
28 |
29 | ```html
30 |
31 |