mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-16 02:14:12 +03:00
39269e7d39
* Add "license" object to the data file JSON schema * Add license to GNU and GNU social As an example, based on the discussion in: https://github.com/simple-icons/simple-icons/issues/1167 * Use `"additionalProperties": false` in JSON schema ... to detect properties in the data file that shouldn't be there. For more info, see: https://json-schema.org/understanding-json-schema/reference/object.html * Update JSON scheme descriptions * Switch from jsonlint2 to jsonschema This gives is better support for advanced features of JSON schema. A couple of clarifications: - There does exist a jsonschema-cli package, but it is rather limited and crucially doens't exit with a non-zero exit code if there is an error. (it is also pretty old and not maintained), hence the custom script. - I renamed .jsonlintschema 1) for clarity (lint is no longer accurate) and 2) the .json extension allows easy imorting in the script and 3) it adds syntax highlighting. - The script outputs the number of errors in the end because the output gets pretty big pretty quickly, this way you can see it easily from your CLI. - We could customize how the errors are logged, but I feel that is beyond this PR. * Two minor changes * Use `oneOf` to require URL for custom licenses The updated configuration allows the `"license"` field to be either 1) a SPDX license, optional with a URL 2) a "custom" license with a required URL Read more about the "oneOf" feature of jsonschema at: https://json-schema.org/understanding-json-schema/reference/combining.html#oneof * Include license field in Contributing Guidelines
52 lines
1.4 KiB
JSON
52 lines
1.4 KiB
JSON
{
|
|
"name": "simple-icons",
|
|
"version": "4.11.0",
|
|
"description": "SVG icons for popular brands https://simpleicons.org",
|
|
"homepage": "https://www.simpleicons.org",
|
|
"keywords": [
|
|
"svg",
|
|
"icons"
|
|
],
|
|
"main": "index.js",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+ssh://git@github.com/simple-icons/simple-icons.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/simple-icons/simple-icons/issues"
|
|
},
|
|
"author": "Simple Icons Collaborators",
|
|
"license": "CC0-1.0",
|
|
"devDependencies": {
|
|
"editorconfig-checker": "3.3.0",
|
|
"jest": "26.6.3",
|
|
"jest-diff": "26.6.2",
|
|
"jsonschema": "1.4.0",
|
|
"npm-run-all": "4.1.5",
|
|
"svg-path-bbox": "0.2.0",
|
|
"svglint": "1.0.7",
|
|
"svgo": "1.3.2",
|
|
"svgpath": "2.3.0",
|
|
"uglify-js": "3.12.7"
|
|
},
|
|
"scripts": {
|
|
"build": "node scripts/build-package.js",
|
|
"clean": "rm -f icons/*.js index.js",
|
|
"lint": "run-s our-lint jsonlint svglint wslint",
|
|
"our-lint": "node scripts/lint.js",
|
|
"jsonlint": "node scripts/jsonlint.js",
|
|
"svglint": "svglint icons/*.svg --ci",
|
|
"wslint": "editorconfig-checker -exclude \\.svg$",
|
|
"prepublishOnly": "npm run build",
|
|
"postpublish": "npm run clean",
|
|
"test": "jest",
|
|
"pretest": "npm run prepublishOnly",
|
|
"posttest": "npm run postpublish",
|
|
"svgo": "svgo --config=./.svgo.yml",
|
|
"get-filename": "node scripts/get-filename.js"
|
|
},
|
|
"engine": {
|
|
"node": ">=0.12.18"
|
|
}
|
|
}
|