Skip to content

Commit c965f99

Browse files
committed
feat(mui): cast index.js to ts file
This is an experimental commit to check build process and its ouput.
1 parent 646bea7 commit c965f99

22 files changed

+127
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@semantic-release/npm": "^5.1.4",
5050
"@types/react": "^16.9.35",
5151
"@types/react-dom": "^16.9.8",
52+
"@typescript-eslint/eslint-plugin": "^3.0.0",
5253
"atob-lite": "^2.0.0",
5354
"babel-plugin-transform-imports": "^2.0.0",
5455
"eslint": "^6.8.0",

packages/mui-component-mapper/rollup.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ import replace from 'rollup-plugin-replace';
55
import nodeGlobals from 'rollup-plugin-node-globals';
66
import { terser } from 'rollup-plugin-terser';
77
import { createFilter } from 'rollup-pluginutils';
8+
import typescript from '@rollup/plugin-typescript';
89
import sass from 'rollup-plugin-sass';
910
import async from 'rollup-plugin-async';
1011
import sourcemaps from 'rollup-plugin-sourcemaps';
1112

1213
import glob from 'glob';
1314
import path from 'path';
1415

15-
const outputPaths = glob.sync(path.resolve(__dirname, './src/files/*.js'));
16+
const outputPaths = [...glob.sync(path.resolve(__dirname, './src/files/*.tsx')), ...glob.sync(path.resolve(__dirname, './src/files/*.js'))];
1617

1718
const muiExternals = createFilter(
1819
[
@@ -83,11 +84,12 @@ const plugins = [
8384
sass({
8485
insert: true
8586
}),
87+
typescript(),
8688
sourcemaps()
8789
];
8890

8991
export default {
90-
input: process.env.FORMAT === 'umd' ? './src/index.js' : ['./src/index.js', ...outputPaths],
92+
input: process.env.FORMAT === 'umd' ? './src/index.ts' : ['./src/index.ts', ...outputPaths],
9193
output: {
9294
...(process.env.FORMAT === 'umd'
9395
? {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function Checkbox(props: object): void;
2+
export default Checkbox;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare const componentMapper: object;
2+
export const components: object;
3+
export default componentMapper;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function DatePicker(props: object): void;
2+
export default DatePicker;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function DualListSelect(props: object): void;
2+
export default DualListSelect;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function FieldArray(props: object): void;
2+
export default FieldArray;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function FormTemplate(props: object): void;
2+
export default FormTemplate;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function PlainText(props: object): void;
2+
export default PlainText;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function Radio(props: object): void;
2+
export default Radio;

0 commit comments

Comments
 (0)