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

Commit 4d7fe82

Browse files
Merge pull request #299 from plotly/update_scripts
Update npm scripts used for building, testing, etc.
2 parents 926f0fd + d02fc53 commit 4d7fe82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4053
-8806
lines changed

.babelrc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"extends": "./node_modules/dash-components-archetype/config/babel/babelrc",
3-
"plugins": [
4-
"styled-jsx/babel"
5-
]
6-
}
2+
"presets": ["env", "react"],
3+
"plugins": ["transform-object-rest-spread", "styled-jsx/babel"]
4+
}

.circleci/config.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,22 @@ jobs:
3434
paths:
3535
- "venv"
3636
- "node_modules"
37+
38+
- run:
39+
name: prettier --list-different
40+
command: npm run format:test
41+
42+
- run:
43+
name: npm run lint
44+
command: npm run lint
45+
3746
- run:
3847
name: Build
3948
command: |
4049
. venv/bin/activate
4150
npm run build:js
4251
npm run build:py
4352
44-
- run:
45-
name: npm test
46-
command: npm test
47-
4853
- run:
4954
name: Run tests
5055
command: |

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
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.31.0] - 2018-09-21
6+
### Changed
7+
- Updated NPM scripts:
8+
- `test` now runs Selenium integration tests
9+
- `format` runs Prettier formatter
10+
- There are new `build` scripts, most notably `build:watch` runs a watcher and rebuilds upon changes
11+
- There's a new `publish-all` script that publishes to NPM and PyPi
12+
### Fixed
13+
- The `start` script will now run the `Demo` application
14+
515
## [0.30.2] - 2018-09-21
616
### Fixed
717
- Fixed regression in Graph component where it wouldn't resize correctly [#256](https://github.com/plotly/dash-core-components/issues/256)

README.md

Lines changed: 19 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ $ npm i
1818
2. Build the code:
1919

2020
```
21-
$ npm run build-dev
21+
$ npm run build-all
2222
```
2323

2424
3. Install the library
2525

2626
```
27-
$ cd dash-core-components
28-
$ npm run copy-lib
2927
$ python setup.py install
3028
```
3129

@@ -51,57 +49,34 @@ You can start up a demo development server to see a demo of the rendered
5149
components:
5250

5351
```sh
54-
$ builder run demo
55-
$ open http://localhost:9000
52+
$ npm start
5653
```
5754

5855
You have to maintain the list of components in `demo/Demo.react.js`.
5956

6057
### Code quality and tests
6158

6259
### To run integration tests (test_integration.py)
63-
We run our integration tests on CircleCI with help from Tox. There’s a tox.ini file which holds the configuration, refer to [tox's documentation](http://tox.readthedocs.io/en/latest/index.html) for help. You may need to set environment variables in your terminal, like `TOX_PYTHON_27` to my version of python that I wanted tox to use. So running:
64-
65-
```sh
66-
export TOX_PYTHON_27=python2
67-
```
68-
69-
set the `TOX_PYTHON_27` env variable to point to `python2`, which is Python 2.7 running on my machine.
70-
You could also look in `tox.ini` and see which tests it runs, and run those commands yourself:
71-
60+
You can run the unit tests with the
7261
```sh
73-
python -m unittest test.test_integration
62+
npm test
7463
```
64+
command.
7565

7666
### Testing your components in Dash
67+
1. Run the build watcher by running
68+
$ npm run build:watch
7769

78-
1. Build development bundle to `lib/` and watch for changes
79-
80-
# Once this is started, you can just leave it running.
81-
$ npm start
82-
83-
2. Install module locally (after every change)
84-
85-
# Generate metadata, and build the JavaScript bundle
86-
$ npm run install-local
87-
88-
# Now you're done. For subsequent changes, if you've got `npm start`
89-
# running in a separate process, it's enough to just do:
90-
$ python setup.py install
91-
92-
3. Run the dash layout you want to test
70+
2. Run the dash layout you want to test
9371

9472
# Import dash_core_components to your layout, then run it:
9573
$ python my_dash_layout.py
9674

9775
## Installing python package locally
9876

99-
Before publishing to PyPi, you can test installing the module locally:
100-
101-
```sh
102-
# Install in `site-packages` on your machine
103-
$ npm run install-local
104-
```
77+
You can run
78+
$ python setup.py install
79+
to install the package locally, so you can test it out in your current environment.
10580

10681
## Uninstalling python package locally
10782

@@ -111,23 +86,19 @@ $ npm run uninstall-local
11186

11287
## Publishing
11388

114-
See the [Publishing New Components/Features](CONTRIBUTING.md#publishing-new-componentsfeatures) section of the Contributing guide for step-by-step instructions on publishing new components.
115-
116-
## Builder / Archetype
117-
118-
We use [Builder][] to centrally manage build configuration, dependencies, and
119-
scripts.
120-
121-
To see all `builder` scripts available:
89+
There's an npm script that will handle publish, provided you have the right credentials. You can run it by running
12290

12391
```sh
124-
$ builder help
92+
$ npm run publish-all
12593
```
12694

127-
See the [dash-components-archetype][] repo for more information.
95+
See the [Publishing New Components/Features](CONTRIBUTING.md#publishing-new-componentsfeatures) section of the Contributing guide for step-by-step instructions on publishing new components.
96+
97+
## Dash Component Boilerplate
98+
99+
See the [dash-component-boilerplate](https://github.com/plotly/dash-component-boilerplate) repo for more information.
128100

129-
[Builder]: https://github.com/FormidableLabs/builder
130101
[Dash]: https://plot.ly/dash
102+
[Dash Component Boilerplate]: (https://github.com/plotly/dash-component-boilerplate)
131103
[NPM package authors]: https://www.npmjs.com/package/dash-core-components/access
132104
[PyPi]: https://pypi.python.org/pypi
133-
[dash-components-archetype]: https://github.com/plotly/dash-components-archetype

config/webpack/infer-namespace.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

config/webpack/partials/babel.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

config/webpack/partials/babelHot.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

config/webpack/partials/defineEnv.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

config/webpack/partials/entryDev.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

config/webpack/partials/entryHot.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/webpack/partials/entryProd.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

config/webpack/partials/optimizeProd.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

config/webpack/partials/outputDev.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

config/webpack/partials/outputProd.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

config/webpack/partials/sourceMapDev.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)