mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-16 10:57:35 +00:00
Merge pull request #16412 from keymanapp/fix/developer/kmc-convert-build-publish-cleanup
fix(developer): clean kmc-convert build.sh with new publish patterns
This commit is contained in:
commit
c33cd2d733
3 changed files with 108 additions and 34 deletions
101
developer/docs/api/etc/kmc-convert.api.md
Normal file
101
developer/docs/api/etc/kmc-convert.api.md
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
## API Report File for "@keymanapp/kmc-convert"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { CompilerCallbacks } from '@keymanapp/developer-utils';
|
||||
import { CompilerEvent } from '@keymanapp/developer-utils';
|
||||
import { CompilerOptions } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerArtifacts } from '@keymanapp/developer-utils';
|
||||
import { KeymanCompilerResult } from '@keymanapp/developer-utils';
|
||||
|
||||
// @public
|
||||
export class Converter implements KeymanCompiler {
|
||||
init(callbacks: CompilerCallbacks, options: CompilerOptions): Promise<boolean>;
|
||||
// Warning: (ae-forgotten-export) The symbol "ConverterResult" needs to be exported by the entry point main.d.ts
|
||||
run(inputFilename: string, outputFilename?: string): Promise<ConverterResult>;
|
||||
// Warning: (ae-forgotten-export) The symbol "ConverterArtifacts" needs to be exported by the entry point main.d.ts
|
||||
write(artifacts: ConverterArtifacts): Promise<boolean>;
|
||||
}
|
||||
|
||||
// Warning: (ae-internal-missing-underscore) The name "ConverterMessages" should be prefixed with an underscore because the declaration is marked as @internal
|
||||
//
|
||||
// @internal (undocumented)
|
||||
export class ConverterMessages {
|
||||
// (undocumented)
|
||||
static ERROR_FileNotFound: number;
|
||||
// (undocumented)
|
||||
static Error_FileNotFound: (o?: {
|
||||
inputFilename: string | null;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_InvalidFile: number;
|
||||
// (undocumented)
|
||||
static Error_InvalidFile: (o: {
|
||||
errorText: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_NoConverterFound: number;
|
||||
// (undocumented)
|
||||
static Error_NoConverterFound: (o: {
|
||||
inputFilename: string;
|
||||
outputFilename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnableToConvert: number;
|
||||
// (undocumented)
|
||||
static Error_UnableToConvert: (o: {
|
||||
inputFilename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnableToParse: number;
|
||||
// (undocumented)
|
||||
static Error_UnableToParse: () => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnableToRead: number;
|
||||
// (undocumented)
|
||||
static Error_UnableToRead: (o: {
|
||||
errorText: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnableToReadFile: number;
|
||||
// (undocumented)
|
||||
static Error_UnableToReadFile: (o: {
|
||||
inputFilename: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnableToWrite: number;
|
||||
// (undocumented)
|
||||
static Error_UnableToWrite: (o: {
|
||||
outputFilename: string;
|
||||
errorText: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UndefinedActionDetected: number;
|
||||
// (undocumented)
|
||||
static Error_UndefinedActionDetected: (o: {
|
||||
action: string;
|
||||
KeyName: string;
|
||||
keymapIndex: string;
|
||||
}) => CompilerEvent;
|
||||
// (undocumented)
|
||||
static ERROR_UnsupportedCharactersDetected: number;
|
||||
// (undocumented)
|
||||
static Error_UnsupportedCharactersDetected: (o: {
|
||||
keymapIndex: string;
|
||||
key: string;
|
||||
KeyName: string;
|
||||
output: string;
|
||||
}) => CompilerEvent;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface ConverterOptions extends CompilerOptions {
|
||||
failIfIncomplete?: boolean;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Keyman is copyright (C) SIL International. MIT License.
|
||||
#
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
|
|
@ -7,6 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/typescript.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/ci/ci-publish.inc.sh"
|
||||
|
||||
builder_describe "Keyman kmc-convert keyboard conversion tools module" \
|
||||
|
|
@ -14,14 +18,7 @@ builder_describe "Keyman kmc-convert keyboard conversion tools module" \
|
|||
"@/common/web/types" \
|
||||
"@/developer/src/common/web/utils" \
|
||||
"@/developer/src/common/web/test-helpers" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"api analyze API and prepare API documentation" \
|
||||
"clean" \
|
||||
"test" \
|
||||
"publish publish to npm" \
|
||||
"--npm-publish+ For publish, do a npm publish, not npm pack (only for CI)" \
|
||||
"--dry-run,-n don't actually publish, just dry run"
|
||||
clean configure build api test
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
|
|
@ -35,17 +32,5 @@ builder_parse "$@"
|
|||
builder_run_action clean rm -rf ./build/ ./tsconfig.tsbuildinfo
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action build tsc --build
|
||||
builder_run_action api api-extractor run --local --verbose
|
||||
|
||||
do_test() {
|
||||
eslint .
|
||||
cd test
|
||||
tsc -b
|
||||
cd ..
|
||||
readonly C8_THRESHOLD=20
|
||||
c8 -skip-full --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha "${builder_extra_params[@]}"
|
||||
builder_echo warning "Coverage thresholds are currently $C8_THRESHOLD%, which is lower than ideal."
|
||||
builder_echo warning "Please increase threshold in build.sh as test coverage improves."
|
||||
}
|
||||
|
||||
builder_run_action test do_test
|
||||
builder_run_action api typescript_run_api_extractor developer/src/kmc-convert main.d.ts
|
||||
builder_run_action test typescript_run_eslint_mocha_tests
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* Config file for API Extractor. For more info, please visit: https://api-extractor.com
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"extends": "../../../config/api-extractor.base.json",
|
||||
"mainEntryPointFilePath": "<projectFolder>/build/src/main.d.ts",
|
||||
"docModel": {
|
||||
"enabled": true,
|
||||
"projectFolderUrl": "http://github.com/keymanapp/keyman/tree/master/developer/src/kmc-convert"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue