Skip to content

Commit

Permalink
Make cmp-boros importable from server-side (scm-spain#61)
Browse files Browse the repository at this point in the history
* Make cmp-boros importable from server-side

* Update project version

* Update README badges to match the GitHub repo

* Update travis conf to publish automatically on RELEASE
  • Loading branch information
midudev authored and alextremp committed Jun 6, 2019
1 parent 7a6a887 commit c3e4df4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
dist: trusty
language: node_js
node_js:
- "8"
cache:
directories:
- node_modules
- node_modules
before_install:
- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
script:
- npm run lint
- npm test
- npm run coverage:ci
- |
echo TRAVIS_BRANCH=$TRAVIS_BRANCH - TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST - TRAVIS_TAG=$TRAVIS_TAG
if [[ $TRAVIS_TAG =~ v[0-9]+\.[0-9]+.[0-9]+ ]]; then
echo DEPLOY TO NPM: $TRAVIS_TAG
npm publish
fi
after_success:
- bash <(curl -s https://codecov.io/bash)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Boros CMP

[![Build status](https://travis-ci.org/scm-spain/CMP.svg?branch=master)](https://travis-ci.org/scm-spain/CMP)
[![codecov](https://codecov.io/gh/scm-spain/CMP/branch/master/graph/badge.svg)](https://codecov.io/gh/scm-spain/CMP)
[![GitHub license](https://img.shields.io/github/license/scm-spain/CMP.svg)](https://github.com/scm-spain/CMP/blob/master/LICENSE)
[![Build status](https://travis-ci.org/scm-spain/Boros-CMP.svg?branch=master)](https://travis-ci.org/scm-spain/Boros-CMP)
[![codecov](https://codecov.io/gh/scm-spain/Boros-CMP/branch/master/graph/badge.svg)](https://codecov.io/gh/scm-spain/Boros-CMP)
[![GitHub license](https://img.shields.io/github/license/scm-spain/Boros-CMP.svg)](https://github.com/scm-spain/Boros-CMP/blob/master/LICENSE)
[![npm version](https://img.shields.io/npm/v/@schibstedspain/boros-cmp.svg)](https://www.npmjs.com/package/@schibstedspain/boros-cmp)

## Table of Contents
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@schibstedspain/boros-cmp",
"version": "1.1.0",
"version": "1.1.1",
"description": "Schibsted GDPR - Consent Management Provider - Standalone",
"main": "dist/cmp.pro.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/cmp/infrastructure/event-polyfill.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if (window && typeof window.CustomEvent !== 'function') {
if (typeof window !== 'undefined' && typeof window.CustomEvent !== 'function') {
const CustomEvent = (event, params) => {
const eventParams = params || {
bubbles: false,
Expand Down
2 changes: 1 addition & 1 deletion src/global.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* eslint-disable no-undef */
import bootstrap from './globalstorage/infrastructure/bootstrap'
bootstrap(window)
typeof window !== 'undefined' && bootstrap(window)

0 comments on commit c3e4df4

Please sign in to comment.