This commit is contained in:
janis
2023-01-22 11:18:30 +01:00
parent 4e1cc69063
commit 1d9b07761a
4 changed files with 40 additions and 15 deletions

38
website/docs/src/build.js Normal file
View File

@@ -0,0 +1,38 @@
/*
*
* impress.js website - build.js
*
* Developed 2023 by Janis Hutz
*
*/
/*
We will convert certain MD files to html and include them in the documentation. This mostly includes the plugin documentation.
If there is no MD file in the directory, there will be no documentation. The script will also automatically build the nav menu
and copy all the necessary files to the correct places.
*/
const fs = require( 'fs' );
const path = require( 'path' );
const md2html = require( 'node-html-markdown' );
const pluginsPath = path.join( __dirname + '/../../../src/plugins' );
let plugins = fs.readdirSync( pluginsPath );
delete plugins[0];
for ( let item in plugins ) {
fs.readFile( path.join( pluginsPath + '/' + plugins[item] + '/README.md' ), ( error, data ) => {
if ( error ) {
parseJS( path.join( pluginsPath + '/' + plugins[item] ) );
} else {
console.log( data );
};
} );
}
function parseJS ( filepath ) {
console.log( 'no readme found' );
let jsFiles = fs.readdirSync( filepath );
}

View File

@@ -1,13 +0,0 @@
/*
*
* impress.js website - build.js
*
* Developed 2023 by Janis Hutz
*
*/
/*
We will convert certain MD files to html and include them in the documentation. This mostly includes the plugin documentation.
If there is no MD file in the directory, there will be no documentation. The script will also automatically build the nav menu
and copy all the necessary files to the correct places.
*/