Skip to content

Commit

Permalink
Copy license to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Aug 15, 2020
1 parent 6789214 commit 432bb1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
node_modules/
test/compiled_tests
public
docs/LICENSE.md

5 changes: 3 additions & 2 deletions build-docs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { mkdir, rmdir, readdir, stat, readFile, writeFile } = require('fs').promises;
const { mkdir, rmdir, readdir, stat, readFile, writeFile, copyFile } = require('fs').promises;
const { join, dirname } = require('path');
const marked = require('./');
const { highlight, highlightAuto } = require('highlight.js');
Expand All @@ -11,6 +11,7 @@ async function init() {
console.log('Cleaning up output directory ' + outputDir);
await rmdir(outputDir, { recursive: true });
await mkdir(outputDir);
await copyFile(join(cwd, 'LICENSE.md'), join(inputDir, 'LICENSE.md'));
const tmpl = await readFile(templateFile, 'utf8');
console.log('Building markdown...');
await build(inputDir, tmpl);
Expand All @@ -27,7 +28,7 @@ async function build(currentDir, tmpl) {
//console.log('Found directory ' + filename);
await build(filename, tmpl);
} else {
//console.log('Reading file ' + filename);
console.log('Reading file ' + filename);
let contents = await readFile(filename, 'utf8');
if (filename.endsWith('.md')) {
const html = marked(contents, {
Expand Down
2 changes: 1 addition & 1 deletion docs/_document.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h1>Marked Documentation</h1>
<li><a href="/code_of_conduct.html">Code of Conduct</a></li>
<li><a href="/authors.html">Authors</a></li>
<li><a href="/publishing.html">Publishing</a></li>
<li><a href="https://github.com/markedjs/marked/blob/master/LICENSE.md">License</a></li>
<li><a href="/license.html">License</a></li>
</ul>
</nav>
<div id="content"><!--{{content}}--></div>
Expand Down

0 comments on commit 432bb1d

Please sign in to comment.