Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Issue 745 - Rename async modules (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Andre-Rivet authored Feb 27, 2020
1 parent 627fc0f commit 8bb6a58
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
- [#762](https://github.com/plotly/dash-core-components/pull/762) Renamed async modules with hyphen `-` instead of tilde `~`

## [1.8.0] - 2020-02-04
### Changed
- [#743](https://github.com/plotly/dash-core-components/pull/743) Location component now emits an event on URL path update from Link component
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ include dash_core_components/dash_core_components.min.js
include dash_core_components/dash_core_components.min.js.map
include dash_core_components/dash_core_components-shared.js
include dash_core_components/dash_core_components-shared.js.map
include dash_core_components/async~*.js
include dash_core_components/async~*.js.map
include dash_core_components/async-*.js
include dash_core_components/async-*.js.map
include dash_core_components/metadata.json
include dash_core_components/package-info.json
include dash_core_components/plotly.min.js
Expand Down
16 changes: 8 additions & 8 deletions dash_core_components_base/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@
_js_dist = []

_js_dist.extend([{
'relative_package_path': 'async~{}.js'.format(async_resource),
'relative_package_path': 'async-{}.js'.format(async_resource),
'external_url': (
'https://unpkg.com/dash-core-components@{}'
'/dash_core_components/async~{}.js'
'/dash_core_components/async-{}.js'
).format(__version__, async_resource),
'namespace': 'dash_core_components',
'async': True
} for async_resource in async_resources])

_js_dist.extend([{
'relative_package_path': 'async~{}.js.map'.format(async_resource),
'relative_package_path': 'async-{}.js.map'.format(async_resource),
'external_url': (
'https://unpkg.com/dash-core-components@{}'
'/dash_core_components/async~{}.js.map'
'/dash_core_components/async-{}.js.map'
).format(__version__, async_resource),
'namespace': 'dash_core_components',
'dynamic': True
Expand Down Expand Up @@ -116,19 +116,19 @@
'async': 'eager'
},
{
'relative_package_path': 'async~plotlyjs.js',
'relative_package_path': 'async-plotlyjs.js',
'external_url': (
'https://unpkg.com/dash-core-components@{}'
'/dash_core_components/async~graph~plotlyjs.js'
'/dash_core_components/async-plotlyjs.js'
).format(__version__),
'namespace': 'dash_core_components',
'async': 'lazy'
},
{
'relative_package_path': 'async~plotlyjs.js.map',
'relative_package_path': 'async-plotlyjs.js.map',
'external_url': (
'https://unpkg.com/dash-core-components@{}'
'/dash_core_components/async~graph~plotlyjs.js.map'
'/dash_core_components/async-plotlyjs.js.map'
).format(__version__),
'namespace': 'dash_core_components',
'dynamic': True
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/graph/test_graph_varia.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def findSyncPlotlyJs(scripts):

def findAsyncPlotlyJs(scripts):
for script in scripts:
if "dash_core_components/async~plotlyjs" in script.get_attribute(
if "dash_core_components/async-plotlyjs" in script.get_attribute(
'src'
):
return script
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ module.exports = (env, argv) => {
chunks: 'async',
minSize: 0,
name(module, chunks, cacheGroupKey) {
return `${cacheGroupKey}~${chunks[0].name}`;
return `${cacheGroupKey}-${chunks[0].name}`;
}
},
shared: {
Expand All @@ -134,7 +134,7 @@ module.exports = (env, argv) => {
new WebpackDashDynamicImport(),
new webpack.SourceMapDevToolPlugin({
filename: '[file].map',
exclude: ['async~plotlyjs']
exclude: ['async-plotlyjs']
})
]
}
Expand Down

0 comments on commit 8bb6a58

Please sign in to comment.