GithubHelp home page GithubHelp logo

sgamescz / hlidac-shopu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from topmonks/hlidac-shopu

0.0 0.0 0.0 54.39 MB

Hlídač shopů

Home Page: https://www.hlidacshopu.cz

License: Eclipse Public License 2.0

JavaScript 86.37% HTML 1.22% CSS 0.07% Swift 0.33% Shell 0.10% SCSS 1.42% TypeScript 0.86% Ruby 0.15% Dockerfile 0.39% Nunjucks 9.10%

hlidac-shopu's Introduction

Hlídač Shopů

CircleCI codecov CodeFactor CodeScene Code Health CodeScene System Mastery

PWA a rozšíření do nejrošířenějších prohlížečů, které zobrazuje historická data cen na největších českých a slovenských e-shopech vč. Reálné slevy.


PWA and browser extension shows historical prices for biggest czech and slovak e-commerce websites.

Install

Development

We are using package.json scripts (run yarn run for a list) for project automation.

Prerequisites

You will need:

  • Node.js 16 (we use nvm for Node.js version management)
  • yarn (we use Workspaces. You can't use npm. Sorry)
  • Firefox
  • Chrome
  • XCode Command Line Tools (for Safari and iOS development)
  • Pulumi (for Infrastructure and backend development)
  • jq (for Extension distribution)

We have install scripts for Debian and macOS. See scripts folder for install scripts for your system.

On debian run bash ./scripts/install-debian-tools.sh - this will use apt-get to install jq. On macOS run bash ./scripts/install-macos-tools.sh - this will use homebrew to install jq, nvm and pulumi.

Step by step build of extension for reviewers

Make sure your system meets all prerequisites. See previous section.

nvm install $(< .nvmrc)
nvm use
yarn install
yarn build:extension
yarn build:firefox

Building extensions

All extensions (except Safari version) will be build to ./dist folder by calling the npm build script.

Firefox supports Dark and Light themes for action icons and we are optimising action icons for these. Chrome doesn't support action icons theming via manifest.json so we use background.js script to add support for themes programmatically. We are removing background.js script, and it's entry in manifest, in build step with other unnecessary files.

Content script content.js is written in ESM, but ESM is not widely supported in content scripts. So we use simple bundle script yarn build:extension to convert ESM to IIFE bundle.

Firefox extension

To build Firefox extension run yarn build:firefox. It will create extension-dist folder for development time and packaged extension in ./dist folder.

Chrome extension

To build Chrome extension run yarn build:chrome. It will create package in ./dist folder.

Safari extension

  1. Run yarn build:safari to get latest bundle script, domains (eshops) permissions and current version for Safari
  2. Distribute app by XCode: yarn start:safari > Product > Archive > Distribute App*
  3. Manually send new app version to Review on Itunes Connect - you will need to be logged in as TopMonks developer (credentials in 1Password)

* Use autosigning feature and use the TopMonks s.r.o Apple developer team account. If this fails with missing private key, download one named "itunes Mac App Distribution mac_app.cer" from TopMonks 1Password.

Updating extension version

To check current version in package.json, manifest.json and about.html run

./version.sh

Update to new version run

./version.sh x.y.z

Extension development

For seamless development experience we have yarn watch:extension script with incremental builds on source files changes.

We also have convenient script yarn start:chrome and yarn start:firefox to start browsers with already registered extension and automatic reloading on changes.

For visual testing at scale, there is ./scripts/screenshotter.mjs. This will run Chrome with installed extension and take a screenshot of embedded widget on every supported e-shop. You can find resulting pictures in ./screenshots folder.

Other sources


Update @hlidac-shopu/lib version for actors

  1. Update version @hlidac-shopu/lib in ./lib/package.json
  2. Publish package to npm. Ask @JanFiedler about login
    cd lib
    npm login
    npm publish --access public --tag latest
  1. Update version @hlidac-shopu/lib in yarn.lock
yarn upgrade-interactive

© 2018-2021 TopMonks s.r.o.; Licensed under EPL-2.0

hlidac-shopu's People

Contributors

rarous avatar dependabot[bot] avatar janfiedler avatar junkycoder avatar renovate-bot avatar oodoow avatar zpelechova avatar dependabot-preview[bot] avatar theodik avatar lanvucz avatar trnkapavel avatar masa331 avatar code-factor avatar sauermar avatar ladasnajberk avatar jakubbalada avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.