Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MODULE_NAME := $(shell node -e "console.log(require('./package.json').binary.module_name)")
OS=$(shell uname | tr A-Z a-z)

# Whether to turn compiler warnings into errors
export WERROR ?= false
Expand All @@ -11,11 +12,21 @@ default: release
npm install --ignore-scripts

release: ./node_modules/.bin/node-pre-gyp
ifeq ($(OS),darwin)
./scripts/setup.sh --config local.env
. local.env; V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error
else
V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error
endif
@echo "run 'make clean' for full rebuild"

debug: ./node_modules/.bin/node-pre-gyp
ifeq ($(OS),darwin)
./scripts/setup.sh --config local.env
. local.env; V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error --debug
else
V=1 ./node_modules/.bin/node-pre-gyp configure build --error_on_warnings=$(WERROR) --loglevel=error --debug
endif
@echo "run 'make clean' for full rebuild"

coverage:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"font-inspect": "./bin/font-inspect"
},
"scripts": {
"install": "node-pre-gyp install --fallback-to-build=true",
"install": "./scripts/setup.sh --config local.env; . local.env; node-pre-gyp install --fallback-to-build=true",
"test": "./node_modules/.bin/tape test/**/*.test.js",
"prepublishOnly": "npm ls"
},
Expand Down
2 changes: 1 addition & 1 deletion src/glyphs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ void RangeAsync(uv_work_t* req) {
// direct type conversions, no need for checking or casting
glyph_writer.add_uint32(3, glyph.width);
glyph_writer.add_uint32(4, glyph.width);
glyph_writer.add_sint32(5, glyph.width);
glyph_writer.add_sint32(5, static_cast<int32_t>(glyph.width));

// conversions requiring checks, for safety and correctness

Expand Down