Skip to content

Commit 8cba774

Browse files
committed
Initial working version.
1 parent 252ea6c commit 8cba774

23 files changed

+2239
-350
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ venv
2929
*.pyc
3030

3131
# builds
32-
my_dash_component.egg-info
32+
dash_responsive_grid_layout.egg-info
3333
dist
3434
*__pycache__*
3535
__pycache__/

MANIFEST.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include my_dash_component/bundle.js
2-
include my_dash_component/metadata.json
3-
include my_dash_component/package.json
1+
include dash_responsive_grid_layout/bundle.js
2+
include dash_responsive_grid_layout/metadata.json
3+
include dash_responsive_grid_layout/package.json
44
include README.md

README.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
1-
# Dash Component Boilerplate
1+
# Dash Responsive Grid Layout
22

33
This repository contains the minimal set of code required to create your own custom Dash component.
44

5-
To create your own Dash component:
6-
1. Fork this repo
7-
2. Find-and-replace:
8-
1. `my_dash_component` with your component library name.
9-
2. `my-dash-component` with your component library name.
10-
3. `my-name` with your name and `my-email` with your email address
11-
4. `my-license` with your license (e.g. `MIT`)
12-
5. Rename the folder `my_dash_component/` with your component library name
13-
3. Install the dependencies:
5+
1. Install the dependencies:
146
```
157
npm install
168
```
17-
4. Open up the JavaScript demo environment:
9+
2. Open up the JavaScript demo environment:
1810
```
1911
npm run start
2012
```
21-
5. Write your component code in `src/lib/components`. There is a sample component called `ExampleComponent.react.js` that you can use for inspiration. The demo app is in `src/demo` and you will import your example component code into your demo app.
22-
6. Test your code in a Python environment:
13+
3. Write your component code in `src/lib/components`. There is a sample component called `ExampleComponent.react.js` that you can use for inspiration. The demo app is in `src/demo` and you will import your example component code into your demo app.
14+
4. Test your code in a Python environment:
2315
1. Build your code
2416
```
2517
npm run build:js-dev
@@ -29,7 +21,7 @@ npm run start
2921
```
3022
python usage.py
3123
```
32-
7. Create a production build and publish:
24+
5. Create a production build and publish:
3325
1. Build your code:
3426
```
3527
npm run build:js
@@ -43,20 +35,19 @@ npm run start
4335
4436
3. Test your tarball by copying it into a new environment and installing it locally:
4537
```
46-
pip install my_dash_component-0.0.1.tar.gz
38+
pip install dash_responsive_grid_layout-0.0.1.tar.gz
4739
```
4840
4941
4. If it works, then you can publish the component to NPM and PyPI:
5042
```
5143
npm run publish
5244
```
5345
```
54-
twine upload dist/dash_component-0.0.1.tar.gz
46+
twine upload dist/dash_responsive_grid_layout-0.0.1.tar.gz
5547
```
56-
8. Share your component with the community! https://community.plot.ly/c/dash
5748
5849
# More details
59-
- Include CSS files in your distribution folder (`my_dash_component`) and reference them in `MANIFEST.in`
50+
- Include CSS files in your distribution folder (`dash_responsive_grid_layout`) and reference them in `MANIFEST.in`
6051
- The `tests` folder contains a sample integration test. This will run a sample Dash app in a browser. Run this with:
6152
```
6253
python -m tests.test_render

my_dash_component/__init__.py renamed to dash_responsive_grid_layout/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{
3434
'relative_package_path': 'bundle.js',
3535
'external_url': (
36-
'https://unpkg.com/my_dash_component'
36+
'https://unpkg.com/dash_responsive_grid_layout'
3737
'/' + package_name + '/bundle.js'
3838
).format(__version__),
3939
'namespace': package_name

dash_responsive_grid_layout/bundle.js

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

0 commit comments

Comments
 (0)