From ac0152c53fdc20b5aca0015a237df5ca95943709 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Thu, 24 Feb 2022 15:17:57 +0100 Subject: [PATCH 1/4] fix linkrot to Components-Generator.js in ts workflow --- docs/getting_started/basics/workflow_ts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting_started/basics/workflow_ts.md b/docs/getting_started/basics/workflow_ts.md index fff1ed1..b2d7008 100644 --- a/docs/getting_started/basics/workflow_ts.md +++ b/docs/getting_started/basics/workflow_ts.md @@ -13,7 +13,7 @@ These will be explained in detail in the following sections. ### 1. Setup module and component generation -Using the [`componentsjs-generator`](https://raw.githubusercontent.com/LinkedSoftwareDependencies/Components-Generator.js) tool, +Using the [`componentsjs-generator`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js) tool, our declarative components from our TypeScript classes. **1. Install as a dev dependency** @@ -63,7 +63,7 @@ Call `componentsjs-generator` as a npm script by adding a `scripts` entry to you This is only a _recommended_ way of calling `componentsjs-generator`, you are free to call it in a different way that better suits your pipeline. -Please refer to the README of [`componentsjs-generator`](https://raw.githubusercontent.com/LinkedSoftwareDependencies/Components-Generator.js) +Please refer to the README of [`componentsjs-generator`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js) for more details on how to change the default options of this tool. **4. _(optional)_ Ignore generated components files** From 35d49cf36d3c4665cc5a593db68a3c352bc65367 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Thu, 24 Feb 2022 15:35:33 +0100 Subject: [PATCH 2/4] notify users of expected location of components using 'lsd:module': true --- docs/getting_started/basics/workflow_ts.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/getting_started/basics/workflow_ts.md b/docs/getting_started/basics/workflow_ts.md index b2d7008..d5948e3 100644 --- a/docs/getting_started/basics/workflow_ts.md +++ b/docs/getting_started/basics/workflow_ts.md @@ -62,6 +62,7 @@ Call `componentsjs-generator` as a npm script by adding a `scripts` entry to you This is only a _recommended_ way of calling `componentsjs-generator`, you are free to call it in a different way that better suits your pipeline. +Note that `componentsjs-generator` expects that the components are located inside a `components/` folder. Please refer to the README of [`componentsjs-generator`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js) for more details on how to change the default options of this tool. From 21529b96355e237ca3d6710bfb825ffb21551d17 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Thu, 24 Feb 2022 15:40:36 +0100 Subject: [PATCH 3/4] Update docs/getting_started/basics/workflow_ts.md --- docs/getting_started/basics/workflow_ts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started/basics/workflow_ts.md b/docs/getting_started/basics/workflow_ts.md index d5948e3..2140e98 100644 --- a/docs/getting_started/basics/workflow_ts.md +++ b/docs/getting_started/basics/workflow_ts.md @@ -62,7 +62,7 @@ Call `componentsjs-generator` as a npm script by adding a `scripts` entry to you This is only a _recommended_ way of calling `componentsjs-generator`, you are free to call it in a different way that better suits your pipeline. -Note that `componentsjs-generator` expects that the components are located inside a `components/` folder. +By default, `componentsjs-generator` will output generated components into the `components/` directory. Please refer to the README of [`componentsjs-generator`](https://github.com/LinkedSoftwareDependencies/Components-Generator.js) for more details on how to change the default options of this tool. From cd81b317999db85db15894451b613d97638e55c1 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Mon, 28 Feb 2022 16:50:57 +0100 Subject: [PATCH 4/4] Add Advanced: Using a new plugin --- docs/getting_started/basics/exposing_components.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/getting_started/basics/exposing_components.md b/docs/getting_started/basics/exposing_components.md index 1d10540..aab82fc 100644 --- a/docs/getting_started/basics/exposing_components.md +++ b/docs/getting_started/basics/exposing_components.md @@ -22,7 +22,7 @@ For example: By enabling this flag, this module will -* receive a module identifier in the form of `https://linkedsoftwaredependencies.org/bundles/npm/my-plugin`; +* receive a module identifier in the form of `https://linkedsoftwaredependencies.org/bundles/npm/my-plugin`; (`my-plugin` is your package `name`) * expose its components if `components/components.jsonld` exists; * expose its context if `components/context.json` exists; * expose its components and config folder if `components/` or `config/` exist. @@ -49,6 +49,13 @@ For instance, the `"lsd:module": true` is typically equivalent to: If you however want to adapt any of the above default entries, you can make use of the more advanced options below. +### Advanced: Using a new plugin + +Project A uses components.js but some functionality is missing or lacking. Creating a Library that implements an interface or extends a class from Project A is an easy way to fix it's shortcomings. + +To use this new functionality a new config is required. After copying an existing config it's time to add the new class where needed, also add the Library's context to the config file, something like `https://linkedsoftwaredependencies.org/bundles/npm/my-plugin/^1.0.0/components/context.jsonld`. +Project A needs the new Library as dependency so the new component is found by compenents.js. + ### Advanced: Custom module URL The URL of your module can be defined using `"lsd:module"`: