Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3 #73

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: pnpm install --ignore-scripts
- name: Build
run: pnpm run build
run: script/build
- name: Publish to NPM (with provenance)
run: pnpm publish --no-git-checks --access public --tag ${{ github.event.release.prerelease && 'next' || 'latest' }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
# - name: Lint
# run: pnpm run lint
- name: Build
run: pnpm run build
run: script/build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dev/
/dev/*
!/dev/index.html
dist/
.idea/
node_modules/
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### 🔥 BREAKING CHANGES

- [#109](https://github.com/kytta/shareon/pull/109)
new exported files
- UMD version was removed and replaced with a CommonJS version. Use `shareon.cjs`
- ESM version was renamed. Instead of `shareon.es.js`, use `shareon.mjs`.

### Behind-the-scenes

- [#109](https://github.com/kytta/shareon/pull/109)
Use esbuild without using Vite

## [2.5.0] - 2024-02-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ In `src/shareon.css`, add two lines for the icon: one for the colour and one for
Open `index.html` in the repository root and add the icon to the list of all buttons. Then, launch the dev server:

```sh
pnpm dev --open
pnpm dev
```

The final button should:
Expand Down
6 changes: 5 additions & 1 deletion index.html → dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
font-weight: 600;
}
</style>
<link rel="stylesheet" href="shareon.css" />
</head>

<body>
Expand Down Expand Up @@ -134,7 +135,10 @@ <h2>Specimen</h2>
</main>

<script type="module">
import { init } from "./src/shareon.js";
new EventSource("/esbuild")
.addEventListener("change", () => location.reload())

import { init } from "./shareon.js";
init();
</script>
</body>
Expand Down
19 changes: 5 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"dist"
],
"scripts": {
"build": "vite build",
"dev": "vite",
"build": "node script/build",
"dev": "node script/dev",
"lint": "prettier --check . && eslint .",
"size": "size-limit",
"test": "pnpm run lint && pnpm run build && pnpm run size",
Expand All @@ -54,19 +54,16 @@
},
"devDependencies": {
"@size-limit/preset-small-lib": "^11.0.2",
"autoprefixer": "^10.4.17",
"clean-publish": "^4.2.0",
"esbuild": "^0.20.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-unicorn": "^50.0.1",
"postcss": "^8.4.34",
"postcss-calc": "^9.0.1",
"postcss-css-variables": "^0.19.0",
"postcss-csso": "^6.0.1",
"postcss-url": "^10.1.3",
"prettier": "^3.2.5",
"size-limit": "^11.0.2",
"vite": "^5.0.12"
"size-limit": "^11.0.2"
},
"prettier": {
"embeddedLanguageFormatting": "off"
Expand Down Expand Up @@ -98,12 +95,6 @@
},
"postcss": {
"plugins": {
"postcss-url": {
"url": "inline",
"optimizeSvgEncode": true
},
"postcss-css-variables": {},
"postcss-calc": {},
"autoprefixer": {},
"postcss-csso": {}
}
Expand All @@ -116,7 +107,7 @@
},
{
"limit": "1 KiB",
"path": "./dist/shareon.es.js",
"path": "./dist/shareon.mjs",
"brotli": true
}
],
Expand Down
Loading
Loading