Skip to content

Commit d74c101

Browse files
fix(generate_docs): fix travis: use symlink, not hard link when generating docs
1 parent f1acc1a commit d74c101

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

generate_docs.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,9 @@ const TYPEDOC_CONFIG = JSON.parse(fs.readFileSync('./typedoc.json'));
2323
const PACKAGE_DIR = process.cwd();
2424
const DOWNSTREAM_CACHE = path.join(PACKAGE_DIR, '.downstream_cache');
2525
const IS_TRAVIS = !!process.env.TRAVIS;
26-
const DOCGEN_DIR = IS_TRAVIS ? path.join('~', '.docgen') : tmp.dirSync().name;
26+
const DOCGEN_DIR = tmp.dirSync().name;
2727
const DOCGEN_PACKAGE_DIR = path.join(DOCGEN_DIR, kebob(PACKAGE_JSON.name));
2828

29-
if (IS_TRAVIS) {
30-
fs.mkdirSync(path.join('~', '.docgen'));
31-
}
32-
3329
const requiredKeys = [ 'typedoc', 'typedoc.generateOptions' ];
3430
const missing = requiredKeys.find(key => !has(TYPEDOC_CONFIG, key));
3531
if (missing) {
@@ -61,7 +57,7 @@ includes.forEach(include => {
6157
}
6258

6359
publishYalcPackage(path.join(DOWNSTREAM_CACHE, package), repo, flags);
64-
shelljs.ln(path.join(DOWNSTREAM_CACHE, package), path.join(DOCGEN_DIR, kebob(package)));
60+
shelljs.ln('-s', path.join(DOWNSTREAM_CACHE, package), path.join(DOCGEN_DIR, kebob(package)));
6561
});
6662

6763
// symlink node_modules, package.json, typedoc.json into temp dir

0 commit comments

Comments
 (0)