punchcutter 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.envrc ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env bash
2
+
3
+ version_gte() {
4
+ local cmd="$1"
5
+ local required_version="$2"
6
+ local installed_version=$($cmd | grep -oE "[0-9]+(\.[0-9]+)+" | head -n 1)
7
+
8
+ if [ -z "$installed_version" ]; then
9
+ return 1
10
+ fi
11
+
12
+ IFS="."
13
+ set -- $installed_version
14
+ local installed_parts="$@"
15
+ set -- $required_version
16
+ local required_parts="$@"
17
+ unset IFS
18
+
19
+ local i=1
20
+ for required_part in $required_parts; do
21
+ installed_part=$(echo "$installed_parts" | cut -d " " -f $i)
22
+ if [ "${installed_part:-0}" -lt "$required_part" ]; then
23
+ return 1
24
+ elif [ "${installed_part:-0}" -gt "$required_part" ]; then
25
+ return 0
26
+ fi
27
+ i=$((i + 1))
28
+ done
29
+
30
+ return 0
31
+ }
32
+
33
+ if type nix-shell >/dev/null 2>&1; then
34
+ if ! has devenv; then
35
+ # Install devenv v1.x. Hash from https://www.nixhub.io/packages/devenv
36
+ if version_gte "nix --version" "2.30.0"; then
37
+ nix profile add github:NixOS/nixpkgs/80d901ec0377e19ac3f7bb8c035201e2e098cc97#devenv
38
+ else
39
+ nix profile install github:NixOS/nixpkgs/80d901ec0377e19ac3f7bb8c035201e2e098cc97#devenv
40
+ fi
41
+ fi
42
+
43
+ eval "$(devenv direnvrc)"
44
+ use devenv
45
+ else
46
+ echo "nix-shell is not available. Install Nix: https://nixos.org/download"
47
+ fi
@@ -0,0 +1,29 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install system dependencies
15
+ run: |
16
+ sudo apt-get update -qq
17
+ sudo apt-get install -y -qq build-essential fontforge g++ gcc graphicsmagick python3-dev ttfautohint
18
+
19
+ - name: Install Node
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: 24.15.0
23
+ cache: npm
24
+
25
+ - name: Install Node dependencies
26
+ run: npm ci
27
+
28
+ - name: Run Node tests
29
+ run: npm test
@@ -0,0 +1,22 @@
1
+ default_language_version:
2
+ node: 24.15.0
3
+
4
+ default_stages: [pre-commit]
5
+
6
+ fail_fast: true
7
+
8
+ repos:
9
+ - repo: local
10
+ hooks:
11
+ - id: nixfmt
12
+ name: nixfmt
13
+ entry: nixfmt
14
+ language: system
15
+ files: \.nix$
16
+
17
+ - id: format-js
18
+ name: Format JS
19
+ language: system
20
+ entry: npx prettier --parser babel --write
21
+ files: ^(lib)/.*\.(js|jsx|cjs|mjs)$
22
+ pass_filenames: true
package/Makefile ADDED
@@ -0,0 +1,38 @@
1
+ ifneq ($(shell which tput),)
2
+ ifneq ($(TERM),)
3
+ RED := $(shell tput setaf 1)
4
+ GREEN := $(shell tput setaf 2)
5
+ YELLOW := $(shell tput setaf 3)
6
+ CYAN := $(shell tput setaf 6)
7
+ RESET := $(shell tput sgr0)
8
+ endif
9
+ endif
10
+
11
+ format:
12
+ @echo "Formatting code..."
13
+ pre-commit run format-js --all-files
14
+
15
+ bump-version:
16
+ @BUMP=$(word 2,$(MAKECMDGOALS)); \
17
+ VALID_BUMP="major minor patch premajor preminor prepatch prerelease"; \
18
+ if [ -z "$$BUMP" ]; then \
19
+ echo "$(RED)Error: Bump is required.$(RESET)"; \
20
+ echo "Usage: make bump-version [major|minor|patch|premajor|preminor|prepatch|prerelease]"; \
21
+ exit 1; \
22
+ fi; \
23
+ if ! echo "$$VALID_BUMP" | grep -qw "$$BUMP"; then \
24
+ echo "$(RED)Error: Invalid bump '$$BUMP'.$(RESET)"; \
25
+ echo "Must be one of: $(CYAN)$$VALID_BUMP$(RESET)"; \
26
+ exit 1; \
27
+ fi; \
28
+ npm version $$BUMP;
29
+
30
+ create-release:
31
+ @VERSION=$$(npm pkg get version --browser=false | tr -d '"'); \
32
+ gh release create $$VERSION;
33
+
34
+ # Prevent make from treating arguments to bump-version as targets
35
+ ifeq (bump-version,$(firstword $(MAKECMDGOALS)))
36
+ %:
37
+ @:
38
+ endif
package/README.md CHANGED
@@ -1,47 +1,7 @@
1
- # Punchcutter [![CircleCI](https://circleci.com/gh/netbek/punchcutter.svg?style=svg)](https://circleci.com/gh/netbek/punchcutter)
1
+ # Punchcutter
2
2
 
