Skip to content

Commit 067c028

Browse files
feat: set up CDN publish pipeline for auth0-spa-js (#1402)
Jira Link : https://auth0team.atlassian.net/browse/ESD-50270 Added makefile to support CDN publish <!-- By submitting a PR to this repository, you agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md). Please see the [contributing guidelines](https://github.com/auth0/.github/blob/master/CONTRIBUTING.md) for how to create and submit a high-quality PR for this repo. --> ### Changes <!-- Please describe both what is changing and why this is important. Include: - Classes and methods added, deleted, deprecated, or changed - Screenshots of new or changed UI, if applicable - A summary of usage if this is a new feature or change to a public API (this should also be added to relevant documentation once released) --> ### References <!-- Please include relevant links supporting this change such as a: - support ticket - community post - StackOverflow post - support forum thread Please note any links that are not publicly accessible. --> ### Testing **Tested in jenkins:** <img width="2536" height="761" alt="Screenshot 2025-08-14 at 7 31 25 PM" src="https://github.com/user-attachments/assets/002fbe3e-2bdb-4285-968d-9f2bb820f036" /> <!-- Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors. --> - [x] This change adds unit test coverage - [x] This change adds integration test coverage - [x] This change has been tested on the latest version of the platform/language ### Checklist - [x] I have read the [Auth0 general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) - [x] I have read the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) - [x] All code quality tools/guidelines have been run/followed
1 parent 0b1e43a commit 067c028

File tree

3 files changed

+37
-76
lines changed

3 files changed

+37
-76
lines changed

Jenkinsfile

Lines changed: 0 additions & 61 deletions
This file was deleted.

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.PHONY: install lint test build publish
2+
3+
install:
4+
@echo "Running install..."
5+
npm ci
6+
7+
lint:
8+
@echo "Running lint..."
9+
npm run lint
10+
11+
test:
12+
@echo "Running test..."
13+
npm run test
14+
15+
build:
16+
@echo "Running build..."
17+
rm -rf build && npm run build
18+
19+
publish:
20+
@echo "Running cdn-publish..."
21+
npm run publish:cdn

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,28 @@
77
"main": "dist/lib/auth0-spa-js.cjs.js",
88
"types": "dist/typings/index.d.ts",
99
"module": "dist/auth0-spa-js.production.esm.js",
10+
"ccu": {
11+
"name": "auth0-spa-js",
12+
"cdn": "https://cdn.auth0.com",
13+
"bucket": "assets.us.auth0.com",
14+
"localPath": "dist",
15+
"mainBundleFile": "auth0-spa-js.production.js",
16+
"digest": {
17+
"hashes": [
18+
"sha384"
19+
],
20+
"extensions": [
21+
".js"
22+
]
23+
}
24+
},
1025
"scripts": {
1126
"dev": "rimraf dist && rollup -c --watch",
1227
"start": "npm run dev",
1328
"docs": "typedoc --options ./typedoc.js src",
1429
"build": "rimraf dist && rollup -m -c --environment NODE_ENV:production && npm run test:es-check",
1530
"build:stats": "rimraf dist && rollup -m -c --environment NODE_ENV:production --environment WITH_STATS:true && npm run test:es-check && open bundle-stats/index.html",
31+
"lint": "eslint --ext .jsx,.js src/",
1632
"lint:security": "eslint ./src --ext ts --no-eslintrc --config ./.eslintrc.security",
1733
"test": "jest --coverage --silent",
1834
"test:watch": "jest --coverage --watch",
@@ -98,21 +114,6 @@
98114
"Single Page Application authentication",
99115
"SPA authentication"
100116
],
101-
"ccu": {
102-
"name": "auth0-spa-js",
103-
"cdn": "https://cdn.auth0.com",
104-
"mainBundleFile": "auth0-spa-js.production.js",
105-
"bucket": "assets.us.auth0.com",
106-
"localPath": "dist",
107-
"digest": {
108-
"hashes": [
109-
"sha384"
110-
],
111-
"extensions": [
112-
".js"
113-
]
114-
}
115-
},
116117
"husky": {
117118
"hooks": {
118119
"pre-commit": "pretty-quick --staged"

0 commit comments

Comments
 (0)