From e3b78c81316e977394c99c0a985c16b59fc9e9e6 Mon Sep 17 00:00:00 2001 From: Josh Kasten Date: Thu, 15 Dec 2022 15:02:40 -0500 Subject: [PATCH] rename OneSignalSDK.js to OneSignalSDK.page.js --- .gitignore | 4 ++-- build/config/sdk.config.js | 5 ++--- build/config/webpack.config.js | 2 +- build/scripts/publish.sh | 4 ++-- express_webpack/index.html | 2 +- package.json | 2 +- src/entries/pageSdkInit.ts | 2 +- src/entries/sdk.ts | 4 ++-- src/page/utils/BrowserSupportsPush.ts | 2 +- test/unit/modules/entryInitialization.ts | 6 +++--- 10 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 2971948b9..16a859b09 100755 --- a/.gitignore +++ b/.gitignore @@ -13,8 +13,8 @@ build/size-analysis.html *.key *.crt yarn-error.log -dist/Dev-OneSignalSDK.js -dist/Dev-OneSignalSDK.js.map +dist/Dev-OneSignalSDK.page.js +dist/Dev-OneSignalSDK.page.js.map .vscode/** !.vscode/launch.json diff --git a/build/config/sdk.config.js b/build/config/sdk.config.js index f0e9f4fe1..7b1124b07 100644 --- a/build/config/sdk.config.js +++ b/build/config/sdk.config.js @@ -111,7 +111,7 @@ async function generateWebpackConfig() { return { target: 'web', entry: { - 'OneSignalSDK.js': path.resolve('build/ts-to-es6/src/entries/sdk.js'), + 'OneSignalSDK.page.js': path.resolve('build/ts-to-es6/src/entries/sdk.js'), 'OneSignalSDKStyles.css': path.resolve('src/entries/stylesheet.scss') }, output: { @@ -140,8 +140,7 @@ async function generateWebpackConfig() { 'PushNotSupportedError', 'PushPermissionNotGrantedError', 'SdkInitError', - 'TimeoutError', - 'OneSignalStubES6' + 'TimeoutError' ] } : false, output: { diff --git a/build/config/webpack.config.js b/build/config/webpack.config.js index f4f160ea1..31128e253 100644 --- a/build/config/webpack.config.js +++ b/build/config/webpack.config.js @@ -69,7 +69,7 @@ async function generateWebpackConfig() { return { target: 'web', entry: { - 'OneSignalSDK.js': path.resolve('build/ts-to-es6/src/entries/sdk.js'), + 'OneSignalSDK.page.js': path.resolve('build/ts-to-es6/src/entries/sdk.js'), 'OneSignalSDKWorker.js': path.resolve('build/ts-to-es6/src/entries/worker.js'), 'OneSignalSDKStyles.css': path.resolve('src/entries/stylesheet.scss'), }, diff --git a/build/scripts/publish.sh b/build/scripts/publish.sh index f665fdbe9..259a6ad80 100755 --- a/build/scripts/publish.sh +++ b/build/scripts/publish.sh @@ -16,8 +16,8 @@ pwd mkdir build/releases -cp build/bundles/OneSignalSDK.js build/releases/$PREFIX"OneSignalSDK.js" -cp build/bundles/OneSignalSDK.js.map build/releases/$PREFIX"OneSignalSDK.js.map" +cp build/bundles/OneSignalSDK.page.js build/releases/$PREFIX"OneSignalSDK.page.js" +cp build/bundles/OneSignalSDK.page.js.map build/releases/$PREFIX"OneSignalSDK.page.js.map" cp build/bundles/OneSignalPageSDKES6.js build/releases/$PREFIX"OneSignalPageSDKES6.js" cp build/bundles/OneSignalPageSDKES6.js.map build/releases/$PREFIX"OneSignalPageSDKES6.js.map" diff --git a/express_webpack/index.html b/express_webpack/index.html index a655c3e24..cd6c5ef4d 100644 --- a/express_webpack/index.html +++ b/express_webpack/index.html @@ -7,7 +7,7 @@ Ensure OneSignal SDK correctly handles this. --> - +