3
3
  Build web fonts, glyphs and sprites.
4
4
 
5
- ## Installation
6
-
7
- ### Ubuntu 18
8
-
9
- 1. Install system dependencies:
10
-
11
- ```shell
12
- sudo apt-get install fontforge g++ graphicsmagick pngquant ttfautohint
13
- ```
14
-
15
- 2. Install Node 18.x:
16
-
17
- ```shell
18
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
19
- source ~/.bashrc
20
- nvm install v18.16.0
21
- nvm alias default v18.16.0
22
- ```
23
-
24
- ### OS X
25
-
26
- 1. Install system dependencies:
27
-
28
- ```shell
29
- brew install fontforge
30
- brew install gcc48 --enable-cxx
31
- brew install graphicsmagick
32
- brew install pngquant
33
- brew install ttfautohint --with-qt
34
- ```
35
-
36
- 2. Install Node 18.x:
37
-
38
- ```shell
39
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
40
- source ~/.bashrc
41
- nvm install v18.16.0
42
- nvm alias default v18.16.0
43
- ```
44
-
45
5
  ## Usage
46
6
 
47
7
  ### Web fonts
package/devenv.lock ADDED
@@ -0,0 +1,123 @@
1
+ {
2
+ "nodes": {
3
+ "devenv": {
4
+ "locked": {
5
+ "dir": "src/modules",
6
+ "lastModified": 1770833792,
7
+ "owner": "cachix",
8
+ "repo": "devenv",
9
+ "rev": "1e5f2d43973d3f4a6e7bf3e13fd39e0c4d9af3de",
10
+ "type": "github"
11
+ },
12
+ "original": {
13
+ "dir": "src/modules",
14
+ "owner": "cachix",
15
+ "repo": "devenv",
16
+ "type": "github"
17
+ }
18
+ },
19
+ "flake-compat": {
20
+ "flake": false,
21
+ "locked": {
22
+ "lastModified": 1767039857,
23
+ "owner": "NixOS",
24
+ "repo": "flake-compat",
25
+ "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
26
+ "type": "github"
27
+ },
28
+ "original": {
29
+ "owner": "NixOS",
30
+ "repo": "flake-compat",
31
+ "type": "github"
32
+ }
33
+ },
34
+ "git-hooks": {
35
+ "inputs": {
36
+ "flake-compat": "flake-compat",
37
+ "gitignore": "gitignore",
38
+ "nixpkgs": [
39
+ "nixpkgs"
40
+ ]
41
+ },
42
+ "locked": {
43
+ "lastModified": 1770726378,
44
+ "owner": "cachix",
45
+ "repo": "git-hooks.nix",
46
+ "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae",
47
+ "type": "github"
48
+ },
49
+ "original": {
50
+ "owner": "cachix",
51
+ "repo": "git-hooks.nix",
52
+ "type": "github"
53
+ }
54
+ },
55
+ "gitignore": {
56
+ "inputs": {
57
+ "nixpkgs": [
58
+ "git-hooks",
59
+ "nixpkgs"
60
+ ]
61
+ },
62
+ "locked": {
63
+ "lastModified": 1762808025,
64
+ "owner": "hercules-ci",
65
+ "repo": "gitignore.nix",
66
+ "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
67
+ "type": "github"
68
+ },
69
+ "original": {
70
+ "owner": "hercules-ci",
71
+ "repo": "gitignore.nix",
72
+ "type": "github"
73
+ }
74
+ },
75
+ "nixpkgs": {
76
+ "inputs": {
77
+ "nixpkgs-src": "nixpkgs-src"
78
+ },
79
+ "locked": {
80
+ "lastModified": 1770434727,
81
+ "owner": "cachix",
82
+ "repo": "devenv-nixpkgs",
83
+ "rev": "8430f16a39c27bdeef236f1eeb56f0b51b33d348",
84
+ "type": "github"
85
+ },
86
+ "original": {
87
+ "owner": "cachix",
88
+ "ref": "rolling",
89
+ "repo": "devenv-nixpkgs",
90
+ "type": "github"
91
+ }
92
+ },
93
+ "nixpkgs-src": {
94
+ "flake": false,
95
+ "locked": {
96
+ "lastModified": 1769922788,
97
+ "narHash": "sha256-H3AfG4ObMDTkTJYkd8cz1/RbY9LatN5Mk4UF48VuSXc=",
98
+ "owner": "NixOS",
99
+ "repo": "nixpkgs",
100
+ "rev": "207d15f1a6603226e1e223dc79ac29c7846da32e",
101
+ "type": "github"
102
+ },
103
+ "original": {
104
+ "owner": "NixOS",
105
+ "ref": "nixpkgs-unstable",
106
+ "repo": "nixpkgs",
107
+ "type": "github"
108
+ }
109
+ },
110
+ "root": {
111
+ "inputs": {
112
+ "devenv": "devenv",
113
+ "git-hooks": "git-hooks",
114
+ "nixpkgs": "nixpkgs",
115
+ "pre-commit-hooks": [
116
+ "git-hooks"
117
+ ]
118
+ }
119
+ }
120
+ },
121
+ "root": "root",
122
+ "version": 7
123
+ }
package/devenv.nix ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ pkgs,
3
+ lib,
4
+ config,
5
+ inputs,
6
+ ...
7
+ }:
8
+ {
9
+ env.DEVENV_TASKS_QUIET = 1;
10
+
11
+ packages = with pkgs; [
12
+ fontforge
13
+ gcc
14
+ graphicsmagick
15
+ nixfmt
16
+ pngquant
17
+ pre-commit
18
+ ripgrep
19
+ ttfautohint
20
+ ];
21
+
22
+ languages = {
23
+ javascript = {
24
+ enable = true;
25
+ package = pkgs.nodejs_24;
26
+ npm = {
27
+ enable = true;
28
+ install = {
29
+ enable = true;
30
+ };
31
+ };
32
+ };
33
+ };
34
+
35
+ dotenv = {
36
+ disableHint = true;
37
+ };
38
+
39
+ enterShell = ''
40
+ if [ -d ".git" ]; then
41
+ pre-commit install --overwrite > /dev/null 2>&1
42
+ fi
43
+ '';
44
+ }
package/devenv.yaml ADDED
@@ -0,0 +1,4 @@
1
+ # yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
2
+ inputs:
3
+ nixpkgs:
4
+ url: github:cachix/devenv-nixpkgs/rolling
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "punchcutter",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Build fonts",
5
5
  "main": "lib/punchcutter.js",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git://github.com/netbek/punchcutter"
