update generator and bump build config version

This commit is contained in:
Krist Wongsuphasawat 2019-02-08 17:24:36 -08:00 committed by Yongjie Zhao
parent 9863d8779f
commit 48c881f5c3
4 changed files with 8 additions and 6 deletions

View File

@ -38,7 +38,7 @@
], ],
"license": "Apache-2.0", "license": "Apache-2.0",
"devDependencies": { "devDependencies": {
"@data-ui/build-config": "^0.0.39", "@data-ui/build-config": "^0.0.40",
"fast-glob": "^2.2.6", "fast-glob": "^2.2.6",
"fs-extra": "^7.0.1", "fs-extra": "^7.0.1",
"husky": "^1.1.2", "husky": "^1.1.2",

View File

@ -30,6 +30,7 @@ module.exports = class extends Generator {
writing() { writing() {
this.fs.copyTpl(this.templatePath('index.js'), this.destinationPath('index.js'), this.answers); this.fs.copyTpl(this.templatePath('index.js'), this.destinationPath('index.js'), this.answers);
this.fs.copyTpl(this.templatePath('data.js'), this.destinationPath('data.js'), this.answers);
this.fs.copyTpl( this.fs.copyTpl(
this.templatePath('Stories.jsx'), this.templatePath('Stories.jsx'),
this.destinationPath('Stories.jsx'), this.destinationPath('Stories.jsx'),

View File

@ -1,6 +1,7 @@
/* eslint-disable no-magic-numbers */ /* eslint-disable no-magic-numbers */
import React from 'react'; import React from 'react';
import { SuperChart } from '@superset-ui/chart'; import { SuperChart } from '@superset-ui/chart';
import data from './data';
export default [ export default [
{ {
@ -10,14 +11,12 @@ export default [
chartProps={{ chartProps={{
formData: {}, formData: {},
height: 400, height: 400,
payload: { payload: { data },
data: [],
},
width: 400, width: 400,
}} }}
/> />
), ),
storyName: '<%= packageLabel %>ChartPlugin', storyName: 'Basic',
storyPath: 'plugin-chart-<%= packageName %>', storyPath: 'plugin-chart-<%= packageName %>|<%= packageLabel %>ChartPlugin',
}, },
]; ];

View File

@ -0,0 +1,2 @@
/* eslint-disable sort-keys, no-magic-numbers */
export default {};