Go to file
Hans Fast 866516b451 synchronize text 2025-11-22 08:14:07 +01:00
README.md synchronize text 2025-11-22 08:14:07 +01:00
config.ori add package.json 2025-11-22 08:12:12 +01:00
foo.handler.js add package.json 2025-11-22 08:12:12 +01:00
foobar.foo test case for custom filetype handler 2025-11-22 08:07:42 +01:00
package.json add package.json 2025-11-22 08:12:12 +01:00

README.md

filetype handler not working as expected

Following the docs, I have created a file foobar.foo and a handler foo.handler.js.

#foobar.foo
This is the original text
//foo.handler.js
//I believe this is not being used at all, because toString is not exported by @weborigami/origami anymore ... ?
import { toString } from "@weborigami/origami";

export default {
  mediaType: "application/json",
  unpack: (packed) => { return {what: "a text file"} }
}
//config.ori
{
  hello = "world"
  foo.handler = foo.handler.js
}

Expected/Actual results:

When running ori foobar.foo/, I would expect to receive an object {what: "a text file"} but I receive the original text in foobar.foo.

Origami version: 0.6.0