From f69e20aeeaee71baed9ca33661782a67ae9e12bd Mon Sep 17 00:00:00 2001 From: Nick Freear Date: Sat, 26 May 2018 23:00:38 +0100 Subject: [PATCH 1/3] Add travis YAML configuration, to run the default grunt task * Plus, add badges to README --- .travis.yml | 23 +++++++++++++++++ README.md | 70 +++++++++++++++++++++++++++++++++++----------------- package.json | 10 ++++++-- 3 files changed, 78 insertions(+), 25 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a32af40 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +# https://travis-ci.org/nfreear/cookie-notice +# https://docs.travis-ci.com/user/languages/javascript-with-nodejs/ + +language: node_js + +node_js: 8 + +git: + depth: 8 + +cache: + directories: + - node_modules # NPM packages. + +# install: npm install + +# script: npm test + +after_script: +- ls -al dist/ +- pgrep -lf '(live-server|phantom)' + +# End. diff --git a/README.md b/README.md index 27ec3c3..4cde893 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ -# CookieNotice -**CookieNoticeJS** is a very simple and small *(→ 2 kB gzip)* vanilla JS script with multi language support for GDPR/DSGVO‎ transparency and +[![Build status — Travis-CI][travis-icon]][travis] +[![cookie-notice on Npmjs][npm-icon]][npm] +[![License][license-icon]][mit] +[![Total downloads ~ Npmjs][downl-icon]][npm] +[![Size of Javascript][size-icon]][build] + +# CookieNotice + +**CookieNoticeJS** is a very simple and small *(→ 2 kB gzip)* vanilla JS script with multi language support for GDPR/DSGVO‎ transparency and notification purposes that provides an easy way to show a cookie notice on your website. FetchBot @@ -38,7 +45,7 @@ npm install cookie-notice You will get a dismissable banner on the bottom of your pages showing a default cookie audit like the following: > We use cookies to make sure you can have the best experience on our website. If you continue to use this site we assume that you will be happy with it. - + Check my website for a [DEMO](http://codeb.it/). Depending on the visitor browser language one of the preloaded translation will be shown. At the moment **CookieNoticeJS** supports *EN, IT, DE and FR*. If you want to contribute with an extra language do not hesitate to open an issue or a PR. **CookieNoticeJS** has been succesfully tested on IE9+, Chrome, Firefox and Safari. @@ -51,49 +58,49 @@ For the most of you including the script should be enough but **CookieNoticeJS** ``` @@ -102,4 +109,21 @@ For the most of you including the script should be enough but **CookieNoticeJS** Alessandro Benoit #### Contributors -[Bernhard Behrendt](mailto:bernhard.behrendt@aoe.com) [@AOEpeople](https://github.com/AOEpeople) \ No newline at end of file +[Bernhard Behrendt](mailto:bernhard.behrendt@aoe.com) [@AOEpeople](https://github.com/AOEpeople) + +### License + +License: [MIT][] + + +[MIT]: https://github.com/micc83/cookie-notice-js/blob/master/LICENSE + "License: MIT | Copyright © 2018 Alessandro Benoit (micc83)." +[MIT-0]: https://mit-license.org/#2018 +[travis-icon]: https://travis-ci.org/nfreear/cookie-notice.svg?branch=ndf/travis-ci +[travis]: https://travis-ci.org/nfreear/cookie-notice "Build status – Travis-CI" +[npm]: https://npmjs.com/package/cookie-notice +[npm-icon]: https://img.shields.io/npm/v/cookie-notice.svg +[license-icon]: https://img.shields.io/npm/l/cookie-notice.svg +[downl-icon]: https://img.shields.io/npm/dt/cookie-notice.svg "Count of total downloads ~NPM" +[size-icon]: https://img.shields.io/github/size/AOEpeople/cookie-notice/dist/cookie.notice.min.js.svg + "Size of built Javascript, kilo-bytes (kB) ~ on GitHub" diff --git a/package.json b/package.json index b7615aa..630a2d8 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,10 @@ "name": "cookie-notice", "version": "1.1.7", "description": "Show a widely configurable notice for European cookie law", - "main": "index.js", + "main": "gruntfile.js", + "browser": "dist/cookie-notice.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "grunt" }, "keywords": [ "GDPR", @@ -17,12 +18,17 @@ "license": "MIT", "devDependencies": { "grunt": "^1.0.2", + "grunt-cli": "^1.2.0", "grunt-contrib-connect": "^1.0.2", "grunt-contrib-qunit": "^2.0.0", "grunt-contrib-uglify": "^3.3.0", "grunt-strip-code": "^1.0.6", "phantomjs-prebuilt": "^2.1.16" }, + "peerDependencies": { + "jquery": "^2.1.4", + "qunit": "^1.18.0" + }, "repository": { "type": "git", "url": "https://github.com/AOEpeople/cookie-notice-js" From a1c8223e6482d3467fa59a2198b7602ae4805b2e Mon Sep 17 00:00:00 2001 From: Nick Freear Date: Mon, 28 May 2018 21:49:24 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Update=20test=20dependecies=20~=20jQuery=20?= =?UTF-8?q?from=202.x=20=E2=86=92=203.x;=20QUnit=20from=201.x=20=E2=86=92?= =?UTF-8?q?=202.x;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * jQuery ~ upgrade version 2.1.4 to 3.3.1; * QUnit Javascript ~ 1.18.0 to 2.6.1; --- package.json | 4 ++-- tests/index.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 630a2d8..4d9d91c 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "phantomjs-prebuilt": "^2.1.16" }, "peerDependencies": { - "jquery": "^2.1.4", - "qunit": "^1.18.0" + "jquery": "^3.3.1", + "qunit": "^2.6.1" }, "repository": { "type": "git", diff --git a/tests/index.html b/tests/index.html index 33c815e..5145f69 100644 --- a/tests/index.html +++ b/tests/index.html @@ -4,17 +4,17 @@ QUnit Example - +
- - + + - \ No newline at end of file + From f46e5a30b4d4cebe36e5e1342c143774d73800b7 Mon Sep 17 00:00:00 2001 From: Nick Freear Date: Mon, 28 May 2018 22:27:40 +0100 Subject: [PATCH 3/3] Fix the file-size badge in the README; other README edits [ci skip] --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4cde893..85edfda 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,9 @@ You will get a dismissable banner on the bottom of your pages showing a default > We use cookies to make sure you can have the best experience on our website. If you continue to use this site we assume that you will be happy with it. -Check my website for a [DEMO](http://codeb.it/). Depending on the visitor browser language one of the preloaded translation will be shown. At the moment **CookieNoticeJS** supports *EN, IT, DE and FR*. If you want to contribute with an extra language do not hesitate to open an issue or a PR. +Check my website for a [DEMO](http://codeb.it/). Depending on the visitor browser language one of the preloaded translations will be shown. At the moment **CookieNoticeJS** supports *EN, IT, DE and FR*. If you want to contribute with an extra language do not hesitate to open an issue or a PR. -**CookieNoticeJS** has been succesfully tested on IE9+, Chrome, Firefox and Safari. +**CookieNoticeJS** has been successfully tested on IE9+, Chrome, Firefox and Safari. ## Customize CookieNoticeJS @@ -121,9 +121,10 @@ License: [MIT][] [MIT-0]: https://mit-license.org/#2018 [travis-icon]: https://travis-ci.org/nfreear/cookie-notice.svg?branch=ndf/travis-ci [travis]: https://travis-ci.org/nfreear/cookie-notice "Build status – Travis-CI" -[npm]: https://npmjs.com/package/cookie-notice +[npm]: https://npmjs.com/package/cookie-notice "CookieNotice – on NPM" [npm-icon]: https://img.shields.io/npm/v/cookie-notice.svg [license-icon]: https://img.shields.io/npm/l/cookie-notice.svg -[downl-icon]: https://img.shields.io/npm/dt/cookie-notice.svg "Count of total downloads ~NPM" +[downl-icon]: https://img.shields.io/npm/dt/cookie-notice.svg "Count of total downloads – NPM" +[build]: https://github.com/AOEpeople/cookie-notice/tree/master/dist [size-icon]: https://img.shields.io/github/size/AOEpeople/cookie-notice/dist/cookie.notice.min.js.svg - "Size of built Javascript, kilo-bytes (kB) ~ on GitHub" + "Size of built Javascript, kilo-bytes (kB) – on GitHub"