Skip to content

Commit 1976725

Browse files
committed
refactor to bundle deps
1 parent 50219fa commit 1976725

27 files changed

+5005
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
python_modules
12
node_modules
23
.DS_Store

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ ttx <params>
2424
Also you can use this tool via [npx](https://docs.npmjs.com/cli/commands/npx):
2525

2626
```shell
27-
npx -p @web-alchemy/fonttools <params>
28-
npx -p @web-alchemy/fonttools pyftsubset <params>
29-
npx -p @web-alchemy/fonttools pyftmerge <params>
30-
npx -p @web-alchemy/fonttools ttx <params>
27+
npx --package=@web-alchemy/fonttools -- fonttools <params>
28+
npx --package=@web-alchemy/fonttools -- pyftsubset <params>
29+
npx --package=@web-alchemy/fonttools -- pyftmerge <params>
30+
npx --package=@web-alchemy/fonttools -- ttx <params>
3131
```
3232

3333
Example of converting `ttf` to `woff2`:
3434

3535
```shell
36-
npx -p @web-alchemy/fonttools pyftsubset \
36+
npx --package=@web-alchemy/fonttools -- pyftsubset \
3737
"./some/path/to/font.ttf" \
3838
"*" \ # keep all glyphs and just convert format
3939
--output-file="./some/path/to/font.woff2" \
@@ -43,7 +43,7 @@ npx -p @web-alchemy/fonttools pyftsubset \
4343
Example of converting `ttf` to `woff2` and subseting with text and unicodes options:
4444

4545
```shell
46-
npx -p @web-alchemy/fonttools pyftsubset \
46+
npx --package=@web-alchemy/fonttools -- pyftsubset \
4747
"./some/path/to/font.ttf" \
4848
--output-file="./some/path/to/font.woff2" \
4949
--flavor="woff2" \
@@ -57,7 +57,7 @@ npx -p @web-alchemy/fonttools pyftsubset \
5757
Example of [customizing variable font's axes](https://fonttools.readthedocs.io/en/latest/varLib/instancer.html):
5858

5959
```shell
60-
npx @web-alchemy/fonttools varLib.instancer \
60+
npx --package=@web-alchemy/fonttools -- fonttools varLib.instancer \
6161
"./src/font.woff2" \
6262
# decrease `wght` axis range
6363
wght=400:600 \

bin/fonttools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict'
33

44
const pkg = require('../package.json')
5-
const { main } = require('../modules/fonttools/cli.js')
5+
const { main } = require('../src/modules/fonttools/cli.js')
66

77
const title = `${pkg.name}`
88
process.title = title

bin/pyftmerge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict'
33

44
const pkg = require('../package.json')
5-
const { main } = require('../modules/merge/cli.js')
5+
const { main } = require('../src/modules/merge/cli.js')
66

77
const title = `${pkg.name}/pyftmerge`
88
process.title = title

bin/pyftsubset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict'
33

44
const pkg = require('../package.json')
5-
const { main } = require('../modules/subset/cli.js')
5+
const { main } = require('../src/modules/subset/cli.js')
66

77
const title = `${pkg.name}/pyftsubset`
88
process.title = title

bin/ttx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict'
33

44
const pkg = require('../package.json')
5-
const { main } = require('../modules/ttx/cli.js')
5+
const { main } = require('../src/modules/ttx/cli.js')
66

77
const title = `${pkg.name}/ttx`
88
process.title = title

hooks/post-install.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@web-alchemy/fonttools",
3-
"version": "1.3.4",
4-
"main": "main.js",
3+
"version": "1.4.0-0",
4+
"main": "src/main.js",
55
"bin": {
66
"fonttools": "./bin/fonttools",
77
"pyftsubset": "./bin/pyftsubset",
@@ -16,15 +16,22 @@
1616
"postpublish": "git push origin --all; git push origin --tags",
1717
"postversion": "npm publish",
1818
"preversion": "npm test",
19+
"pretest": "npm run install-packages",
1920
"test": "echo \"No test specified\" && exit 0",
20-
"postinstall": "node hooks/post-install.js"
21+
"update-lock-file": "node src/scripts/update-lock-file.js",
22+
"install-packages": "node src/scripts/install-packages.js"
2123
},
2224
"dependencies": {
23-
"pyodide": "^0.27.1"
25+
"pyodide": "^0.28.0"
2426
},
2527
"publishConfig": {
2628
"access": "public"
2729
},
30+
"files": [
31+
"src",
32+
"python_modules",
33+
"pyodide-lock.json"
34+
],
2835
"repository": {
2936
"type": "git",
3037
"url": "git+https://github.com/web-alchemy/fonttools.git"

0 commit comments

Comments
 (0)