Skip to content

Commit

Permalink
add mf2cli file
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzokuken committed Jun 19, 2024
1 parent cf38c8a commit 151cc99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions mf2cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { MessageFormat } from 'npm:messageformat@next'

const decoder = new TextDecoder("utf-8");
const msg = decoder.decode(Deno.readFileSync(Deno.args[0]));

const mf = new MessageFormat(msg, Deno.args[1].split(','));
console.log(mf.format(JSON.parse(Deno.args[2] ?? '')));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"deploy": "gh-pages --dist _site --branch master",
"build": "eleventy --formats=md,css,pdf,eot,ttf,svg,woff,njk,liquid,jpg && cp CNAME _site/",
"build": "eleventy --formats=md,css,pdf,eot,ttf,svg,woff,njk,liquid,jpg,js && cp CNAME _site/",
"build:slides": "marp --watch ./temporal-2020-04/README.md -o ./temporal-2020-04/index.html --html",
"dev": "eleventy --serve --formats=md,css,pdf,eot,ttf,svg,woff,njk,liquid,jpg"
},
Expand Down

0 comments on commit 151cc99

Please sign in to comment.