diff --git a/scripts/hab-build-and-push.sh b/scripts/hab-build-and-push.sh index f890d0e053a95860c5d758a5288c451ac7bc89f1..7d1f356f5da64688031a678a6924458bff72e275 100755 --- a/scripts/hab-build-and-push.sh +++ b/scripts/hab-build-and-push.sh @@ -30,7 +30,7 @@ ln -s "$(hab pkg path core/coreutils)/bin/env" /usr/bin/env hab pkg install -b core/coreutils core/bash core/node core/yarn core/git core/aws-cli yarn install --cache-folder .yarn -GENERATE_SMOKE_TESTS=true yarn build --output-path build +yarn build --output-path build mkdir build/pages mv build/*.html build/pages diff --git a/src/hub.html b/src/hub.html index 2a379ab44607c2318ab7017aa00e12b45e982d50..c37b5800001ee8437b0f5097734ff40e3185ba4e 100644 --- a/src/hub.html +++ b/src/hub.html @@ -22,7 +22,7 @@ <script src="https://cdn.rawgit.com/gfodor/ba8f88d9f34fe9cbe59a01ce3c48420d/raw/03e31f0ef7b9eac5e947bd39e440f34df0701f75/naf-janus-adapter-logging.js" integrity="sha384-4q1V8Q88oeCFriFefFo5uEUtMzbw6K116tFyC9cwbiPr6wEe7050l5HoJUxMvnzj" crossorigin="anonymous"></script> </head> -<body data-html-prefix="<%= HTML_PREFIX %>"> +<body> <audio id="test-tone"> <source src="./assets/sfx/tone.webm" type="audio/webm"/> <source src="./assets/sfx/tone.mp3" type="audio/mpeg"/> diff --git a/src/hub.js b/src/hub.js index 2fbef43929b944c95804f823142bbad546bff149..4f4b205b97d3b393213ce59280f044a5b93e21a1 100644 --- a/src/hub.js +++ b/src/hub.js @@ -164,7 +164,6 @@ function mountUI(scene, props = {}) { const disableAutoExitOnConcurrentLoad = qsTruthy("allow_multi"); const forcedVREntryType = qs.get("vr_entry_type"); const enableScreenSharing = qsTruthy("enable_screen_sharing"); - const htmlPrefix = document.body.dataset.htmlPrefix || ""; const showProfileEntry = !store.state.activity.hasChangedName; ReactDOM.render( @@ -176,7 +175,6 @@ function mountUI(scene, props = {}) { forcedVREntryType, enableScreenSharing, store, - htmlPrefix, showProfileEntry, ...props }} diff --git a/src/react-components/profile-entry-panel.js b/src/react-components/profile-entry-panel.js index 0e7b22c0042f0e05aad3634b55bc43f91bd4a1dd..32a1223e8105ec4ba301b5c3422787c6b38be4eb 100644 --- a/src/react-components/profile-entry-panel.js +++ b/src/react-components/profile-entry-panel.js @@ -8,7 +8,6 @@ class ProfileEntryPanel extends Component { store: PropTypes.object, messages: PropTypes.object, finished: PropTypes.func, - htmlPrefix: PropTypes.string, intl: PropTypes.object }; @@ -103,7 +102,7 @@ class ProfileEntryPanel extends Component { </div> <iframe className="profile-entry__avatar-selector" - src={`/${this.props.htmlPrefix}avatar-selector.html#avatar_id=${this.state.avatarId}`} + src={`/avatar-selector.html#avatar_id=${this.state.avatarId}`} ref={ifr => (this.avatarSelector = ifr)} /> </div> diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index e9ff7f529c58672f789bac21b295b70cebb8757b..f398c263c205ce836ddf0ace3703a90de1972666 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -63,7 +63,6 @@ class UIRoot extends Component { store: PropTypes.object, scene: PropTypes.object, linkChannel: PropTypes.object, - htmlPrefix: PropTypes.string, showProfileEntry: PropTypes.bool, availableVREntryTypes: PropTypes.object, initialEnvironmentLoaded: PropTypes.bool, @@ -853,11 +852,7 @@ class UIRoot extends Component { <div className={dialogBoxContentsClassNames}>{dialogContents}</div> {this.state.showProfileEntry && ( - <ProfileEntryPanel - finished={this.onProfileFinished} - store={this.props.store} - htmlPrefix={this.props.htmlPrefix} - /> + <ProfileEntryPanel finished={this.onProfileFinished} store={this.props.store} /> )} </div> )} diff --git a/webpack.config.js b/webpack.config.js index 454da02049360c1fc11b4c7bcbe820b6537faf2e..c3e3b563aac47a6393eb2dda1574bbc1c8416f96 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -11,8 +11,6 @@ const CopyWebpackPlugin = require("copy-webpack-plugin"); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const _ = require("lodash"); -const SMOKE_PREFIX = "smoke-"; - function createHTTPSConfig() { if (process.env.NODE_ENV === "production") { return false; @@ -260,7 +258,6 @@ const config = { // expose these variables to the lodash template // ex: <%= ORIGIN_TRIAL_TOKEN %> imports: { - HTML_PREFIX: process.env.GENERATE_SMOKE_TESTS ? SMOKE_PREFIX : "", NODE_ENV: process.env.NODE_ENV, ORIGIN_TRIAL_EXPIRES: process.env.ORIGIN_TRIAL_EXPIRES, ORIGIN_TRIAL_TOKEN: process.env.ORIGIN_TRIAL_TOKEN @@ -279,29 +276,4 @@ const config = { ] }; -module.exports = () => { - if (process.env.GENERATE_SMOKE_TESTS && process.env.BASE_ASSETS_PATH) { - const smokeConfig = Object.assign({}, config, { - // Set the public path for to point to the correct assets on the smoke-test build. - output: Object.assign({}, config.output, { - publicPath: process.env.BASE_ASSETS_PATH.replace("://", `://${SMOKE_PREFIX}`) - }), - // For this config - plugins: config.plugins.map(plugin => { - if (plugin instanceof HTMLWebpackPlugin) { - return new HTMLWebpackPlugin( - Object.assign({}, plugin.options, { - filename: SMOKE_PREFIX + plugin.options.filename - }) - ); - } - - return plugin; - }) - }); - - return [config, smokeConfig]; - } else { - return config; - } -}; +module.exports = { config };