Skip to content

Commit

Permalink
fix docs build (no longer in a monorepo)
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-darkly committed Nov 5, 2019
1 parent f2e3d8a commit 696388c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ html: prepare
../node_modules/.bin/typedoc --options typedoc.js

prepare:
cd .. && npm install typedoc
rm -rf build
mkdir build
@# Extract the whole module declaration from launchdarkly-js-sdk-common, then remove the first and last lines
sed -n '/^declare module/,/^}/p' ../packages/launchdarkly-js-sdk-common/typings.d.ts | \
sed -n '/^declare module/,/^}/p' ../node_modules/launchdarkly-js-sdk-common/typings.d.ts | \
sed '1d;$$d' \
>build/common-excerpt
@# Replace the block from DOCBUILD-START-REPLACE to DOCBUILD-END-REPLACE with that excerpt
sed -e '/DOCBUILD-END-REPLACE/r build/common-excerpt' ../packages/launchdarkly-js-client-sdk/typings.d.ts | \
sed -e '/DOCBUILD-END-REPLACE/r build/common-excerpt' ../typings.d.ts | \
sed -e '/DOCBUILD-START-REPLACE/,/DOCBUILD-END-REPLACE/d' >build/typings.d.ts
2 changes: 1 addition & 1 deletion docs/typedoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

let version = process.env.VERSION;
if (!version) {
const package = require('../packages/launchdarkly-js-client-sdk/package.json');
const package = require('../package.json');
version = package.version;
}

Expand Down

0 comments on commit 696388c

Please sign in to comment.