Skip to content

Commit 756e8e2

Browse files
committed
configure for publishing package to gh
Signed-off-by: yshalsager <[email protected]>
1 parent caf145a commit 756e8e2

File tree

7 files changed

+2535
-4
lines changed

7 files changed

+2535
-4
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Publish Package to GitHub Packages
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
uses: nuqayah/gh-actions/.github/workflows/npm_publish.yaml@main

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
node_modules
22
/dist
33
.DS_Store
4-
pnpm-lock.yaml
54
/misc
5+
.vscode/settings.json

build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const min_css = async s => (await postcss([pseudo_is, autoprefixer, cssnano(cssn
1212
const apply_repls = (s, repls) => repls.reduce((a, b) => a[b[2] ? 'replaceAll' : 'replace'](b[0], b[1]), s)
1313

1414
const polyfills = ['Object.fromEntries', 'Intl.RelativeTimeFormat.~locale.ar']
15-
const pf_url = `document.write('<script src="https://polyfill.io/v3/polyfill.min.js?features=${polyfills.join(',')}"><\\/script>')`
15+
const pf_url = `document.write('<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=${polyfills.join(',')}"><\\/script>')`
1616
const pf_script = `((${polyfills.map(pf => pf.replace(/\.~.*/, '')).join(' && ')}) || ${pf_url})`
1717

1818
async function main() {
@@ -30,7 +30,7 @@ async function main() {
3030

3131
// Combine
3232
const pg = apply_repls(r('index.html'), [
33-
['assets/icon.png', 'data:image/png;base64,' + fs.readFileSync('icon.png', 'base64')],
33+
// ['assets/icon.png', 'data:image/png;base64,' + fs.readFileSync('icon.png', 'base64')],
3434
[/>\n+ */g, '>'],
3535
[/&#32;/g, ' '],
3636
[/<!-- styles -->/, () => `<style>${css}</style>`],

mise.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
node = '22'
3+
pnpm = '10'

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"name": "@nuqayah/ar-text-tools",
3+
"version": "1.0.2",
4+
"publishConfig": {
5+
"registry": "https://npm.pkg.github.com/"
6+
},
27
"devDependencies": {
38
"@sveltejs/vite-plugin-svelte": "^3.0.1",
49
"autoprefixer": "^10.4.16",

0 commit comments

Comments
 (0)