Skip to content

Commit

Permalink
change destination of bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
deebloo committed Feb 15, 2024
1 parent 0d2eee7 commit 6141320
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/node_modules
/bundled
/bundle
/dist
/target
/src/**/*.js
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Go Board WebComponent. The entire library weights less than 5kb gzip and less th
## All you need to get started is some markup and a script tag

```HTML
<script src="https://cdn.jsdelivr.net/npm/go-board@latest/target/bundle/go-board.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/go-board@latest/bundle/go-board.min.js"></script>

<go-board coords>
<go-stone color="black" slot="R17"></go-stone>
Expand Down
13 changes: 1 addition & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>Go Viewer</title>

<script type="importmap">
{
"imports": {
"@joist/di": "/node_modules/@joist/di/target/lib.js",
"@joist/element": "/node_modules/@joist/element/target/lib.js",
"@joist/observable": "/node_modules/@joist/observable/target/lib.js",
"tslib": "/node_modules/tslib/tslib.es6.js"
}
}
</script>
</head>

<body>
Expand All @@ -34,7 +23,7 @@
<go-board></go-board>
</form>

<script src="./target/register.js" type="module"></script>
<script src="./bundle/go-board.min.js" type="module"></script>

<script type="module">
const board = document.querySelector("go-board");
Expand Down
26 changes: 18 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
}
},
"files": [
"target"
"target",
"bundle"
],
"repository": {
"type": "git",
Expand All @@ -35,18 +36,18 @@
"service": true,
"dependencies": [
{
"script": "build:tsc",
"script": "tsc",
"cascade": false
}
]
},
"build": {
"dependencies": [
"build:tsc",
"build:rollup"
"tsc",
"rollup"
]
},
"build:tsc": {
"tsc": {
"command": "tsc --build --pretty",
"clean": "if-file-deleted",
"files": [
Expand All @@ -58,16 +59,25 @@
"tsconfig.tsbuildinfo"
]
},
"build:rollup": {
"rollup": {
"command": "rollup -c rollup.config.js",
"files": [
"target/**"
],
"output": [
"bundle/**"
],
"dependencies": [
"build:tsc"
{
"script": "tsc",
"cascade": false
}
]
},
"test": {
"command": "wtr \"target/**/**.spec.js\" --node-resolve --puppeteer",
"dependencies": [
"build:tsc"
"tsc"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { nodeResolve } from "@rollup/plugin-node-resolve";
export default {
input: "target/register.js",
output: {
file: "target/bundle/go-board.min.js",
file: "bundle/go-board.min.js",
format: "iife",
},
plugins: [
Expand Down

0 comments on commit 6141320

Please sign in to comment.