Minimal cross-domain user tracking library to measure user interaction across Skroutz and partners' websites or web applications.
Install docker, docker-compose.
Prefix any of the available commands with docker-compose run builder <command>.
Any changes made to the code locally will be reflected inside the container.
Examples:
docker-compose run builder yarn run testNOTE: If you get an error such as [launcher]: Cannot start PhantomJS,
you should run
docker-compose run builder yarn install
in order to install the correct binary for phantomjs.
docker-compose run builder bashFirst, install Node.js and its package
manager, npm (npm comes by default
with node now).
Once you have npm installed, run the command bellow to install
yarn:
$ npm install --global yarnFinally, install project dependencies:
$ yarn installYou have two options to invoke a specific environment:
-
Prepend
GRUNT_ENV=desired_environmentto anyyarnorgruntcommand. For example:$ GRUNT_ENV=production yarn run build
-
Append
--env=some_environmentto anygruntcommand. For example:$ yarn grunt create_env_settings -- --env=production
By default the project runs in
developmentenvironment.
The available environments are:
- development (default)
- testing
- production
src/settings.coffee
The src/settings.coffee file gets created according to the
environment settings. The file gets created dynamically by the
following grunt task:
$ yarn grunt create_env_settingsAnalytics Client supports deployment under different sites (a.k.a. flavors in Skroutz speak) with different parameters configured.
For example, if you want to deploy for flavor skroutz, where
skroutz.gr is the domain, then you should specify that flavor
in config/settings/flavors.yml:
- skroutz
and then configure config/settings/production.yml as follows:
skroutz:
analytics_base_url: "https://skroutza.skroutz.gr"
application_base_url: "https://www.skroutz.gr"
You can build the project with the command:
$ yarn run buildOnce the build process is successfully completed you should end up
with a new dist directory created at the root of the project. Under
dist, there should be one directory for each of the flavors
specified in config/settings/flavors.yml.
So, the contents of the dist directory should look like this:
# dist directory
└── skroutz
├── analytics.js
├── analytics.js.gz
├── analytics.min.js
├── analytics.min.js.gz
├── js
│ ├── easyXDM.min.js
│ ├── easyXDM.min.js.gz
│ ├── payload.1c9ad7e9.js
│ ├── payload.1c9ad7e9.js.gz
│ ├── payload.1c9ad7e9.min.js
│ ├── payload.1c9ad7e9.min.js.gz
│ ├── payload.js
│ ├── payload.js.gz
│ ├── payload.min.js
│ ├── payload.min.js.gz
│ └── plugins
│ ├── badge.d35279ba.js
│ ├── badge.d35279ba.js.gz
│ ├── badge.d35279ba.min.js
│ ├── badge.d35279ba.min.js.gz
│ ├── badge.js
│ ├── badge.js.gz
│ ├── badge.min.js
│ ├── badge.min.js.gz
│ ├── order_stash.cb5fbb30.js
│ ├── order_stash.cb5fbb30.js.gz
│ ├── order_stash.cb5fbb30.min.js
│ ├── order_stash.cb5fbb30.min.js.gz
│ ├── order_stash.js
│ ├── order_stash.js.gz
│ ├── order_stash.min.js
│ ├── order_stash.min.js.gz
│ ├── partner_sku_reviews.6ef6564d.js
│ ├── partner_sku_reviews.6ef6564d.js.gz
│ ├── partner_sku_reviews.6ef6564d.min.js
│ ├── partner_sku_reviews.6ef6564d.min.js.gz
│ ├── partner_sku_reviews.js
│ ├── partner_sku_reviews.js.gz
│ ├── partner_sku_reviews.min.js
│ └── partner_sku_reviews.min.js.gz
├── skroutza.js
├── skroutza.js.gz
├── skroutza.min.js
└── skroutza.min.js.gzIn development you don't have to constantly run the build command for any change you perform in the sources. You may just run:
$ yarn run devThis executes the default grunt task that:
- starts the test server
- watches for file changes and
- runs all tests
- recompiles assets
Tests run with the help of karma
test runner.
You can run all tests with:
$ yarn run testIf you wish to run tests continuously check the Development section.
You can perform a project deep cleanup with:
$ yarn run cleanupThe above command will:
- remove local
node modules - delete
distdirectory - delete
compileddirectory - delete
src/settings.coffeefile - delete
src/plugins_settings.coffeefile
After a deep cleanup you have to install again the project dependencies. Please check the Installation section.
You can perform a soft cleanup with:
$ yarn grunt cleanupThe above command is useful when in development and it will just:
- delete
distdirectory - delete
compileddirectory - delete
src/settings.coffeefile - delete
src/plugins_settings.coffeefile
- Harris Kokkinos (harrisred)
- Christos Melas (mrwhizzy)
- Christos Gkoumas (MrGoumX)
- Alex Kyriakou (alexunder193)
Alumni
- Ioannis Tholoenos (itholoenos)
- Kostas Diamantis (kosdiamantis)
- Dimitris Karteris (dkart)
- Bill Trikalinos (billtrik)
- Chrisovalantis Kefalidis (cvkef)
- Fotos Georgiadis (fotos)
- Dimitrios Zorbas (Zorbash)
This software is released under the MIT License. For more details read this.