producthunt / producthunt-chrome-extension

Chrome Extension for Product Hunt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Product Hunt Chrome Extension

Product Hunt Chrome Extension

This is the official Product Hunt extension.

Product Hunt is a place for product-loving enthusiasts to share and geek out about the latest mobile apps, websites, hardware projects, and technology. With our shiny new Chrome extension, you can:

  • View a gallery of the top products of the day in every new tab
  • Search for products, collections, and people directly from the Chrome menu bar
  • Open the discussion and product details from the product page itself by clicking the PH Bar
  • Hunt products and curate collections in a few keystrokes

Explore more ways to use Product Hunt at http://producthunt.com/apps.

Chrome App Store

You can get this extension frome the Google Chrome Webstore

Development

Development Dependencies

Name Version Installation
Node.js 0.10.x Instructions
Gulp 3.8.x Instructions

Setup

  • Clone the repository:
$ git clone git@github.com:producthunt/producthunt-chrome-extension.git
$ cd producthunt-chrome-extension
  • Edit the config file:
$ cp .env.example .env
$ $EDITOR .env
  • Install yarn dependencies:
$ yarn install
  • Create the initial build
$ gulp build
  • Load the extension:
  1. Open Google Chrome and type chrome://extensions inside the address bar
  2. Click on developer mode
  3. Click on Load unpacked extension
  4. Select the /build folder
  5. You are good to go

Configurations (.env)

See the example .env file.

Gulp Tasks

Task Description
build Compile, minify and copy the extension files
build --watch Rebuild on file change
clean Clean the build directory
test Run all tests
test-acceptance Run the acceptance tests
test-unit Run the unit tests
pack Create an archive for publishing

Example usage:

$ gulp clean
$ gulp build

Tests

  • Install the selenium server and Chromedriver:
$ node_modules/.bin/install_selenium
$ node_modules/.bin/install_chromedriver
  • Start selenium with chromedriver:
$ node_modules/.bin/start_selenium_with_chromedriver
  • Run the tests:
$ NODE_ENV=test gulp test

Debug

To enable the debug output in the console:

localStorage.debug = '*';

Publishing the extension

$ NODE_ENV=production EXT_ENV={production,staging} gulp build
$ gulp pack
$ open dist/

Then upload the archive to the Chrome Web Store.

Contributing

See CONTRIBUTING

Contributors

See all contributors

Changes

See CHANGELOG

License

See LICENSE

About

Chrome Extension for Product Hunt

License:ISC License


Languages

Language:CSS 87.0%Language:JavaScript 12.9%Language:HTML 0.2%