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

gulp-recipe-browsersync-server

v0.1.5

Published

Receipe for serving files with autoreload

Downloads

4

Readme

gulp-recipe-browsersync-server Dependency Status

NPM

Local development and distribution testing server with all browsersync features. Provides global watch handler.

Tasks

serve

deps: preServe

Run the whole development server stack, with browsersync with all its features as a server.

serve:dist

Serve files from dist folder. Note that project needs to be built manually first.

preServe

deps: watch

Run all preServe hooks.

watch

deps: clean:temp

Run all watch hooks.

clean:temp

Delete temp folder and its contents.

Configuration

Recipe specific

browserSync

default: {} type: object

Browsersync config options, shared between both dev and dist server.

browserSync.dev

default: {port: config.ports.dev, server: {baseDir: [config.paths.tmp, config.paths.app]}} type: object

Browsersync config options, specific for dev server. Merged with shared config.

browserSync.dist

default: {port: config.ports.dist, server: {baseDir: config.paths.dist}} type: object

Browsersync config options, specific for dist server. Merged with shared config.

browserSync.useHistoryApi

dev specific: browserSync.dev.useHistoryApi dist specific: browserSync.dist.useHistoryApi

Add history api handling middleware to selected environment.

Sources

sources.devAssets

mandatory

Files that will be watched for changes by browserSync. Typically should include all files that may be directly served.

example config:

sources.devAssets = [
    paths.app + 'bower_components/*/*.js',
    paths.app + 'bower_components/*/{dist,min,release}/*.{js,css}', // most of the generic bower modules
    sources.js, // include only when serving non-processed js files
    sources.css, // include only when serving non-processed css files
    { files: paths.tmp + '**/*', base: paths.tmp } // all processed files from temp directory
];

Paths

paths.dist

default: 'app/'

App folder path, part of default dev baseDir configuration.

paths.tmp

default: 'tmp/'

Temp folder path, part of default dev baseDir configuration.

paths.dist

default: 'dist/'

Dist folder path, part of default dist baseDir configuration.

Ports

ports.dev

default: 3000

Default port for browserSync server. Part of default dev port configuration. Note: actual used port may be different, as browserSync performs a empty port scan.

ports.dist

default: 3100

Default port for browserSync server. Part of default dev port configuration. Note: actual used port may be different, as browserSync performs a empty port scan.

Tasks

tasks.browserSyncServe

alias: tasks.serve default: 'watch'

serve task name.

tasks.browserSyncServeDist

alias: tasks.serveDist default: 'serve:dist'

serve:dist task name.

tasks.browserSyncPreServe

alias: tasks.preServe default: 'preServe'

preServe task name.

tasks.browserSyncWatch

alias: tasks.watch default: 'watch'

watch task name.

tasks.browserSyncCleanTemp

alias: tasks.cleanTemp default: 'clean:temp'

clean:temp task name.

Api

Provided Hooks

watch

Runs all hooked watch tasks before serve and preServe.

preServe

Runs all hooked preServe tasks just before server start, after watchers.

Used Hooks

pipes.devAsset*

Watch source files in devAsset pipes.