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

@bgondy/sass-boilerplate

v1.0.0

Published

An opinionated Sass boilerplate

Downloads

3

Readme

Sass boilerplate

An opinionated Sass boilerplate.

build status

Usage

Using Normalize.css is strongly recommended. Normalize.css must be included before your own styles.

This boilerplate uses Breakpoint Sass for Media queries.

Vue projects (using Vue CLI)

You can use the dedicated Vue CLI 3 plugin to automatically install this boilerplate and configure your project.

Manual install

  1. Install required dependencies

    npm install normalize.css --save-dev
    npm install breakpoint-sass --save-dev
  2. Copy the src/scss directory in your project.

  3. Import Normalize.css to your bundle (optional)

  4. Configure your bundler to import _lib.scss in every file (optional)

    For Webpack:

    // webpack.config.js
    module.exports = {
      // ...
      resolve: {
        alias: {
          '@': path.resolve(__dirname, 'src'),
        },
      },
      module: {
        rules: [
          {
            test: /\.scss$/,
            use: [
              // ...
              {
                loader: 'sass-loader',
                options: {
                  // Enabling sourcemaps is strongly advised
                  sourceMap: true,
                  // Depending on the version of sass-loader, the option property may vary
                  // (data <8.0.0, prependData >8.0.0, additionalData >9.0.0)
                  // See sass-loader's documentation and CHANGELOG for details
                  // (https://github.com/webpack-contrib/sass-loader)
                  // Update path to fit your needs
                  additionalData: '@import "@/scss/lib/_lib.scss";',
                },
              },
            ],
          },
        ],
      },
    };
  5. Include the main entry point to your HTML (src/scss/main.scss)

You can take a look at src/main.js and webpack.config.js for a light implementation example.

Documentation

In order to keep documentation up to date and to have it to hand once in your project, most of the documentation is directly written in the code (don't worry, Sass comments are skipped during compilation).

Once installation is complete, feel free to browse files and toggle commented sections or tweak code to fit your needs, especially in the following files:

  1. scss/lib/_lib.scss: please keep in mind this file (and its dependencies) is loaded in every Scss file/Vue Component. Therefore, it MUST NOT generate any CSS once compiled. Doing so would lead to a massive code duplication.
  2. scss/lib/variables/
  3. scss/main.scss
  4. scss/_base.scss

Development

Clone the project locally and install node dependencies:

npm install

Available commands:

  • npm run build Build the CSS using Webpack to ensure there is no error
  • npm run watch Same as build but with change detection
  • npm run prettier:check Check files are properly formatted with Prettier
  • npm run prettier:fix Reformat files with Prettier
  • npm run stylelint Lint SCSS files

Please note that Prettier and Stylelint run automatically on pre-commit. Please check package.json for implementation details.

Contributing

Please see contributing guide.

License

MIT