-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt babel7 and add video and source tag
- Loading branch information
Showing
50 changed files
with
1,878 additions
and
1,170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
return { | ||
env: { | ||
build: { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: ['last 2 versions', 'ie >= 8'], | ||
}, | ||
], | ||
'@babel/preset-react', | ||
], | ||
plugins: [ | ||
'add-module-exports', | ||
'dynamic-import-node', | ||
'transform-react-pure-class-to-function', | ||
['transform-react-remove-prop-types', {mode: 'wrap'}], | ||
[ | ||
'reshow-transform-runtime', | ||
{ | ||
regenerator: false, | ||
}, | ||
], | ||
'@babel/plugin-proposal-export-default-from', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-transform-react-constant-elements', | ||
'@babel/plugin-transform-object-assign', | ||
'@babel/plugin-proposal-object-rest-spread', | ||
'@babel/plugin-proposal-class-properties', | ||
], | ||
}, | ||
es: { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
modules: false, | ||
targets: ['last 2 versions', 'ie >= 8'], | ||
}, | ||
], | ||
'@babel/preset-react', | ||
], | ||
plugins: [ | ||
'transform-react-pure-class-to-function', | ||
['transform-react-remove-prop-types', {mode: 'wrap'}], | ||
[ | ||
'reshow-transform-runtime', | ||
{ | ||
regenerator: false, | ||
useESModules: true, | ||
}, | ||
], | ||
'@babel/plugin-proposal-export-default-from', | ||
'@babel/plugin-syntax-dynamic-import', | ||
'@babel/plugin-transform-object-assign', | ||
'@babel/plugin-transform-react-constant-elements', | ||
'@babel/plugin-proposal-object-rest-spread', | ||
'@babel/plugin-proposal-class-properties', | ||
], | ||
}, | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
'use strict'; | ||
|
||
import React from 'react'; | ||
|
||
const Base = (name) => { | ||
const Atom = ({refCb, ...others}) => { | ||
if (refCb) { | ||
others.ref = refCb; | ||
} | ||
return React.createElement(name, others); | ||
const Base = name => { | ||
const Atom = ({refCb, ...others}) => { | ||
if (refCb) { | ||
others.ref = refCb; | ||
} | ||
return Atom; | ||
} | ||
return React.createElement(name, others); | ||
}; | ||
return Atom; | ||
}; | ||
|
||
export default Base; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base') | ||
module.exports = base('a') | ||
import base from '../../src/base'; | ||
export default base('a'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base') | ||
module.exports = base('article') | ||
import base from '../../src/base'; | ||
export default base('article'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base') | ||
module.exports = base('button') | ||
import base from '../../src/base'; | ||
export default base('button'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base') | ||
module.exports = base('circle') | ||
import base from '../../src/base'; | ||
export default base('circle'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('div'); | ||
import base from '../../src/base'; | ||
export default base('div'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('dl'); | ||
import base from '../../src/base'; | ||
export default base('dl'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base') | ||
module.exports = base('footer') | ||
import base from '../../src/base'; | ||
export default base('footer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('form'); | ||
import base from '../../src/base'; | ||
export default base('form'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('g'); | ||
import base from '../../src/base'; | ||
export default base('g'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('h1'); | ||
import base from '../../src/base'; | ||
export default base('h1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('h2'); | ||
import base from '../../src/base'; | ||
export default base('h2'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('h3'); | ||
import base from '../../src/base'; | ||
export default base('h3'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('h4'); | ||
import base from '../../src/base'; | ||
export default base('h4'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('h5'); | ||
import base from '../../src/base'; | ||
export default base('h5'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('h6'); | ||
import base from '../../src/base'; | ||
export default base('h6'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('header'); | ||
import base from '../../src/base'; | ||
export default base('header'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('i'); | ||
import base from '../../src/base'; | ||
export default base('i'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('iframe'); | ||
import base from '../../src/base'; | ||
export default base('iframe'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('img'); | ||
import base from '../../src/base'; | ||
export default base('img'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('input'); | ||
import base from '../../src/base'; | ||
export default base('input'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('label'); | ||
import base from '../../src/base'; | ||
export default base('label'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('li'); | ||
import base from '../../src/base'; | ||
export default base('li'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('line'); | ||
import base from '../../src/base'; | ||
export default base('line'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base') | ||
module.exports = base('main') | ||
import base from '../../src/base'; | ||
export default base('main'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('nav'); | ||
import base from '../../src/base'; | ||
export default base('nav'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('ol'); | ||
import base from '../../src/base'; | ||
export default base('ol'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('p'); | ||
import base from '../../src/base'; | ||
export default base('p'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('path'); | ||
import base from '../../src/base'; | ||
export default base('path'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('polygon'); | ||
import base from '../../src/base'; | ||
export default base('polygon'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('rect'); | ||
import base from '../../src/base'; | ||
export default base('rect'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('section'); | ||
import base from '../../src/base'; | ||
export default base('section'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('select'); | ||
import base from '../../src/base'; | ||
export default base('select'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import base from '../../src/base'; | ||
export default base('source'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('span'); | ||
import base from '../../src/base'; | ||
export default base('span'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('svg'); | ||
import base from '../../src/base'; | ||
export default base('svg'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('table'); | ||
import base from '../../src/base'; | ||
export default base('table'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('td'); | ||
import base from '../../src/base'; | ||
export default base('td'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('text'); | ||
import base from '../../src/base'; | ||
export default base('text'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('textarea'); | ||
import base from '../../src/base'; | ||
export default base('textarea'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('th'); | ||
import base from '../../src/base'; | ||
export default base('th'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('tr'); | ||
import base from '../../src/base'; | ||
export default base('tr'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('tspan'); | ||
import base from '../../src/base'; | ||
export default base('tspan'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const base = require('../../src/base'); | ||
module.exports = base('ul'); | ||
import base from '../../src/base'; | ||
export default base('ul'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import base from '../../src/base'; | ||
export default base('video'); |
Oops, something went wrong.