npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

project2_pug

v1.0.9

Published

Convert html file directories to pug

Downloads

35

Readme

Set a folder where the files to be found will be to be the input directory, so set a folder for the output files

Example of directory paths to enter:

  • Input directory : /home/mike98/Desktop/html_files
  • Output Directory : /home/mike98/Desktop/pug_files

Install

git clone https://github.com/Miguel98R/project2Pug.git
npm install
npm run dev

Install by npm

can also install the converter by npm

command:

npm i -g project2_pug

start converter interface

command:

gui

example usage:

project2_pug gui

Then visit http://localhost:3008/*

*By default start on port 3008 , this can be modified in the index.js file


Convert CLI mode

Also has the option to convert your html template to pug via CLI

command:

convert

options:

-i, --inDirectory <inDirectory...>    location of the folder where the files to be converted are
-o, --OutDirectory <OutDirectory...>  location of the folder where the converted files will be saved

example usage:

project2_pug convert -i "/home/mike98/Desktop/html_files" -o "/home/mike98/Desktop/pug_files"

install node modules and start the server in the output folder

command:

start_dev

example usage:

project2_pug start_dev

Initializing template converted

Once you have converted the template, you will notice that a structure has been created for your project , an api-rest based on js express and a database connection in mongo db, this to help in the process of creating projects

Converted views to pug are located in the views folder and static/library files are located in the public folder

to initialize the project simply install the node modules and run the dev command

npm install
npm run dev

in the CLI section, the command to install the node modules and start the server in the output folder is shown

The project to be launched on port 3055 , this can be modified in the index.js of your output folder
Then visit http://localhost:3055 *

Note: if in your template static files are in an assets folder, this folder will be saved in the public folder just move the contents to the root of the public folder for your template to work properly