superset/superset-frontend/packages/generator-superset/README.md

52 lines
1.7 KiB
Markdown
Raw Normal View History

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# generator-superset
[![Version](https://img.shields.io/npm/v/@superset-ui/generator-superset.svg?style=flat)](https://www.npmjs.com/package/@superset-ui/generator-superset)
[![David (path)](https://img.shields.io/david/apache-superset/superset-ui.svg?path=packages%2Fgenerator-superset&style=flat-square)](https://david-dm.org/apache-superset/superset-ui?path=packages/generator-superset)
> Scaffolder for Superset
## Installation
feat: updated viz plugin generator (#636) * feat: hello world plugin * Fix yeoman generator * Adding Emotion to template and template result * adding `reactify` technique to example code * fixing errant comma * annoying lint issue * React needed for JSX * questionable typing fix * labelling options * freshly generated hello world * linting and freshly generated plugin * add comments to buildQuery * Add docs * nixing word cloud console logs * lint annoyance * a note on multiple plugin exports * second option for building a plugin is now enabled * Officially supporting viz plugins ;) * fresh plugin build * Adding note about controls, and TODOs for example controls * linting * new lock file * adding file structure to readme * more transform props notes * better notes, better linting * Adding a third option for rendering plugin * fresh package rendering * manually updated plugin. Now let's see if the generator matches it! * template changes, fresh plugin render. * moving file tree to the right place * touchups to template (killing third option) * thumbnail update * Spit out form data, for good measure. * more clarity * dummy controls * bold control works, fresh docs, fresh build! * typing for fancy props * bump superset-ui deps to 0.14 * Implement header text and font size * Add tests + mcense headers + inor cleanup * Replace YourPluginName with packageLabel in README * remove trailing spaces * fix hard coded reference to HelloWorld * removing legacy generators * plugin comment tweaks * typescript comments, minor formatting * adding option for badges in readme * generator offers choice of function or class plugin * Add timeseries option * killing the plugin... we'll make that a separate PR. * add new tests * remove unnecessary imports * fix timeseries type * comment on value/label in select options Co-authored-by: Jesse Yang <jesse.yang@airbnb.com> * moving renderTrigger note up to first instance * control-utils -> chart-controls * Wrapper -> Styles nomenclature * Stronger typing (H/T @ktmud) * ControlPanelConfig type on control config * nixing requiresTime * moving Styles component to be external, passing it props * lint nits * typing tweak Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com> Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
2020-07-02 11:52:24 -04:00
First, install [Yeoman](http://yeoman.io) and `generator-superset` using
[npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).
```bash
npm install -g yo
npm install -g @superset-ui/generator-superset
```
## Usage
Generate a new package or visualization plugin:
```bash
mkdir /tmp/superset-plugin-chart-hello-world
cd /tmp/superset-plugin-chart-hello-world
yo @superset-ui/superset
```
## License
Apache-2.0
[learn more about Yeoman](http://yeoman.io/).