Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

New plugin #855

Open
robhicks opened this issue Apr 5, 2016 · 3 comments
Open

New plugin #855

robhicks opened this issue Apr 5, 2016 · 3 comments

Comments

@robhicks
Copy link
Contributor

robhicks commented Apr 5, 2016

I have developed a new plugin to use i18next to translate text/html when imported.

Is such a plugin be of any value to the registry?

If so, how do I test it as a plugin? I have attempted to link it. Currently, I have tested it's functionality in it's own repo.

@guybedford
Copy link
Member

Sure a PR would be welcome here. Plugins go at the top of the registry.json file.

The name in the registry becomes the name it should be used as a plugin - jspm install i18ntext would mean that the plugin is referred to as loader: 'i18next'.

It may be worth adding a jspm dependency on i18next in the package.json as well so it is installed along with the plugin itself.

To test installing through jspm, I'd suggest using jspm 0.17 as it has a much better linking workflow where you can run jspm link ../../path/to/local-plugin npm:[email protected] to link it through as if it were being installed from the remote.

The remote install can also be tested without it being in the registry by simply running jspm install i18next=github:robhicks/plugin-i18next.

Just let me know if I can help further here at all.

@robhicks
Copy link
Contributor Author

robhicks commented Apr 6, 2016

@guybedford Thanks for the direction. I decided to try to go the jspm beta 0.17 route. I've been wanting to try it out.

When I did I found a problem with initializing the repo. Using the Quick init mode, it errors out after selecting babel as the transpiler:

err  Repo jspm:plugin-babel not found. Perhaps try jspm install npm:plugin-babel.

I know a plugin-babel is referenced in the jspm registry so I'm not sure why it can't find it. It appears from the readme to the registry that 0.17 should be supported. And in looking in the registry it references "npm:systemjs-plugin-babel", which I successfully installed.

But even after installing it, I'm not sure how to get the transpiler hooked in. Any help you can offer would be greatly appreciated.

BTW, jspm is awesome!

@guybedford
Copy link
Member

Sure, no problem. plugin-babel is definitely in the registry at https://github.com/jspm/registry/blob/master/registry.json#L15, so perhaps check if you're using a custom registry here?

@guybedford guybedford reopened this Apr 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants