From 7e07699a273b09b1aa23abeb5eaeaaa4f7e16e41 Mon Sep 17 00:00:00 2001 From: Eddie Antonio Santos Date: Tue, 19 May 2020 19:43:57 -0600 Subject: [PATCH] docs(common/lmlayer): update to reflect new package name --- common/models/types/README.md | 19 +++++++++---------- common/models/types/build.sh | 2 +- common/models/types/package.json | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/common/models/types/README.md b/common/models/types/README.md index 9cc33de3ba..df86c7d1ab 100644 --- a/common/models/types/README.md +++ b/common/models/types/README.md @@ -1,5 +1,5 @@ -Lexical Model Types -=================== +`@keymanapp/models-types` +========================= Declares TypeScript types and interfaces required to define **Lexical Models**, **Word breaking functions**, and all things in between. @@ -9,7 +9,7 @@ Install > (see below if you are working in the keymanapp/keyman repo!) - npm install --save-dev @keymanapp/lexical-model-types + npm install --save-dev @keymanapp/models-types Usage ----- @@ -20,7 +20,7 @@ in your lexical model file! ```Typescript // my-nifty-model.ts -import "@keymanapp/lexical-model-types"; +import "@keymanapp/models-types"; export class MyNiftyClass implements LexicalModel { configure(capabilities: Capabilities): Configuration { @@ -42,7 +42,7 @@ export class MyNiftyClass implements LexicalModel { If your are creating a **custom word breaker**, you would do the same: ```typescript -import "@keymanapp/lexical-model-types"; +import "@keymanapp/models-types"; export let myShinyWordBreaker: WordBreakingFunction; myShinyWordBreaker = function (phrase: string): Span[] { @@ -59,11 +59,10 @@ Usage within keymanapp/keyman repo ---------------------------------- To use it in other subprojects within keymanapp/keyman, ensure that this -package is linked using: +package is linked using **Lerna**. From the root of the repository, run: - npm link . + npx lerna bootstrap -The following subprojects already perform `npm link .` as part of their `build.sh`: +Add this dependency to your subproject like so: - common/predictive-text/ - developer/js/ + npx lerna add @keymanapp/models-types path/to/your/subproject diff --git a/common/models/types/build.sh b/common/models/types/build.sh index 039d779800..8d416c12c9 100755 --- a/common/models/types/build.sh +++ b/common/models/types/build.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Packages the lexical-model-types package. +# Packages the @keymanapp/models-types package. # # Exit on command failure and when using unset variables: diff --git a/common/models/types/package.json b/common/models/types/package.json index 2b855e81b4..f4453b580a 100644 --- a/common/models/types/package.json +++ b/common/models/types/package.json @@ -28,7 +28,7 @@ "bugs": { "url": "https://github.com/keymanapp/keyman/issues" }, - "homepage": "https://github.com/keymanapp/keyman/tree/master/common/lexical-model-types#readme", + "homepage": "https://github.com/keymanapp/keyman/tree/master/common/models/types#readme", "devDependencies": { "typescript": "^3.6.3" },