File tree Expand file tree Collapse file tree 5 files changed +338
-3
lines changed Expand file tree Collapse file tree 5 files changed +338
-3
lines changed Original file line number Diff line number Diff line change 1
1
/.cache
2
2
/.idea
3
- /build
3
+ /components
4
4
/node_modules
Original file line number Diff line number Diff line change 2
2
"name" : " react-microbe-ui" ,
3
3
"version" : " 0.0.1" ,
4
4
"description" : " microbe-ui for React" ,
5
- "main" : " index.js" ,
5
+ "main" : " components/index.js" ,
6
+ "module" : " components/index.es.js" ,
7
+ "jsnext:main" : " components/index.es.js" ,
6
8
"scripts" : {
7
- "build" : " tsc" ,
9
+ "build" : " rollup -c" ,
10
+ "prepare" : " npm run build" ,
8
11
"test" : " echo \" Error: no test specified\" && exit 1"
9
12
},
13
+ "files" : [
14
+ " components"
15
+ ],
10
16
"prettier" : {
11
17
"arrowParens" : " always" ,
12
18
"bracketSpacing" : true ,
31
37
"homepage" : " https://github.com/microbe-ui/react-microbe-ui#readme" ,
32
38
"devDependencies" : {
33
39
"prettier" : " ^1.19.1" ,
40
+ "rollup" : " ^2.0.2" ,
41
+ "rollup-plugin-commonjs" : " ^10.1.0" ,
42
+ "rollup-plugin-node-resolve" : " ^5.2.0" ,
43
+ "rollup-plugin-peer-deps-external" : " ^2.2.2" ,
44
+ "rollup-plugin-typescript2" : " ^0.26.0" ,
34
45
"typescript" : " ^3.8.3"
35
46
}
36
47
}
Original file line number Diff line number Diff line change
1
+ import typescript from 'rollup-plugin-typescript2' ;
2
+ import commonjs from 'rollup-plugin-commonjs' ;
3
+ import external from 'rollup-plugin-peer-deps-external' ;
4
+ import resolve from 'rollup-plugin-node-resolve' ;
5
+
6
+ import pkg from './package.json' ;
7
+
8
+ export default {
9
+ input : 'src/index.ts' ,
10
+ output : [
11
+ {
12
+ file : pkg . main ,
13
+ format : 'cjs' ,
14
+ exports : 'named' ,
15
+ sourcemap : true
16
+ } ,
17
+ {
18
+ file : pkg . module ,
19
+ format : 'es' ,
20
+ exports : 'named' ,
21
+ sourcemap : true
22
+ }
23
+ ] ,
24
+ plugins : [
25
+ external ( ) ,
26
+ resolve ( ) ,
27
+ typescript ( {
28
+ rollupCommonJSResolveHack : true ,
29
+ exclude : '**/__tests__/**' ,
30
+ clean : true
31
+ } ) ,
32
+ commonjs ( {
33
+ include : [ 'node_modules/**' ] ,
34
+ namedExports : {
35
+ 'node_modules/react/react.js' : [
36
+ 'Children' ,
37
+ 'Component' ,
38
+ 'PropTypes' ,
39
+ 'createElement'
40
+ ] ,
41
+ 'node_modules/react-dom/index.js' : [ 'render' ]
42
+ }
43
+ } )
44
+ ]
45
+ } ;
Original file line number Diff line number Diff line change
1
+ export function testMethod ( param : string ) : string {
2
+ return "Hello " + param ;
3
+ }
You can’t perform that action at this time.
0 commit comments