Skip to content

Commit

Permalink
Merge pull request #718 from canonical/update-cookie-policy
Browse files Browse the repository at this point in the history
Update cookie policy to v3.6.3
  • Loading branch information
samhotep authored Apr 12, 2024
2 parents 53f314a + dc3db72 commit c736102
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dotrun
uses: canonical/install-dotrun@main

- name: Install dependencies
run: dotrun install
run: |
sudo chmod -R 777 .
dotrun install
- name: Build assets
run: dotrun build
Expand Down
1 change: 0 additions & 1 deletion .webpack/entry.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
['global-nav']: './static/js/src/global-nav.js',
['cookie-policy']: './static/js/src/cookie-policy.js',
['latest-news']: './static/js/src/latest-news.js',
['tabbed-content.js']: './static/js/src/tabbed-content.js',
};
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"serve": "./entrypoint 0.0.0.0:${PORT}",
"build-css": "sass static/sass/styles.scss static/css/styles.css --load-path=node_modules --style=compressed && postcss --no-map --use autoprefixer --replace 'static/css/**/*.css'",
"build-js": "mkdir -p static/js && webpack",
"build": "mkdir -p static/js && webpack && yarn run build-css",
"build-cookie-policy": "cp node_modules/@canonical/cookie-policy/build/js/cookie-policy.js static/js/dist/",
"build": "mkdir -p static/js && webpack && yarn run build-css && yarn run build-cookie-policy",
"start": "yarn run build && concurrently --kill-others --raw 'yarn run watch-css' 'yarn run watch-js' 'yarn run serve'",
"test-js": "jest --passWithNoTests",
"format-scss": "prettier -w 'static/**/*.scss'"
Expand Down Expand Up @@ -46,9 +47,9 @@
"webpack": "5.76.0",
"webpack-cli": "5.0.1"
},
"dependencies": {
"dependencies": {
"@canonical/cookie-policy": "^3.6.3",
"@canonical/global-nav": "2.7.0",
"@canonical/cookie-policy": "3.5.0",
"vanilla-framework": "3.15.1"
}
}
}
3 changes: 0 additions & 3 deletions static/js/src/cookie-policy.js

This file was deleted.

3 changes: 0 additions & 3 deletions static/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
@import 'pattern_heading-icon';
@import 'pattern_tabs';

// import cookie policy
@import '@canonical/cookie-policy/build/css/cookie-policy';

@include blog-p-list;
@include blog-p-post;
@include blog-p-card;
Expand Down
7 changes: 6 additions & 1 deletion templates/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
<link rel="preconnect" href="https://www.gstatic.com">
<link rel="preconnect" href="https://res.cloudinary.com">

<!-- Cookie policy -->
<script src="{{ versioned_static('js/dist/cookie-policy.js') }}"></script>
<script>
cpNs.cookiePolicy();
</script>

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
Expand Down Expand Up @@ -88,7 +94,6 @@
{% include "templates/footer.html" %}

<script src="{{ versioned_static('js/dist/global-nav.min.js') }}" defer></script>
<script src="{{ versioned_static('js/dist/cookie-policy.min.js') }}" defer></script>

<script type="text/javascript">
(function() {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1112,10 +1112,10 @@
resolved "https://registry.yarnpkg.com/@canonical/cookie-policy/-/cookie-policy-3.3.0.tgz#99df0aad2bf01c43e0a6d524b062ebc6066a3121"
integrity sha512-G4u2dr04t138BoIsdbnVsL5i2vBl3supgqkAG03AfvAIbbkt1QlIlodGtrv0s3sczmUTEiSNfmT3iC70GY0Suw==

"@canonical/cookie-policy@3.5.0":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@canonical/cookie-policy/-/cookie-policy-3.5.0.tgz#1c7e6cc2d5a7218375001b2cff2996a927693e89"
integrity sha512-XLCIl8+h+3BRfvqADqFsmAfWdaDGDchY/TPCKtpeQdb4r64SR6arsdNftlOb7vX8EuLCK2QRp6evUy0J+qnQTg==
"@canonical/cookie-policy@^3.6.3":
version "3.6.3"
resolved "https://registry.yarnpkg.com/@canonical/cookie-policy/-/cookie-policy-3.6.3.tgz#b242dd3cd838564be16e20c6bfadb92f6058950d"
integrity sha512-an3od9wrtESgbexSu4Cc81vyHExZaeDeDJWd0+g2SANSAt3OFMt+gsT2c78rGep9J7+a1qhuvQRC43koSVWACQ==

"@canonical/[email protected]":
version "2.7.0"
Expand Down

0 comments on commit c736102

Please sign in to comment.