docs(common/lmlayer): update to reflect new package name

This commit is contained in:
Eddie Antonio Santos 2020-05-19 19:43:57 -06:00
parent 8df4948e68
commit 7e07699a27
No known key found for this signature in database
GPG key ID: DD411EA4D9509D87
3 changed files with 11 additions and 12 deletions

View file

@ -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

View file

@ -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:

View file

@ -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"
},