diff --git a/docs/Makefile b/docs/Makefile index b8607a79..c773c30e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -22,7 +22,7 @@ html: prepare prepare: cp ../package.json before-typedoc-package.json cp ../package-lock.json before-typedoc-package-lock.json - cd .. && npm install "typedoc@<0.20.0" + cd .. && npm install "typedoc@0.23.17" rm -rf build mkdir build @# Extract the whole module declaration from launchdarkly-js-sdk-common, then remove the first and last lines diff --git a/docs/doc.md b/docs/doc.md new file mode 100644 index 00000000..30d247ce --- /dev/null +++ b/docs/doc.md @@ -0,0 +1,7 @@ + +This is the API reference for the LaunchDarkly SDK for browser JavaScript. + +In typical usage, you will call {@link initialize} once at startup time to obtain an instance of +{@link LDClient}, which provides access to all of the SDK's functionality. + +For more information, see the [SDK reference guide](https://docs.launchdarkly.com/sdk/client-side/javascript). diff --git a/docs/typedoc.js b/docs/typedoc.js index 951b34f6..56169880 100644 --- a/docs/typedoc.js +++ b/docs/typedoc.js @@ -12,8 +12,7 @@ if (!version) { module.exports = { out: './build/html', name: 'LaunchDarkly JavaScript SDK (' + version + ')', - readme: 'none', // don't add a home page with a copy of README.md - mode: 'file', // don't treat "typings.d.ts" itself as a parent module - includeDeclarations: true, // allows it to process a .d.ts file instead of actual TS code - entryPoint: '"launchdarkly-js-client-sdk"' // note extra quotes - workaround for a TypeDoc bug + readme: 'doc.md', + entryPointStrategy: 'resolve', // Allows us to specify the specific entrypoints. + entryPoints: ["./build/typings.d.ts"] // This is the updated version created by the makefile. }; diff --git a/package.json b/package.json index d90e80c6..d0efc79b 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ }, "dependencies": { "escape-string-regexp": "^4.0.0", - "launchdarkly-js-sdk-common": "3.8.1" + "launchdarkly-js-sdk-common": "3.8.2" }, "repository": { "type": "git", diff --git a/typings.d.ts b/typings.d.ts index d2a1527b..416c91d0 100644 --- a/typings.d.ts +++ b/typings.d.ts @@ -1,11 +1,4 @@ -/** - * This is the API reference for the LaunchDarkly SDK for browser JavaScript. - * - * In typical usage, you will call [[initialize]] once at startup time to obtain an instance of - * [[LDClient]], which provides access to all of the SDK's functionality. - * - * For more information, see the [SDK reference guide](https://docs.launchdarkly.com/sdk/client-side/javascript). - */ +// Put top level documentation into docs/doc.md. declare module 'launchdarkly-js-client-sdk' { //// DOCBUILD-START-REPLACE (see docs/Makefile)