5.2.0-beta.6 • Published 4 years ago

frontend-adit--scmspainads-motos v5.2.0-beta.6

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

SCMSpain ADS for Motos.net

Build Status Testing Coverage Style/Linting issues Badger

SCMSpainAds client for Motos.net site.

Install dependencies

npm install

Build

To generate the final distribution version and test it in a local pre environment run the following command:

npm run build

This command will generate a pre version (MotosOpenAdsClient.pre.js) inside dist folder, configured to use the OpenAds connector pointing to PRE environment. To launch a local server using the generated script, run the following command:

npm run server

Then open your preferred browser and go to

http://ANY_LOCAL_DNS:8081

Keep in mind that ANYLOCAL_DNS could not be set as _localhost or ip 127.0.0.1, those are banned DNSs by appnexus server and the demo will not work. To create a local DNS you just only need to add a new one in your local hosts file.

If you want to generate the final version of the script, run the following command:

npm run pro

It will generate the distribution file on dist folder but named as MotosOpenAdsClient.pro.js. This file will be compressed and minified, ready to paste it on S3 bucket:

https://c.dcdn.es/openads/motos/MotosOpenAdsClient.pro.js

Furthermore you want to check that everything is working fine in PRO environment you can do it in local, just call server task again and you will see the demo version using ads from PRODUCTION environment.

npm run server

For the developments of develop we will create a branch called develop/..., in which we can run the following command:

npm run dev

Tests

To check that everything is still ok:

npm test

Lint

This project follows standard code style rules proposed by Adevinta Spain, to check that everything is ok:

npm run lint

Continuous Delivery

The project is automatically deployed to S3, from Travis.

In order to enable the deployment, take in care that:

  • Merge to Master (QA): A merge to master will automatically deploy the solution to QA https://c.dcdn.es/openads/fotocasa/MotosOpenAdsClient.pre.js

  • vX.Y.Z Release (PRO): A vX.Y.Z release (p.ex. named: v3.4.1) will automatically deploy the solution to PRO https://c.dcdn.es/openads/fotocasa/MotosOpenAdsClient.pro.js This release should be created from the master branch.

  • vX.Y.Z-beta.A Release (DEV): A vX.Y.Z-beta.A release (p.ex. named: v4.1.0-beta.1) will automatically deploy the solution to DEV https://c.dcdn.es/openads/fotocasa/MotosOpenAdsClient.dev.js A beta release is intended to enable testing experimental features in a real environment (using the Tealium DEV environemt) and should be created from a develop branch. To work for long term experimental developments consider:

    • Creating a develop/my_experimental_development_name
    • Open a feature/my_first_feature_over_my_experimental_development and PR to develop/my_experimental_development_name
    • After merging the feature, create a vX.Y.Z-beta.A in the develop/my_experimental_development_name