8
+ "url": "git://github.com/netbek/punchcutter.git"
9
9
  },
10
10
  "scripts": {
11
- "format-js": "prettier --parser babel --write \"lib/**/*.js\"",
12
11
  "test": "vitest run"
13
12
  },
14
13
  "author": {
@@ -21,33 +20,34 @@
21
20
  "url": "https://github.com/netbek/punchcutter/issues"
22
21
  },
23
22
  "dependencies": {
24
- "autoprefixer": "10.4.20",
23
+ "autoprefixer": "10.5.0",
25
24
  "bluebird": "3.7.2",
26
25
  "chalk": "4.1.2",
27
- "cheerio": "0.22.0",
28
- "directory-colorfy": "https://github.com/netbek/directory-colorfy.git#netbek-jsdom-9",
29
- "fs-extra": "11.2.0",
26
+ "cheerio": "1.2.0",
27
+ "directory-colorfy": "git+https://github.com/netbek/directory-colorfy.git#netbek-jsdom-9",
28
+ "fs-extra": "11.3.5",
30
29
  "globby": "9.2.0",
31
- "grunt": "1.6.1",
30
+ "grunt": "1.6.2",
32
31
  "grunt-webfont": "git+https://github.com/netbek/grunt-webfont.git#netbek-logger-option",
33
- "lodash": "4.17.21",
32
+ "lodash": "4.18.1",
34
33
  "nunjucks": "3.2.4",
35
- "postcss": "8.4.49",
36
- "prettier": "3.3.3",
34
+ "postcss": "8.5.14",
35
+ "prettier": "3.8.3",
37
36
  "replace-ext": "2.0.0",
38
- "sass-embedded": "1.81.0",
39
- "sharp": "0.33.5",
37
+ "sass-embedded": "1.99.0",
38
+ "sharp": "0.34.5",
40
39
  "spritesmith": "3.5.1",
41
- "svgo": "2.8.0",
40
+ "svgo": "2.8.2",
42
41
  "svgstore": "3.0.1"
43
42
  },
44
43
  "devDependencies": {
45
- "@typescript-eslint/eslint-plugin": "7.18.0",
46
- "@typescript-eslint/parser": "7.18.0",
44
+ "@typescript-eslint/eslint-plugin": "8.59.2",
45
+ "@typescript-eslint/parser": "8.59.2",
47
46
  "eslint": "8.57.1",
48
- "eslint-config-prettier": "9.1.0",
49
- "eslint-plugin-prettier": "5.2.1",
50
- "typescript": "5.6.3",
51
- "vitest": "2.1.5"
47
+ "eslint-config-prettier": "9.1.2",
48
+ "eslint-plugin-prettier": "5.5.5",
49
+ "npm-check-updates": "22.1.1",
50
+ "typescript": "6.0.3",
51
+ "vitest": "3.2.4"
52
52
  }
53
53
  }
@@ -1,17 +0,0 @@
1
- version: 2
2
- jobs:
3
- build:
4
- docker:
5
- - image: cimg/node:20.10.0-browsers
6
- steps:
7
- - checkout
8
- - run:
9
- name: Install dependencies
10
- command: |
11
- sudo npm install -g bower grunt-cli gulp-cli
12
- sudo apt-get update -qq
13
- sudo apt-get install -y -qq build-essential fontforge g++ gcc graphicsmagick python3-dev ttfautohint
14
- npm ci
15
- - run:
16
- name: Run tests
17
- command: npm test