This is a yaml plugin for using translations resources in the yaml format with inlang.
Plugins can be imported directly from GitHub releases via jsDelivr.
// filename: inlang.config.js
export async function defineConfig(env) {
const { default: pluginYaml } = await env.$import(
"https://cdn.jsdelivr.net/gh/felixhaeberle/inlang-plugin-yaml@{version}/dist/index.js"
);
return {
// other properties...
plugins: [
pluginYaml({
pathPattern: "./example/{language}.yml",
}),
],
};
}
The dist directory is used to distribute the plugin directly via CDN like jsDelivr. Using a CDN works because the inlang config uses dynamic imports to import plugins. Read the jsDelivr documentation on importing from GitHub.
For additional usage information, take a look at example.
Run the following commands in your terminal (node and npm must be installed):
npm install
npm run dev
npm run dev
will start the development environment which automatically compiles the src/index.ts files to JavaScript (dist/index.js), runs tests defined in *.test.ts
files and watches changes.
- Run
npm run build
to generate a build. - Commit the new build.
- Create a new release on GitHub that uses Semantic Versioning (SemVer). Take a look at inlang-plugin-json for example releases.
- (Optional) Open a pull request to https://github.com/inlang/ecosystem
Note:
- tags are used without "v" at the beginning like: New Tag: 1.2.2
- JSdeliver cached your plugin for
one week
. If you published a new Version and you want to debug something, you have to specify your version in the link like: ....standard-lint-rules@1.2.2/dist/index.js"