logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 9b2fe04faee059960c59d901462f5e67dbc2a10d
parent f1c66a7b3e21844d61290786075f0c22be4d4f89
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 16 Nov 2023 03:32:26 +0100

dev-nodejs/kuroshiro: add 1.2.0-r0:0 for CommonJS

Diffstat:

Adev-nodejs/kuroshiro/kuroshiro-1.2.0-r0.ebuild29+++++++++++++++++++++++++++++
1 file changed, 29 insertions(+), 0 deletions(-)

diff --git a/dev-nodejs/kuroshiro/kuroshiro-1.2.0-r0.ebuild b/dev-nodejs/kuroshiro/kuroshiro-1.2.0-r0.ebuild @@ -0,0 +1,29 @@ +# Copyright 2023 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit nodejs + +DESCRIPTION="Convert Japanese to Hiragana, Katakana or Romaji with furigana and okurigana modes" +HOMEPAGE="https://kuroshiro.org/" +SRC_URI="https://github.com/hexenq/kuroshiro/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +BDEPEND="dev-util/esbuild" + +RESTRICT="test" # Uses jest + +src_prepare() { + default + # Needed for CommonJS + sed -i 's;export default ;module.exports = ;' src/index.js || die +} + +src_compile() { + # Uses babel by default, let's use esbuild for now instead to create a similar result + esbuild --bundle src/index.js --outdir=lib --minify --sourcemap --format=cjs || die +}