Skip to content

Commit

Permalink
Merge pull request #25 from schlawg/2.0.0
Browse files Browse the repository at this point in the history
esbuild, move build products to dist, 2.0.0 (esm)
  • Loading branch information
ornicar committed Aug 19, 2023
2 parents eb11405 + 5a9a303 commit a2b1caa
Show file tree
Hide file tree
Showing 16 changed files with 647 additions and 606 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
node_modules/
*.js.map
*.d.ts
*.js
demo/lichess-pgn-viewer.js
demo/lichess-pgn-viewer.css
dist/
package-lock.json
tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"singleQuote": true,
"printWidth": 120,
"printWidth": 110,
"arrowParens": "avoid"
}
6 changes: 5 additions & 1 deletion demo/demo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div><div></div></div>
<div><div></div></div>
</div>
<script src="lichess-pgn-viewer.js"></script>
<script src="demo.js"></script>
<script src="lichess-pgn-viewer.js" type="module"></script>
<script src="demo.js" type="module"></script>
</body>
</html>
62 changes: 34 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lichess-pgn-viewer",
"license": "GPL-3.0-or-later",
"version": "1.6.1",
"version": "2.0.0",
"repository": "github:lichess-org/pgn-viewer",
"author": "Thibault Duplessis <contact@lichess.org>",
"funding": "https://lichess.org/patron",
Expand All @@ -14,49 +14,55 @@
"typescript"
],
"type": "module",
"module": "main.js",
"main": "dist/main.js",
"types": "main.d.ts",
"exports": {
".": {
"types": "./dist/main.d.ts",
"default": "./dist/main.js"
}
},
"typesVersions": {
"*": {
"*": [
"dist/*"
]
}
},
"dependencies": {
"@types/node": "^18.16.17",
"chessground": "^8.3.13",
"@types/node": "^20.5.0",
"chessground": "^9.0.1",
"chessops": "^0.12.7",
"snabbdom": "^3.5.1"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.1",
"@jest/globals": "^29.6.2",
"esbuild": "^0.19.2",
"http-server": "^14.1.1",
"jest": "^29.5.0",
"prettier": "^2.8.8",
"rollup": "^3.25.1",
"sass": "^1.63.3",
"ts-jest": "^29.1.0",
"tslib": "^2.5.3",
"typescript": "^5.1.3"
"jest": "^29.6.2",
"prettier": "^3.0.2",
"sass": "^1.65.1",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
},
"scripts": {
"prepack": "tsc",
"compile": "tsc --incremental --declaration --outDir dist/",
"dev": "$npm_execpath run compile && rollup --config",
"watch": "$npm_execpath run compile && rollup --config --watch",
"prod": "$npm_execpath run compile && rollup --config --config-prod",
"demo": "http-server demo",
"sass-dev": "sass --no-source-map --watch --update --style=expanded scss:demo",
"compile": "tsc --incremental",
"format": "prettier --write **/*.ts **/*.scss",
"bundle": "esbuild src/main.ts --bundle --format=esm --platform=browser",
"bundle-dev": "$npm_execpath run bundle --outfile=demo/lichess-pgn-viewer.js",
"bundle-prod": "$npm_execpath run bundle --minify --outfile=dist/lichess-pgn-viewer.min.js",
"sass-dev": "sass --no-source-map --update --style=expanded scss:demo",
"sass-prod": "sass --no-source-map --style=compressed scss:dist",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
"prod": "$npm_execpath run sass-prod && $npm_execpath run bundle-prod",
"demo": "$npm_execpath run sass-dev && $npm_execpath run bundle-dev && http-server demo",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"dist": "$npm_execpath run compile && $npm_execpath run prod && $npm_execpath run sass-dev && $npm_execpath run bundle-dev"
},
"files": [
"*.js",
"*.js.map",
"*.d.ts",
"demo/*",
"dist/*",
"view/*",
"scss/*",
"src/*",
"src/**/*"
]
}

0 comments on commit a2b1caa

Please sign in to comment.