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

fm-site-build

v0.0.29

Published

Foster Made Site Build Package

Downloads

30

Readme

FM Site Build Tools

NPM package that contains a library of gulp tasks to perform site build actions, including:

  • Compile Sass
  • Concat and minify Javascript
  • Separate development and production files
  • Versioning/cache busting

Installation

npm install fm-site-build --save-dev

https://www.npmjs.com/package/fm-site-build

Usage

Sample site setup: https://github.com/fostermadeco/fm-site-build-example-site

  • Copy files in sample folder to main roote of site.
  • Edit fm-site-build.options.js to fit site specific needs.
  • Run 'bower install' and 'npm install'

Run gulp tasks, see below for more explanation of each:

gulp dev

gulp watch

gulp dist

Tasks

Development

Watch js and scss files and refresh browser with Browsersync

gulp watch --proxy example.dev

The proxy flag is optional. There is a default option in gulp.options.js to set the local url. If your local differs, then add the proxy flag.

Create a development version of the assets

gulp dev

Creates files with source maps in dev/ dir.

Production

Create a production version of the assets

gulp dist

Creates files in dist folder. In index.html, add references for main-min.js, main-min.css, vendor-min.css and modernizr-min.js. When this task is run, the file reference in index.html will be replace with a hash for the version. For example, main-min-9a26907288.css.

Sample directory structure sample site usage

.
├── dev                             # <-- Generated, pre-production app assets
│   ├── app.css                    # <-- Compiled, concatenated sass files
│   ├── vendor.css                  # <-- Compiled, concatenated vendor styles
│   ├── main.js                     # <-- Concatenated js files with source maps
├── dist                            # <-- Generated, production-ready app assets
│   ├── main-min.css                # <-- Minified css
│   ├── main-min.js                 # <-- Minified js
│   assets                           # <-- Where you edit files
│   ├── scss
│   │   ├── mixins                  # <-- Folders for sass partials - add to fm-site-build.options.js
│   │   └── main.scss
│   └── js                          # <-- Edit js files and add more to subfolders
├── images                          # <-- Image assets, relative to `/`
├── fonts                           # <-- Font assets, relative to `/`
├── static                          # <-- pdfs, etc. Files that need to be relative to `/`
├── vendor                          # <-- Third-party assets
│   ├── bower_components            # <-- Specify path in .bowerrc
│   ├── css                         # <-- other vendor css not in Bower
│   └── js                          # <-- other vendor js not in Bower
└── public/site/../templates        # <-- Wherever your templates are
    └── index.html                  # <-- Where your stylesheets and js are included from

Contributing changes and bumping version

Bump version in package.json

git add .
git commit -m "desc of changes"
git tag v0.0.6
git push origin master --tags
npm publish

Tests (coming soon)

npm test