dash-html-components


Namedash-html-components JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/plotly/dash-html-components
SummaryVanilla HTML components for Dash
upload_time2021-09-03 17:15:28
maintainer
docs_urlNone
authorChris Parmer <chris@plotly.com>
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Notice

As of Dash 2, the development of dash-html-components has been moved to the [main Dash repo](https://github.com/plotly/dash)

This package exists for backward compatibility

---

# dash-html-components

Vanilla HTML components for [Dash][]

### Install dependencies

1. Create a virtual env and activate.
    ```
    $ virtualenv venv
    $ venv/bin/activate
    ```
    _Note: venv\Scripts\activate for Windows_

2. Install Python packages required to build components.
    ```
    $ pip install -r dev-requirements.txt
    ```
3. Generate components and install npm packages
    ```
    $ npm install
    ```

### Generating HTML Components

The components in `src/components`, as well as the export index in
`src/index.js` are programmatically generated from element definitions in
`scripts/`. To regenerate:


```sh
$ npm run generate-components
```
The list of attributes is regenerated by scraping the
[MDN HTML attribute reference][].

_Note: This step will have already been done for you when you ran `npm install`_

### Development

#### Testing your components in Dash

1. Watch for changes

        $ npm run build:watch

2. Install module locally (after every change)

        # Generate metadata, and build the JavaScript bundle
        $ npm run install-local

        # Now you're done. For subsequent changes, if you've got `npm run build:watch`
        $ python setup.py install

3. Run the Dash layout you want to test

        # Import dash_html_components to your layout, then run it:
        $ python my_dash_layout.py

#### Installing Python package locally

Before publishing to PyPi, you can test installing the module locally:

```sh
# Install in `site-packages` on your machine
$ npm run install-local
```

#### Uninstalling Python package locally

```sh
$ npm run uninstall-local
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) for guidelines on contributing to this project.


### Create a production build and publish:

1. Build your code:
    ```
    $ npm run build
    ```
2. Create a Python tarball
    ```
    $ python setup.py sdist
    ```
    This distribution tarball will get generated in the `dist/` folder

3. Test your tarball by copying it into a new environment and installing it locally:
    ```
    $ pip install dash-html-components-<new-version>.tar.gz
    ```

4. If it works, then you can publish the component to NPM and PyPI:
    1. Publish on PyPI
        ```
        $ twine upload dist/*
        ```
    2. Cleanup the dist folder (optional)
        ```
        $ rm -rf dist
        ```
    3. Publish on NPM (Optional if chosen False in `publish_on_npm`)
        ```
        $ npm publish
        ```
        _Publishing your component to NPM will make the JavaScript bundles available on the unpkg CDN. By default, Dash servers the component library's CSS and JS from the remote unpkg CDN, so if you haven't published the component package to NPM you'll need to set the `serve_locally` flags to `True` (unless you choose `False` on `publish_on_npm`). We will eventually make `serve_locally=True` the default, [follow our progress in this issue](https://github.com/plotly/dash/issues/284)._

[Dash]: https://plotly.com/dash
[MDN HTML attribute reference]: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
[NPM package authors]: https://www.npmjs.com/package/dash-html-components/access
[PyPi]: https://pypi.python.org/pypi
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/plotly/dash-html-components",
    "name": "dash-html-components",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Chris Parmer <chris@plotly.com>",
    "author_email": "chris@plotly.com",
    "download_url": "https://files.pythonhosted.org/packages/14/c6/957d5e83b620473eb3c8557a253fb01c6a817b10ca43d3ff9d31796f32a6/dash_html_components-2.0.0.tar.gz",
    "platform": "",
    "description": "# Notice\n\nAs of Dash 2, the development of dash-html-components has been moved to the [main Dash repo](https://github.com/plotly/dash)\n\nThis package exists for backward compatibility\n\n---\n\n# dash-html-components\n\nVanilla HTML components for [Dash][]\n\n### Install dependencies\n\n1. Create a virtual env and activate.\n    ```\n    $ virtualenv venv\n    $ venv/bin/activate\n    ```\n    _Note: venv\\Scripts\\activate for Windows_\n\n2. Install Python packages required to build components.\n    ```\n    $ pip install -r dev-requirements.txt\n    ```\n3. Generate components and install npm packages\n    ```\n    $ npm install\n    ```\n\n### Generating HTML Components\n\nThe components in `src/components`, as well as the export index in\n`src/index.js` are programmatically generated from element definitions in\n`scripts/`. To regenerate:\n\n\n```sh\n$ npm run generate-components\n```\nThe list of attributes is regenerated by scraping the\n[MDN HTML attribute reference][].\n\n_Note: This step will have already been done for you when you ran `npm install`_\n\n### Development\n\n#### Testing your components in Dash\n\n1. Watch for changes\n\n        $ npm run build:watch\n\n2. Install module locally (after every change)\n\n        # Generate metadata, and build the JavaScript bundle\n        $ npm run install-local\n\n        # Now you're done. For subsequent changes, if you've got `npm run build:watch`\n        $ python setup.py install\n\n3. Run the Dash layout you want to test\n\n        # Import dash_html_components to your layout, then run it:\n        $ python my_dash_layout.py\n\n#### Installing Python package locally\n\nBefore publishing to PyPi, you can test installing the module locally:\n\n```sh\n# Install in `site-packages` on your machine\n$ npm run install-local\n```\n\n#### Uninstalling Python package locally\n\n```sh\n$ npm run uninstall-local\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) for guidelines on contributing to this project.\n\n\n### Create a production build and publish:\n\n1. Build your code:\n    ```\n    $ npm run build\n    ```\n2. Create a Python tarball\n    ```\n    $ python setup.py sdist\n    ```\n    This distribution tarball will get generated in the `dist/` folder\n\n3. Test your tarball by copying it into a new environment and installing it locally:\n    ```\n    $ pip install dash-html-components-<new-version>.tar.gz\n    ```\n\n4. If it works, then you can publish the component to NPM and PyPI:\n    1. Publish on PyPI\n        ```\n        $ twine upload dist/*\n        ```\n    2. Cleanup the dist folder (optional)\n        ```\n        $ rm -rf dist\n        ```\n    3. Publish on NPM (Optional if chosen False in `publish_on_npm`)\n        ```\n        $ npm publish\n        ```\n        _Publishing your component to NPM will make the JavaScript bundles available on the unpkg CDN. By default, Dash servers the component library's CSS and JS from the remote unpkg CDN, so if you haven't published the component package to NPM you'll need to set the `serve_locally` flags to `True` (unless you choose `False` on `publish_on_npm`). We will eventually make `serve_locally=True` the default, [follow our progress in this issue](https://github.com/plotly/dash/issues/284)._\n\n[Dash]: https://plotly.com/dash\n[MDN HTML attribute reference]: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes\n[NPM package authors]: https://www.npmjs.com/package/dash-html-components/access\n[PyPi]: https://pypi.python.org/pypi",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Vanilla HTML components for Dash",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/plotly/dash-html-components"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75651b16b853844ef59b2742a7de74a598f376ac0ab581f0dcc34db294e5c90e",
                "md5": "c14f3f81c14879862a5390d82c730086",
                "sha256": "b42cc903713c9706af03b3f2548bda4be7307a7cf89b7d6eae3da872717d1b63"
            },
            "downloads": -1,
            "filename": "dash_html_components-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c14f3f81c14879862a5390d82c730086",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4092,
            "upload_time": "2022-03-02T16:56:07",
            "upload_time_iso_8601": "2022-03-02T16:56:07.734363Z",
            "url": "https://files.pythonhosted.org/packages/75/65/1b16b853844ef59b2742a7de74a598f376ac0ab581f0dcc34db294e5c90e/dash_html_components-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14c6957d5e83b620473eb3c8557a253fb01c6a817b10ca43d3ff9d31796f32a6",
                "md5": "a516a44b1fb347f44b2fb958440b2abf",
                "sha256": "8703a601080f02619a6390998e0b3da4a5daabe97a1fd7a9cebc09d015f26e50"
            },
            "downloads": -1,
            "filename": "dash_html_components-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a516a44b1fb347f44b2fb958440b2abf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3840,
            "upload_time": "2021-09-03T17:15:28",
            "upload_time_iso_8601": "2021-09-03T17:15:28.871480Z",
            "url": "https://files.pythonhosted.org/packages/14/c6/957d5e83b620473eb3c8557a253fb01c6a817b10ca43d3ff9d31796f32a6/dash_html_components-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-09-03 17:15:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "plotly",
    "github_project": "dash-html-components",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "dash-html-components"
}
        
Elapsed time: 0.36604s