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

Commit 2805c8f

Browse files
authored
Merge pull request #293 from plotly/serve-unminified
Serve unminified bundle support
2 parents c82bea0 + ee48724 commit 2805c8f

10 files changed

+13127
-17
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.30.0] - 2018-09-20
6+
### Added
7+
- Unminified dev bundle support. [#293](https://github.com/plotly/dash-core-components/pull/293)
8+
59
## [0.29.0] -- 2018-09-13
610
### Added
711

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
include dash_core_components/bundle.js
2-
include dash_core_components/bundle.js.map
1+
include dash_core_components/dash_core_components.min.js
2+
include dash_core_components/dash_core_components.dev.js
33
include dash_core_components/metadata.json
44
include dash_core_components/[email protected]
55
include dash_core_components/[email protected]

dash_core_components/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
'namespace': 'dash_core_components'
4141
},
4242
{
43-
'relative_package_path': 'bundle.js',
43+
'relative_package_path': '{}.min.js'.format(__name__),
44+
'dev_package_path': '{}.dev.js'.format(__name__),
4445
'external_url': (
4546
'https://unpkg.com/dash-core-components@{}'
4647
'/dash_core_components/bundle.js'

dash_core_components/bundle.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dash_core_components/dash_core_components.dev.js

Lines changed: 13107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_core_components/bundle.js renamed to dash_core_components/dash_core_components.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dash_core_components/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.29.0'
1+
__version__ = '0.30.0'

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
{
22
"name": "dash-core-components",
3-
"version": "0.29.0",
3+
"version": "0.30.0",
44
"description": "Core component suite for Dash",
55
"repository": {
66
"type": "git",
77
"url": "git://github.com/plotly/dash-core-components.git"
88
},
99
"main": "src/index.js",
1010
"scripts": {
11-
"build-dev": "builder run clean-lib && builder run extract-metadata && builder run generate-python-classes && webpack -w --config=./config/webpack/webpack.config.dev.js",
12-
"build-dist": "builder run clean-lib && builder run extract-metadata && builder run generate-python-classes && cross-env NODE_ENV=production webpack --config=./config/webpack/webpack.config.dist.js",
13-
"copy-lib": "cp -f lib/* dash_core_components",
1411
"generate-python-classes": "python -c \"import dash; dash.development.component_loader.generate_classes('dash_core_components', 'dash_core_components/metadata.json');\"",
1512
"install-local": "npm run copy-lib && python setup.py install",
16-
"prepublish": "npm test && builder run build-dist && npm run copy-lib",
13+
"prepublish": "npm test && npm run build:js && npm run build:js-dev && npm run build:py",
1714
"publish-all": "npm publish && python setup.py sdist upload",
1815
"publish-pypi": "npm run prepublish && python setup.py sdist && twine upload --sign --skip-existing",
19-
"start": "./node_modules/.bin/builder run build-dev",
16+
"start": "webpack-serve ./webpack.serve.config.js --open",
2017
"test": "eslint src",
2118
"test-watch": "./node_modules/.bin/builder run test-frontend-watch",
2219
"test-debug": "./node_modules/.bin/builder run test-frontend-debug",
2320
"uninstall-local": "pip uninstall dash-core-components -y",
2421
"build:js": "webpack --mode production",
22+
"build:js-dev": "webpack --mode development",
2523
"build:py": "node ./extract-meta src/components > dash_core_components/metadata.json && cp package.json dash_core_components && npm run generate-python-classes"
2624
},
2725
"author": "Chris Parmer <[email protected]>",

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dash_html_components
1+
dash_html_components==0.12.0rc3
22
dash_renderer
33
dash
44
percy

webpack.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const packagejson = require('./package.json');
33

44
const dashLibraryName = packagejson.name.replace(/-/g, '_');
55

6-
module.exports = {
6+
module.exports = (env, argv) => ({
77
entry: {main: './src/index.js'},
88
output: {
99
path: path.resolve(__dirname, dashLibraryName),
10-
filename: 'bundle.js',
10+
filename: argv.mode === 'development' ? `${dashLibraryName}.dev.js` : `${dashLibraryName}.min.js`,
1111
library: dashLibraryName,
1212
libraryTarget: 'window'
1313
},
@@ -37,5 +37,6 @@ module.exports = {
3737
]
3838
}
3939
]
40-
}
41-
};
40+
},
41+
devtool: argv.mode === 'development' ? 'eval-source-map' : 'none'
42+
});

0 commit comments

Comments
 (0)