Skip to content

Commit

Permalink
Add minified script variant for NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayFrantsev committed Mar 31, 2020
1 parent 3fe44c8 commit a984761
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"use strict";

module.exports = {
ignorePatterns: "!.*",
ignorePatterns: [
"!.*",
"*.min.js"
],

extends: "eslint:all",

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/node_modules/
/package-lock.json
/yarn.lock
/*.min.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TCStringParse(consentString);
### Browser (IE 9+ with atob polyfill)

```html
<script src="path/to/tc-string-parse.js"></script>
<script src="path/to/tc-string-parse.min.js"></script>

<script>
const consentString = ''; // your consent string
Expand Down
20 changes: 15 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
{
"name": "tc-string-parse",
"description": "Simple parser for transparency and consent strings compatible with TCF2.0 an.",
"version": "1.1.0",
"description": "Simple parser for transparency and consent strings compatible with TCF2.0.",
"version": "1.1.1",
"repository": {
"type": "git",
"url": "https://github.com/audienceproject/tc-string-parse"
},
"keywords": ["tcf", "transparency", "consent", "gdpr", "cmp", "iab"],
"keywords": [
"tcf",
"transparency",
"consent",
"gdpr",
"cmp",
"iab"
],
"license": "Apache-2.0",
"main": "tc-string-parse.js",
"scripts": {
"test": "ava --verbose",
"lint": "eslint .",
"prepublishOnly": "npm install && npm run test && npm run lint"
"compress": "uglifyjs --compress --mangle -- tc-string-parse.js > tc-string-parse.min.js",
"prepublishOnly": "npm install && npm run test && npm run lint && npm run compress"
},
"dependencies": {},
"devDependencies": {
"ava": "3.5.1",
"eslint": "6.8.0"
"eslint": "6.8.0",
"uglify-js": "3.8.1"
},
"engines": {
"node": ">=5.10.0"
Expand Down

0 comments on commit a984761

Please sign in to comment.