GithubHelp home page GithubHelp logo

anshul137 / ag-ssg Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 4.0 2.28 MB

Static Site Generator

Home Page: https://anshul137.github.io/ag-ssg/

License: MIT License

JavaScript 91.20% CSS 2.61% HTML 6.20%

ag-ssg's Introduction

Hey! Everyone

Welcome to my page!

Badge Board

An image of @anshul137's Holopin badges, which is a link to view their full Holopin profile

ag-ssg's People

Contributors

anshul137 avatar myrfion avatar

Stargazers

 avatar

Watchers

 avatar

ag-ssg's Issues

Add config support

The configuration always makes it easier to use the tool, especially if you do it frequently and don't want to write a colossal command every time. I want to implement the functionality that would add the --config flag and use the config.json to configure the tool

Error when attempting to use `--input` flag

When attempting to execute the program with the --input flag on the CLI, an error message is returned and no output HTML files are generated.

Attempted command:

PS C:\Users\<username>\Documents\School\DPS909\Asn\A1\ag-ssg> node app.js -i "textfile\Silver Blaze.txt"

Resulting output:

Version details: 0.1
Name of the package:ssg
input:textfile\Silver Blaze.txt
file:///C:/Users/username/Documents/School/DPS909/Asn/A1/ag-ssg/index.js:24
    fs.rm(dir, { recursive: true });
       ^

TypeError: fs.rm is not a function
    at ssg_ (file:///C:/Users/username/Documents/School/DPS909/Asn/A1/ag-ssg/index.js:24:8)
    at file:///C:/Users/username/Documents/School/DPS909/Asn/A1/ag-ssg/app.js:33:3
    at ModuleJob.run (internal/modules/esm/module_job.js:138:23)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
PS C:\Users\username\Documents\School\DPS909\Asn\A1\ag-ssg>

Addition of initial Markdown support

I'd like to add to your code so that it can parse .md files and output appropriate HTML based on the Markdown format.

I intend to add support for the # header1 and ## header2 syntax features, such that if a line of texts begins with '#' or '##', it will be placed inside an <h1> or <h2> element, respectively, rather than a <p> element.

This should only entail some minor edits to your writeFile(filename, data) function.

README.md file - minor errors

A few minor spelling errors are present in the README.md file.

Also, I think some of the instructions could be a little clearer โ€” for example, the "clone repos into your local drive" segment uses the 'git clone' command like "git clone <project_name>". The argument referred to as "<project_name>" actually denotes the exact file-path of where the cloned-repos will be saved.
So I think the instructions should state that.

Additionally, the README.md file doesn't state which modules are in the list of dependencies for the program.

Help message in CLI help flag is minimal

The help message printed to the console by the --help flag only prints the program name, version number and "help:true".
I take this as a placeholder help message. Just a reminder to update it.

Attempting to run `npm link` on the CLI gives an error

Attempting to run npm link in the terminal gives the following output, with the version number set to 0.1 in package.json:

npm ERR! Invalid version: "0.1"

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<username>\AppData\Roaming\npm-cache\_logs\2022-09-16T22_41_46_230Z-debug.log

I tried changing the version number to "0.1.0", which resolved the "invalid version number" error. However, found 7 vulnerabilities were found when attempting to run npm link afterwards with the valid version number.

Here is the terminal's output with the version number set to 0.1.0 in package.json:

npm WARN [email protected] No repository field.

audited 241 packages in 1.089s

10 packages are looking for funding
  run `npm fund` for details       

found 7 vulnerabilities (2 low, 2 moderate, 2 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path C:\Users\<username>\AppData\Roaming\npm\node_modules\agandhi29_static_site_geneator\main.js
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\Users\<username>\AppData\Roaming\npm\node_modules\agandhi29_static_site_geneator\main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<username>\AppData\Roaming\npm-cache\_logs\2022-09-16T22_47_40_708Z-debug.log

Add the Theme Feature to the application

Prototype
Planned to use the Darkmode.js so that users can switch from light to dark mode according to their preference.
Default will be according to the system theme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.