From 1d9b07761a6b80179648f47fafadf9613b31bc95 Mon Sep 17 00:00:00 2001 From: janis Date: Sun, 22 Jan 2023 11:18:30 +0100 Subject: [PATCH] build --- package.json | 4 +-- website/docs/src/build.js | 38 ++++++++++++++++++++++ website/docs/src/build/build.js | 13 -------- website/docs/src/{build => }/template.html | 0 4 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 website/docs/src/build.js delete mode 100644 website/docs/src/build/build.js rename website/docs/src/{build => }/template.html (100%) diff --git a/package.json b/package.json index 5bdf9dc..f7c1e2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "impress.js", - "version": "1.1.0", + "version": "2.1.0", "description": "It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.", "main": "js/impress.js", "repository": { @@ -27,7 +27,7 @@ "lint": "npm exec -- jshint src test/*.js && npm exec -- jscs src test/*.js", "new-lint": "npm exec -- eslint src test", "test": "npm exec -- karma start --log-level debug --single-run=true", - "build-website": "node ./website/src/build.js" + "build-website": "node ./website/docs/src/build.js" }, "devDependencies": { "eslint": "^6.8.0", diff --git a/website/docs/src/build.js b/website/docs/src/build.js new file mode 100644 index 0000000..5d9ebbc --- /dev/null +++ b/website/docs/src/build.js @@ -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 ); +} \ No newline at end of file diff --git a/website/docs/src/build/build.js b/website/docs/src/build/build.js deleted file mode 100644 index b468c33..0000000 --- a/website/docs/src/build/build.js +++ /dev/null @@ -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. -*/ \ No newline at end of file diff --git a/website/docs/src/build/template.html b/website/docs/src/template.html similarity index 100% rename from website/docs/src/build/template.html rename to website/docs/src/template.html