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

ez-web-dev

v1.0.2

Published

The streaming system

Downloads

2

Readme

ez-web-dev

SCSS Compiler with BrowserSync

This project provides a simple setup for live compiling SCSS files to CSS and serving an index.html file using BrowserSync. It's a convenient way to streamline your development workflow.

Prerequisites

Make sure you have Node.js and npm installed on your machine. You can download and install them from Node.js official website.

Contributors

Idea and compilation - exploresahil. Execution and testing - Paragkoche.

Getting Started


Method 1

JavaScript

  1. using a package manager:
$ npx ez-web-dev@latest
  1. Navigate to the project directory:
$ cd my-app
  1. Update dependencies:
$ npm update
  1. Install dependencies:
$ npm install

Usage

Initialize the Project

Create the necessary directories, initial SCSS file, Start the development server, which includes SCSS compilation and BrowserSync:

$ npm run dev

Method 2 (Make your Own)

  1. Make a project folder and create index.html and package.json files.
project-folder/
├── .gitignore             # Git ignore file (# optional)
├── LICENSE                # License file (# optional)
├── package.json           # NPM package configuration
├── README.md              # Project README file (# optional)
├── index.html             # Main HTML file
  1. Copy the following code and paste it in package.json file.
{
  "scripts": {
    "init": "node -e \"const fs = require('fs'); if (!fs.existsSync('scss')) { fs.mkdirSync('scss'); } if (!fs.existsSync('scss/styles.scss')) { fs.writeFileSync('scss/styles.scss', ''); }\"",
    "compile:scss": "sass --no-source-map --watch scss:css --poll",
    "start:scss": "npm run init && npm run compile:scss",
    "serve": "browser-sync start --server --port 3000 --files 'css/*.css, *.html'",
    "dev": "concurrently \"npm run start:scss\"  \"npm run serve\"",
    "prebuild": "npm run compile:scss"
  }
}
  1. Install latest dependencies as devDependencies.
$ npm i sass@latest browser-sync@latest concurrently@latest --save-dev
The Folder structure should look like this:
scss-compiler/
│
├── css/                   # Compiled CSS files
│   └── main.css
│
├── scss/                  # SCSS source files
│   └── styles.scss
│
├── node_modules/          # Node.js modules and packages
│
├── .gitignore             # Git ignore file (# optional)
├── LICENSE                # License file (# optional)
├── package.json           # NPM package configuration
├── README.md              # Project README file (# optional)
├── index.html             # Main HTML file
├── package-lock.json      # NPM package lock file
├── server.js              # Simple server file (if needed)
└── ...                    # Other project files and directories

Usage

Initialize the Project

Create the necessary directories, initial SCSS file, Start the development server, which includes SCSS compilation and BrowserSync:

$ npm run dev

This command will concurrently run the SCSS compilation and BrowserSync. The BrowserSync UI will be accessible at http://localhost:3000.

Access the Development Server

Visit the development server in your browser at http://localhost:3000. BrowserSync will automatically reload the page whenever changes are made to your CSS or HTML files.

Stop the Development Server

To stop the development server, press Ctrl + C in the terminal.

Customization

Feel free to customize the project structure and SCSS files to suit your needs.

Troubleshooting

If you encounter issues, refer to the following tips:

  • Ensure proper termination of the development server.

  • Check for running processes related to BrowserSync or Sass after stopping the server.

  • Update npm packages:

    $ npm update
  • Adjust the Sass watcher with the --poll option:

    "compile:scss": "sass --no-source-map --watch scss:css --poll",
  • Separate watch processes in the "dev" script:

    "dev": "npm run start:scss & npm run serve",
  • Change Port for BrowserSync:

    "serve": "browser-sync start --server --port YOUR_NEW_PORT --files 'css/*.css, *.html'",

License

The MIT License.