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

grunt-terminal-browser

v0.2.5

Published

Show terminal error log output to browser.

Downloads

5

Readme

grunt-terminal-browser

Show grunt errors in a popup window in your browser.

This plugin forked from grunt-browser-output, when I use eslint-friendly-formatter to format eslint error log, grunt-browser-output in browser looks like ugly, so I am take example by Webpack and change some code to make output in browser seens more beautiful. This plugin will mirror the Grunt console output in a browser window when a plugin shows warnings or errors. The motivation is to avoid having to toggle back to a terminal window to see errors (ex. JSHint warnings) during a grunt/watch/livereload session.

Only works in modern browsers with WebSocket support.

Getting Started

npm install grunt-terminal-browser --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-terminal-browser');

Important: Using this plugin with grunt-contrib-watch and livereload requires grunt-contrib-watch version 0.6.0 or higher and you must configure livereloadOnError = false and spawn = false

The "terminal_browser" task

Overview

In your project's Gruntfile, add a section named terminal_browser to the data object passed into grunt.initConfig().

grunt.initConfig({
  terminal_browser: {
    options: {       //all options are optional
      port: 37901    //default is 37901
    }
  },
})

Add terminal_browser before your watch task.

grunt.registerTask('serve', ['terminal_browser','connect', 'watch']);

Finally, add the following script tag to your web page:

<script src="node_modules/grunt-terminal-browser/client.js"></script>

HTTPS/SSL

If you run your site over HTTPS, you'll likely want to configure this task to also use HTTPS. Change the task config:

grunt.initConfig({
  terminal_browser: {
    options: {
       ssl: true,
       key: grunt.file.read('path/to/server.key'),
       cert: grunt.file.read('path/to/server.crt')
    }
  },
})

And in your index.html add put ?ssl=true on the end of the client.js script tag:

<script src="node_modules/grunt-terminal-browser/client.js?ssl=true"></script>

Release History

  • 2/18/2017 - v0.2.0 - modify grunt-browser-output.
  • 3/13/2014 - v0.1.0 - Initial release.