Skip to content

Commit e8f0c8b

Browse files
committed
refactor(): avoid unnecessary export
1 parent 5a017c9 commit e8f0c8b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ var node = function node(h) {
3333

3434
var TAG_NAMES = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'meta', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'p', 'param', 'pre', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'u', 'ul', 'video'];
3535

36-
exports.TAG_NAMES = TAG_NAMES;
37-
3836
exports['default'] = function (h) {
3937
var createTag = node(h);
4038
var exported = { TAG_NAMES: TAG_NAMES, isSelector: isSelector, createTag: createTag };
@@ -43,3 +41,5 @@ exports['default'] = function (h) {
4341
});
4442
return exported;
4543
};
44+
45+
module.exports = exports['default'];

generate-ts-def.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import fs from 'fs';
2-
import { TAG_NAMES } from './src/index';
2+
import hh from './src/index';
3+
4+
const { TAG_NAMES } = hh();
35

46
const start =
57
`declare interface HyperScriptHelperFn {

src/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ const TAG_NAMES = [
3535
'th', 'thead', 'title', 'tr', 'u', 'ul', 'video'
3636
];
3737

38-
export { TAG_NAMES };
39-
4038
export default
4139
h => {
4240
const createTag = node(h);

0 commit comments

Comments
 (0)