build using make

This commit is contained in:
Koen Lagveen 2023-07-03 20:28:10 +02:00
parent 73212f3f48
commit 245ce0ce52
4 changed files with 16 additions and 8 deletions

View File

@ -19,9 +19,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm test
npx eslint *.js
run:
- make
env:
CI: true

13
Makefile Normal file
View File

@ -0,0 +1,13 @@
default: install lint test fonts/stylesheets/stylesheet.css
install:
npm install
lint:
npx eslint *.js
test:
npx ajv -c ajv-formats -s fonts-schema.json -d fonts.json
fonts/stylesheets/stylesheet.css: fonts/stylesheets/fonts.less
npx lessc $^ $@

View File

@ -21,7 +21,7 @@ Please feel free to make a little [donation via PayPal](https://paypal.me/koenla
- All font files (and directories) are normalized to lowercase, without `-mono` unless it's really part of the name.
- The [fonts.less](https://github.com/braver/programmingfonts/blob/gh-pages/fonts/stylesheets/fonts.less) registers the variants for each font "alias" and is used to generate the stylesheets.
- The license needs to allow serving in a website, or an agreement with the font creators needs to be made. If available we add the license along with the font files.
- Running `npm install && npm run test` checks the json and builds the stylesheet.
- Running `make` checks the json and builds the stylesheet.
## Todo's

View File

@ -3,9 +3,6 @@
"version": "1.0.0",
"description": "Test drive programming fonts online",
"main": "index.js",
"scripts": {
"test": "ajv -c ajv-formats -s fonts-schema.json -d fonts.json && cd fonts/stylesheets/ && lessc fonts.less stylesheet.css"
},
"repository": {
"type": "git",
"url": "git+https://github.com/braver/programmingfonts.git"