You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yes, writing a codedoc plugin for easy consumption of the component, and publishing it on NPM. I guess we should also add a page to the docs somewhere for community plugins now, so would appreciate if you would mention the final plugin here as well.
I managed to merge the code of the component with that of the plugin into the p5-plugin, i.e., I just added the plugin export function p5Plugin(): ConfigOverride to the index.tsx component file. It works as expected by:
Since this is my first node package I have several questions:
Should I use a scoped package? If so, should it go inside @codedoc/ or @connectv/?
Will import { p5Plugin } from './p5-plugin/index'; still be the line to import the plugin into config.ts once the package is created, published and installed? Or how should it be imported?
Is there any naming convention to be followed for the plugins, e.g., p5-codedoc-plugin?
Should I use a scoped package? If so, should it go inside @codedoc/ or @connectv/?
no. scoped packages are for organizational packages. since you are the primary maintainer of this package and not @codedoc or @connectv organizations, I suspect a better naming scheme would be codedoc-p5-plugin or something.
Will import { p5Plugin } from './p5-plugin/index'; still be the line to import the plugin into config.ts once the package is created, published and installed? Or how should it be imported?
nope, it will be something like import { p5Plugin } from 'codedoc-p5-plugin';.
p.s. publishing a typescript-based package can have some nuances, so I would also recommend taking a look at this plugin, specifically package.json and conf/typescript folders if you run into issues for proper exports (this is the template that I use for all typescript packages I publish).
Activity
loreanvictor commentedon Dec 17, 2020
yes, writing a codedoc plugin for easy consumption of the component, and publishing it on NPM. I guess we should also add a page to the docs somewhere for community plugins now, so would appreciate if you would mention the final plugin here as well.
nakednous commentedon Jan 10, 2021
I managed to merge the code of the component with that of the plugin into the p5-plugin, i.e., I just added the plugin
export function p5Plugin(): ConfigOverrideto the index.tsx component file. It works as expected by:p5-plugindir contents into.codedoc.config.ts:Since this is my first node package I have several questions:
@codedoc/or@connectv/?import { p5Plugin } from './p5-plugin/index';still be the line to import the plugin intoconfig.tsonce the package is created, published and installed? Or how should it be imported?loreanvictor commentedon Jan 13, 2021
no. scoped packages are for organizational packages. since you are the primary maintainer of this package and not
@codedocor@connectvorganizations, I suspect a better naming scheme would becodedoc-p5-pluginor something.nope, it will be something like
import { p5Plugin } from 'codedoc-p5-plugin';.p.s. publishing a typescript-based package can have some nuances, so I would also recommend taking a look at this plugin, specifically
package.jsonandconf/typescriptfolders if you run into issues for proper exports (this is the template that I use for all typescript packages I publish).