diff --git a/CHANGELOG.md b/CHANGELOG.md index a59d2d1..c46e94b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +## [1.3.6](https://github.com/hayes0724/shopify-packer/compare/1.3.5...1.3.6) (2021-03-20) + + +### :memo: Documentation + +* changed docusaurus.config.js ([4755789](https://github.com/hayes0724/shopify-packer/commit/4755789c12cd7359fcd832c54a01882d6172ea40)) +* changed docusaurus.config.js again ([d6ba1ed](https://github.com/hayes0724/shopify-packer/commit/d6ba1edc116b63d0ceade781c7bcfab0c19c1e4d)) +* documentation website ([b5ab20f](https://github.com/hayes0724/shopify-packer/commit/b5ab20fbdc758a42812ad03d216e9c39e87a9014)) +* fixed broken links ([f6f4a9e](https://github.com/hayes0724/shopify-packer/commit/f6f4a9e15d81c4561f36310b0045d7bfce23b7d1)) + + +### :sparkles: Features + +* Added reload delay setting ([3ef3b40](https://github.com/hayes0724/shopify-packer/commit/3ef3b408c6e24ba244f811443d4a5e97c256b904)) + + + ## [1.3.5](https://github.com/hayes0724/shopify-packer/compare/1.3.4...1.3.5) (2021-01-13) diff --git a/cli/commands/start.js b/cli/commands/start.js index 33e513d..85daf44 100644 --- a/cli/commands/start.js +++ b/cli/commands/start.js @@ -4,19 +4,14 @@ const figures = require('figures'); const ora = require('ora'); const ip = require('ip'); const consoleControl = require('console-control-strings'); -const clearConsole = require('../../src/utilities/clear-console'); + const AssetServer = require('../../src/server/asset'); const DevServer = require('../../src/server/dev'); const webpackConfig = require('../../src/webpack/config/dev.config'); const getAvailablePortSeries = require('../../src/utilities/get-available-port-series'); const promptContinueIfPublishedTheme = require('../../src/server/prompts/continue-if-published-theme'); const promptSkipSettingsData = require('../../src/server/prompts/skip-settings-data'); - -const { - getStoreValue, - getThemeIdValue, - assign, -} = require('../../src/env'); +const {getStoreValue, getThemeIdValue, assign} = require('../../src/env'); const PackerConfig = require('../../src/config'); const config = new PackerConfig(require('../../packer.schema')); diff --git a/docs/docs/config/settings.md b/docs/docs/config/settings.md index 278e895..7c651d8 100644 --- a/docs/docs/config/settings.md +++ b/docs/docs/config/settings.md @@ -27,6 +27,8 @@ module.exports = { 'network.ipAddress': '192.168.1.1', 'network.external': '', 'network.interface': '', + // Add a reload delay before refreshing browser in ms, Shopify may need several seconds + 'network.reload': 0, // Add additional entrypoint 'entrypoints': {}, } @@ -179,5 +181,7 @@ module.exports = { 'network.ip': '', 'network.external': '', 'network.interface': '', + // Add a reload delay before refreshing browser + 'network.reload': '', }; ``` \ No newline at end of file diff --git a/package.json b/package.json index ec9aae2..7eb1c22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hayes0724/shopify-packer", - "version": "1.3.5", + "version": "1.3.6", "bin": { "packer": "cli/index.js" }, diff --git a/packer.schema.js b/packer.schema.js index dd30499..728f590 100644 --- a/packer.schema.js +++ b/packer.schema.js @@ -6,4 +6,5 @@ module.exports = { 'network.ip': '', 'network.external': '', 'network.interface': '', + 'network.reload': 0, }; diff --git a/src/server/asset/index.js b/src/server/asset/index.js index 6819f53..57164d3 100644 --- a/src/server/asset/index.js +++ b/src/server/asset/index.js @@ -50,10 +50,13 @@ module.exports = class AssetServer { } _onAfterSync(files) { - this.app.webpackHotMiddleware.publish({ - action: 'shopify_upload_finished', - force: files.length > 0, - }); + const _syncHandler = () => { + this.app.webpackHotMiddleware.publish({ + action: 'shopify_upload_finished', + force: files.length > 0, + }); + }; + setTimeout(_syncHandler, parseInt(config.get('network.reload'))); } _isChunk(key, chunks) {