Skip to content

Commit fbc151b

Browse files
committed
🎉 Initial template
1 parent c5ec218 commit fbc151b

21 files changed

+841
-0
lines changed

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Dash TypeScript Component Template
2+
3+
This repository contains a [Cookiecutter](https://github.com/audreyr/cookiecutter) template to create your own Dash components with TypeScript.
4+
5+
- New to Dash? Check out the [official Dash Documentations](https://dash.plotly.com)
6+
- Need help with your component? Create a post on the [Dash Community Forum](https://community.plotly.com/c/dash)
7+
8+
# Usage
9+
10+
To use this template:
11+
12+
1. Install the requirements:
13+
```shell
14+
pip install cookiecutter
15+
```
16+
NodeJS is also required, install `nvm` to get the appropriate node version.
17+
3. Run cookiecutter on the template repo:
18+
```shell
19+
cookiecutter gh:t4rk1n/dash-typescript-component-template
20+
```
21+
3. Answer the questions about the project.
22+
- `project_name`: This is the "human-readable" name of your project. For example, "Dash Core Components".
23+
- `project_shortname`: is derived from the project name, it is the name of the "Python library" for your project. By default, this is generated from your `project_name` by lowercasing the name and replacing spaces & `-` with underscores. For example, for "Dash Core Components" this would be "dash_core_components".
24+
- `component_name`: This is the name of the initial component that is generated. As a JavaScript class name it should be in PascalCase. defaults to the PascalCase version of `project_shortname`.
25+
- `jl_prefix`: Optional prefix for Julia components. For example, `dash_core_components` uses "dcc" so the Python `dcc.Input` becomes `dccInput` in Julia, and `dash_table` uses "dash" to make `dashDataTable`.
26+
- `r_prefix`: Optional prefix for R components. For example, `dash_core_components` uses "dcc" so the Python `dcc.Input` becomes `dccInput` in R, and `dash_table` uses "dash" to make `dashDataTable`.
27+
- `author_name` and `author_email`: for package.json and DESCRIPTION (for R) metadata.
28+
- `github_org`: If you plan to push this to GitHub, enter the organization or username that will own it (for URLs to the project homepage and bug report page)
29+
- `description`: the project description, included in package.json.
30+
- `license`: License type for the component library. Plotly recommends the MIT license, but you should read the generated LICENSE file carefully to make sure this is right for you.
31+
- `publish_on_npm`: Set to false to only serve locally from the package data.
32+
4. The project will be generated in a folder named with your `project_shortname`.
33+
5. Follow the directions in the generated README to start developing your new Dash component.
34+
35+
## More Resources
36+
37+
- To get a feel for what's involved in creating a component, read the [README.md generated by this cookiecutter](%7B%7Bcookiecutter.project_shortname%7D%7D/README.md)
38+
- This template was adapted from the [original component template](https://github.com/plotly/dash-component-boilerplate)
39+
- Examples of Dash component libraries include:
40+
- [`dash-core-components`](https://github.com/plotly/dash-core-components)
41+
- [`dash-html-components`](https://github.com/plotly/dash-html-components)
42+
- [`dash-cytoscape`](https://github.com/plotly/dash-cytoscape)
43+
- [`dash-deck`](https://github.com/plotly/dash-deck)
44+
- [Curated community-made components](https://plotly.com/dash-community-components/)

cookiecutter.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"project_name": "my dash component",
3+
"project_shortname": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_') }}",
4+
"component_name": "{{ cookiecutter.project_shortname.split('_')|map('capitalize')|join('') }}",
5+
"jl_prefix": "",
6+
"r_prefix": "",
7+
"author_name": "Enter your first and last name (For package.json)",
8+
"author_email": "Enter your email (For package.json)",
9+
"github_org": "",
10+
"description": "Project Description",
11+
"license": [
12+
"MIT License",
13+
"BSD License",
14+
"ISC License",
15+
"Apache Software License 2.0",
16+
"GNU General Public License v3",
17+
"Not open source"
18+
],
19+
"publish_on_npm": true
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Webpack
3+
.build_cache
4+
### VisualStudioCode template
5+
.vscode/*
6+
!.vscode/settings.json
7+
!.vscode/tasks.json
8+
!.vscode/launch.json
9+
!.vscode/extensions.json
10+
### JetBrains template
11+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
12+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
13+
14+
# User-specific stuff
15+
.idea/**/workspace.xml
16+
.idea/**/tasks.xml
17+
.idea/**/usage.statistics.xml
18+
.idea/**/dictionaries
19+
.idea/**/shelf
20+
21+
# Sensitive or high-churn files
22+
.idea/**/dataSources/
23+
.idea/**/dataSources.ids
24+
.idea/**/dataSources.local.xml
25+
.idea/**/sqlDataSources.xml
26+
.idea/**/dynamic.xml
27+
.idea/**/uiDesigner.xml
28+
.idea/**/dbnavigator.xml
29+
30+
# Gradle
31+
.idea/**/gradle.xml
32+
.idea/**/libraries
33+
34+
# Gradle and Maven with auto-import
35+
# When using Gradle or Maven with auto-import, you should exclude module files,
36+
# since they will be recreated, and may cause churn. Uncomment if using
37+
# auto-import.
38+
# .idea/modules.xml
39+
# .idea/*.iml
40+
# .idea/modules
41+
42+
# CMake
43+
cmake-build-*/
44+
45+
# Mongo Explorer plugin
46+
.idea/**/mongoSettings.xml
47+
48+
# File-based project format
49+
*.iws
50+
51+
# IntelliJ
52+
out/
53+
54+
# mpeltonen/sbt-idea plugin
55+
.idea_modules/
56+
57+
# JIRA plugin
58+
atlassian-ide-plugin.xml
59+
60+
# Cursive Clojure plugin
61+
.idea/replstate.xml
62+
63+
# Crashlytics plugin (for Android Studio and IntelliJ)
64+
com_crashlytics_export_strings.xml
65+
crashlytics.properties
66+
crashlytics-build.properties
67+
fabric.properties
68+
69+
# Editor-based Rest Client
70+
.idea/httpRequests
71+
### Node template
72+
# Logs
73+
logs
74+
*.log
75+
npm-debug.log*
76+
yarn-debug.log*
77+
yarn-error.log*
78+
79+
# Runtime data
80+
pids
81+
*.pid
82+
*.seed
83+
*.pid.lock
84+
85+
# Directory for instrumented libs generated by jscoverage/JSCover
86+
lib-cov
87+
88+
# Coverage directory used by tools like istanbul
89+
coverage
90+
91+
# nyc test coverage
92+
.nyc_output
93+
94+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
95+
.grunt
96+
97+
# Bower dependency directory (https://bower.io/)
98+
bower_components
99+
100+
# node-waf configuration
101+
.lock-wscript
102+
103+
# Compiled binary addons (https://nodejs.org/api/addons.html)
104+
build/Release
105+
106+
# Dependency directories
107+
node_modules/
108+
jspm_packages/
109+
110+
# TypeScript v1 declaration files
111+
typings/
112+
113+
# Optional npm cache directory
114+
.npm
115+
116+
# Optional eslint cache
117+
.eslintcache
118+
119+
# Optional REPL history
120+
.node_repl_history
121+
122+
# Output of 'npm pack'
123+
*.tgz
124+
125+
# Yarn Integrity file
126+
.yarn-integrity
127+
128+
# dotenv environment variables file
129+
.env
130+
131+
# parcel-bundler cache (https://parceljs.org/)
132+
.cache
133+
134+
# next.js build output
135+
.next
136+
137+
# nuxt.js build output
138+
.nuxt
139+
140+
# vuepress build output
141+
.vuepress/dist
142+
143+
# Serverless directories
144+
.serverless
145+
### Python template
146+
# Byte-compiled / optimized / DLL files
147+
__pycache__/
148+
*.py[cod]
149+
*$py.class
150+
151+
# C extensions
152+
*.so
153+
154+
# Distribution / packaging
155+
.Python
156+
build/
157+
develop-eggs/
158+
dist/
159+
downloads/
160+
eggs/
161+
.eggs/
162+
lib64/
163+
parts/
164+
sdist/
165+
var/
166+
wheels/
167+
*.egg-info/
168+
.installed.cfg
169+
*.egg
170+
MANIFEST
171+
172+
# PyInstaller
173+
# Usually these files are written by a python script from a template
174+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
175+
*.manifest
176+
*.spec
177+
178+
# Installer logs
179+
pip-log.txt
180+
pip-delete-this-directory.txt
181+
182+
# Unit test / coverage reports
183+
htmlcov/
184+
.tox/
185+
.coverage
186+
.coverage.*
187+
nosetests.xml
188+
coverage.xml
189+
*.cover
190+
.hypothesis/
191+
.pytest_cache/
192+
193+
# Translations
194+
*.mo
195+
*.pot
196+
197+
# Django stuff:
198+
local_settings.py
199+
db.sqlite3
200+
201+
# Flask stuff:
202+
instance/
203+
.webassets-cache
204+
205+
# Scrapy stuff:
206+
.scrapy
207+
208+
# Sphinx documentation
209+
docs/_build/
210+
211+
# PyBuilder
212+
target/
213+
214+
# Jupyter Notebook
215+
.ipynb_checkpoints
216+
217+
# pyenv
218+
.python-version
219+
220+
# celery beat schedule file
221+
celerybeat-schedule
222+
223+
# SageMath parsed files
224+
*.sage.py
225+
226+
# Environments
227+
.venv
228+
env/
229+
venv/
230+
ENV/
231+
env.bak/
232+
venv.bak/
233+
234+
# Spyder project settings
235+
.spyderproject
236+
.spyproject
237+
238+
# Rope project settings
239+
.ropeproject
240+
241+
# mkdocs documentation
242+
/site
243+
244+
# mypy
245+
.mypy_cache/
246+
### SublimeText template
247+
# Cache files for Sublime Text
248+
*.tmlanguage.cache
249+
*.tmPreferences.cache
250+
*.stTheme.cache
251+
252+
# Workspace files are user-specific
253+
*.sublime-workspace
254+
255+
# Project files should be checked into the repository, unless a significant
256+
# proportion of contributors will probably not be using Sublime Text
257+
# *.sublime-project
258+
259+
# SFTP configuration file
260+
sftp-config.json
261+
262+
# Package control specific files
263+
Package Control.last-run
264+
Package Control.ca-list
265+
Package Control.ca-bundle
266+
Package Control.system-ca-bundle
267+
Package Control.cache/
268+
Package Control.ca-certs/
269+
Package Control.merged-ca-bundle
270+
Package Control.user-ca-bundle
271+
oscrypto-ca-bundle.crt
272+
bh_unicode_properties.cache
273+
274+
# Sublime-github package stores a github token in this file
275+
# https://packagecontrol.io/packages/sublime-github
276+
GitHub.sublime-settings
277+
278+
# Julia manifest file names
279+
Manifest.toml
280+
JuliaManifest.toml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# dependencies
2+
/node_modules
3+
4+
# testing
5+
/coverage
6+
7+
# misc
8+
.DS_Store
9+
.env.local
10+
.env.development.local
11+
.env.test.local
12+
.env.production.local
13+
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
18+
# Development folders and files
19+
public
20+
src
21+
scripts
22+
config
23+
.travis.yml
24+
CHANGELOG.md
25+
README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16.14.0

0 commit comments

Comments
 (0)