forked from osano/cookieconsent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: support for node v16+ by migrating node-saas to saas and updati…
…ng webpack from v4 -> v5 (#94) * fix: support for node v16+ by migrating node-saas to saas and updating webpack from v4 -> v5 fixes #85 * fix!: removes support for node v10 and node v12. Node v16+ is now required (mostly for current versions of babel)
- Loading branch information
1 parent
fa8333a
commit 033714a
Showing
14 changed files
with
7,042 additions
and
19,702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
module.exports = proc => { | ||
module.exports = (proc) => { | ||
const isTest = proc.env("test") | ||
const plugins = [ | ||
[ | ||
"@babel/plugin-proposal-decorators", | ||
{ | ||
"legacy": true | ||
} | ||
], | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-object-rest-spread", | ||
"@babel/plugin-transform-flow-strip-types", | ||
"@babel/plugin-transform-runtime" | ||
] | ||
if ( isTest ){ | ||
plugins.push( "transform-es2015-modules-commonjs" ) | ||
const plugins = ["@babel/plugin-transform-runtime"] | ||
if (isTest) { | ||
plugins.push("transform-es2015-modules-commonjs") | ||
} | ||
return { | ||
"presets": [ | ||
[ "@babel/preset-env", { targets: { node: "current" } } ] | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
esmodules: true, | ||
}, | ||
}, | ||
], | ||
], | ||
plugins, | ||
"ignore": [ | ||
"node_modules/**/*" | ||
], | ||
"sourceMaps": true, | ||
"sourceType": "unambiguous" | ||
ignore: ["node_modules/**/*"], | ||
sourceMaps: true, | ||
sourceType: "unambiguous", | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,8 @@ | |
}, | ||
"devDependencies": { | ||
"serve": "^12.0.1" | ||
}, | ||
"dependencies": { | ||
"@activescott/cookieconsent": "file:../.." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<head> | ||
<title>Example</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<!-- By loading a UMD module this way, it will expose the libray on window.CookieConsent --> | ||
<script src="https://unpkg.com/@activescott/cookieconsent@>=5"> | ||
</script> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
||
<!-- By loading a UMD module this way, it will expose the library on window.CookieConsent --> | ||
<script src="https://unpkg.com/@activescott/cookieconsent@>=5"></script> | ||
|
||
<!-- For local dev (assumes npm install from package.json installs local package): --> | ||
<!-- <script src="node_modules/@activescott/cookieconsent/dist/umd/index.js"></script> --> | ||
|
||
<script> | ||
function main() { | ||
const options = { | ||
// all of this is optional: | ||
palette: { | ||
popup: { | ||
background: "#4586c6", | ||
text: "#ffffffc0", | ||
}, | ||
button: { | ||
background: "transparent", | ||
text: "#ffffffc0", | ||
border: "#ffffffc0", | ||
}, | ||
}, | ||
content: { | ||
link: "Learn More", | ||
href: "/policy/privacy", | ||
}, | ||
} | ||
new window.CookieConsent(options) | ||
function main() { | ||
const options = { | ||
// all of this is optional: | ||
palette: { | ||
popup: { | ||
background: "#4586c6", | ||
text: "#ffffffc0", | ||
}, | ||
button: { | ||
background: "transparent", | ||
text: "#ffffffc0", | ||
border: "#ffffffc0", | ||
}, | ||
}, | ||
content: { | ||
link: "Learn More", | ||
href: "/policy/privacy", | ||
}, | ||
} | ||
document.addEventListener("DOMContentLoaded", main) | ||
new window.CookieConsent(options) | ||
} | ||
document.addEventListener("DOMContentLoaded", main) | ||
</script> | ||
</head> | ||
|
||
<body> | ||
You should see the cookie consent prompt in a new browser session (try a private window). Or look in the browser | ||
console for errors. | ||
</body> | ||
</head> | ||
|
||
</html> | ||
<body> | ||
You should see the cookie consent prompt in a new browser session (try a | ||
private window). Or look in the browser console for errors. | ||
</body> | ||
</html> |
Oops, something went wrong.