Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-recipe-browsersync-server

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-recipe-browsersync-server

Receipe for serving files with autoreload

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 09 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc