Origami Frontend Components & Services

Readme: origami-component-converter

What is this?

This is a tool used during build process of Origami components, to prepare them for publish on npm.

how does it do that?

It gets run in the project directory of a component.

First, it converts the bower.json to an npm-ready package.json and writes it to disk.

Then, it compiles the javascript to esm using babel. The babel-plugin-import-rewrite plugin uses the generated aliases field to rewrite any dependencies whose names differ between bower and npm.

We remove the aliases field, and then the package is ready to publish.

How do I use it?

Oh? You've got an Origami component you want to put on npm?

Great! 😊

$ cd o-component
$ latest_version=$(git tag | sort -V | tail -1 | grep -Eo '\d+\.\d+\.\d+')
$ npx occ $latest
$ npm publish --access public

If the above code does not work for your component, please contact Origami via Slack (#origami-support) or opening an issue on this repository.

Status
active Origami v1 (Bower)
Switch component view

GitHub Repository