diff --git a/README.md b/README.md index 6084a6230..0a561823c 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,13 @@ The GDDocs website can be found [here](https://docs.gdprogra.me/#/) GDDocs is built off of the `docsify` engine, outputted to a generator file to be able to work well on server environments, rather than GitHub pages. This is primarily to allow for easy domain usage and development in a place where it can always update, and be hosted upon locally rather than over GitHub's servers. -As such, rather than having to install using the package.json; (which we would recommended doing anyways using `npm install`,) the installation and such has been included in `generator.js`. - -```plain -node generator.js +```sh +npm install +npm run run ``` To debug it, you will need to properly clone or pull this repository. ## Contributing -Contributions are preferably made to the documentation, rather than the simple `generator.js` file; unless need be. Contributions to all aspects of this project are preferred to be made over pull requests and issues. Ideas on what to contribute or read over can be read in the [issues](https://github.com/gd-programming/gddocs/issues) section of this repository. - +Contributions to all aspects of this project are preferred to be made over pull requests and issues. Ideas on what to contribute or read over can be read in the [issues](https://github.com/gd-programming/gddocs/issues) section of this repository. diff --git a/generator.js b/generator.js deleted file mode 100644 index d166c0e1a..000000000 --- a/generator.js +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint no-console: ["error", { allow: ["log", "warn", "error"] }] */ -const childProcess = require("child_process"); -const chalk = require("chalk"); -const os = require("os"); - -require("./scripts/installPackages.js"); // install packages - -// serve data -let command = "node ./node_modules/docsify-cli/bin/docsify serve ./docs --port 9505"; - -if (os.platform() === "win32") { - command = "node \"./node_modules/docsify-cli/bin/docsify\" serve ./docs --port 9505"; -} - -console.log(`${chalk.hex("#66d9ff")("Running Command: ")} ${command}\n`); - -const docsProcess = childProcess.exec(command); - -docsProcess.on("exit", () => process.exit(0)); \ No newline at end of file diff --git a/package.json b/package.json index 3039af308..21d5ea6ad 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "GD Documentation", "main": "generator.js", "scripts": { - "run": "node generator.js" + "run": "docsify serve ./docs --port 9505" }, "repository": { "type": "git", @@ -20,7 +20,6 @@ }, "homepage": "https://github.com/gd-programming/gddocs#readme", "dependencies": { - "chalk": "^4.0.0", "docsify-cli": "^4.4.0" } } diff --git a/scripts/installPackages.js b/scripts/installPackages.js deleted file mode 100644 index abd31377f..000000000 --- a/scripts/installPackages.js +++ /dev/null @@ -1,14 +0,0 @@ -// install_packages.js -// made by Homura -const chalk = require("chalk"); -const fs = require("fs"); -const childProcess = require("child_process"); - -const package = require("../package.json"); -const missing = Object.keys(package.dependencies) - .filter((package) => !fs.existsSync(`../node_modules/${package}`)); - -if (missing.length > 0) { - console.log(chalk.hex("#79b0fc")("Installing Packages: ") + missing.join(", ")); - childProcess.exec(`npm i --save ${missing.join(" ")}`); -} \ No newline at end of file