File tree 6 files changed +81
-1381
lines changed
6 files changed +81
-1381
lines changed Original file line number Diff line number Diff line change
1
+ export * from './lib' ;
Original file line number Diff line number Diff line change
1
+ module . exports = require ( './lib' ) ;
Original file line number Diff line number Diff line change 7
7
" lib/"
8
8
],
9
9
"scripts" : {
10
- "build" : " cross-env NODE_ENV=production babel src --out-dir lib --source-maps " ,
10
+ "build" : " tsc " ,
11
11
"deps" : " dep-check" ,
12
12
"pkg" : " pkg-check" ,
13
13
"start" : " yarn watch" ,
14
- "watch" : " babel src --out-dir lib --watch --source-maps "
14
+ "watch" : " tsc -w "
15
15
},
16
16
"babel" : {
17
17
"presets" : [
42
42
"license" : " MIT" ,
43
43
"devDependencies" : {
44
44
"@commitlint/utils" : " ^8.0.0" ,
45
+ "@types/node" : " ^12.0.4" ,
45
46
"babel-cli" : " 6.26.0" ,
46
47
"babel-preset-commitlint" : " ^8.0.0" ,
47
48
"babel-register" : " 6.26.0" ,
48
- "cross-env" : " 5.1.1"
49
+ "cross-env" : " 5.1.1" ,
50
+ "typescript" : " ^3.5.1"
49
51
},
50
52
"dependencies" : {
51
- "find-up" : " ^2.1 .0"
53
+ "find-up" : " ^4.0 .0"
52
54
}
53
55
}
Original file line number Diff line number Diff line change
1
+ import path from 'path' ;
2
+ import up from 'find-up' ;
3
+
4
+ export default toplevel ;
5
+
6
+ /**
7
+ * Find the next git root
8
+ */
9
+ async function toplevel ( cwd : string ) {
10
+ const found = await up ( '.git' , { cwd, type : 'directory' } ) ;
11
+
12
+ if ( typeof found !== 'string' ) {
13
+ return found ;
14
+ }
15
+
16
+ return path . join ( found , '..' ) ;
17
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "lib" : [
4
+ " dom" ,
5
+ " es2015"
6
+ ],
7
+ "rootDir" : " src" ,
8
+ "outDir" : " lib" ,
9
+ "declaration" : true ,
10
+ "declarationMap" : true ,
11
+ "sourceMap" : true ,
12
+ "esModuleInterop" : true ,
13
+ "allowSyntheticDefaultImports" : true ,
14
+ "strict" : true
15
+ },
16
+ "include" : [
17
+ " ./src"
18
+ ],
19
+ "exclude" : [
20
+ " ./src/**/*.test.ts"
21
+ ]
22
+ }
You can’t perform that action at this time.
0 commit comments