Skip to content

Commit

Permalink
πŸ’Ž feat(enhance): add defaults to json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Rettend committed Nov 26, 2023
1 parent f3907e0 commit 8753813
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bin/postinstall.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const process = require('node:process')
const fs = require('node:fs')
const exec = require('node:child_process').exec
const platform = require('node:os').platform()

Expand All @@ -22,3 +23,10 @@ else {
console.log(stdout)
})
}

const schema = require('./../json/eemoji-config-schema.json')
const emojis = require('./../src/emojis.json')

schema.properties.emojis.default = emojis

fs.writeFileSync('./json/eemoji-config-schema.json', JSON.stringify(schema, null, 2))
61 changes: 60 additions & 1 deletion json/eemoji-config-schema.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"emojis",
"format"
],
"properties": {
"format": {
"type": "string"
"type": "string",
"default": "{emoji} {type}: {subject}"
},
"emojis": {
"type": "object",
Expand All @@ -19,6 +24,60 @@
}
}
]
},
"default": {
"fix": {
".": "πŸ”§",
"typo": "✏️",
"bug": "πŸ›"
},
"chore": {
".": "πŸ—‘οΈ",
"release": "πŸ”–",
"cleanup": "🧹",
"license": "πŸ“œ",
"lint": "🧼",
"deps": "πŸ“¦",
"readme": "πŸ“•,πŸ“—,πŸ“˜,πŸ“™"
},
"release": "πŸ”–",
"cleanup": "🧹",
"lint": "🧼",
"deps": {
".": "πŸ“¦",
"up": "⬆️",
"down": "⬇️"
},
"build": {
".": "🦺",
"deps": "πŸ“¦"
},
"docs": {
".": "πŸ“",
"readme": "πŸ“•,πŸ“—,πŸ“˜,πŸ“™"
},
"feat": {
".": "✨",
"enhance": "πŸ’Ž"
},
"enhance": "πŸ’Ž",
"test": "πŸ§ͺ",
"refactor": "♻️",
"init|initial": "πŸŽ‰",
"up": "⬆️",
"down": "⬇️",
"perf": "⚑",
"config": "βš™οΈ",
"style": "🎨",
"ui": "πŸͺŸ",
"text": "πŸ’¬",
"breaking": "πŸ’₯",
"revert": "βͺ",
"ci": "🦾",
"i18n": "🌐",
"wip": "🚧",
"add": "βž•",
"remove": "βž–"
}
}
}
Expand Down

0 comments on commit 8753813

Please sign in to comment.