Skip to content

Commit c17c38e

Browse files
committed
Feat: support javascipt api call (not supported by lerna mode)
2 parents 6ca0d2e + 55db0ed commit c17c38e

File tree

111 files changed

+133
-816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+133
-816
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
__test__/**/actualed
33
.cache
4-
coverage
4+
coverage
5+
lib

README.md

Lines changed: 7 additions & 6 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

fixtures/build/ts-esm/.nerdrc.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default {
2+
moduleType: 'esm',
3+
target: 'browser',
4+
beforeReadWriteStream({ through }) {
5+
return through.obj()
6+
}
7+
}
File renamed without changes.
File renamed without changes.

fixtures/ts-esm/.nerdrc.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

fixtures/watch/ts-cjs/.nerdrc.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
moduleType: 'cjs',
3+
target: 'node',
4+
disableTypes: true
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"use strict";
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
exports.default = foo;
7+
8+
function foo(opts) {
9+
return opts.foo ? 'foo' : 'bar';
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"use strict";
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
exports.default = foo;
7+
8+
function foo(opts) {
9+
return opts.foo ? 'foo' : 'bar';
10+
}

fixtures/watch/ts-cjs/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
interface IOpts {
2+
foo: boolean
3+
}
4+
5+
export default function foo(opts: IOpts): string {
6+
return opts.foo ? 'foo' : 'bar'
7+
}

fixtures/watch/ts-cjs/tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"moduleResolution": "node",
5+
"esModuleInterop": true,
6+
"declaration": true
7+
}
8+
}

fixtures/watch/ts-esm/.nerdrc.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export default {
2+
moduleType: 'esm',
3+
target: 'browser',
4+
afterReadWriteStream({ through }) {
5+
return through.obj()
6+
},
7+
beforeReadWriteStream({ through }) {
8+
return through.obj()
9+
}
10+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
interface IOpts {
2+
foo: boolean;
3+
}
4+
export default function foo(opts: IOpts): string;
5+
export {};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function foo(opts) {
2+
return opts.foo ? 'foo' : 'bar';
3+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
interface IOpts {
2+
foo: boolean;
3+
}
4+
export default function foo(opts: IOpts): string;
5+
export {};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function foo(opts) {
2+
return opts.foo ? 'foo' : 'bar';
3+
}

fixtures/watch/ts-esm/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
interface IOpts {
2+
foo: boolean
3+
}
4+
5+
export default function foo(opts: IOpts): string {
6+
return opts.foo ? 'foo' : 'bar'
7+
}

lib/Build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ class Build {
337337
}));
338338
this.logInfo({
339339
pkg,
340-
msg: `${_chalk().default.green(`➜ ${esBuild ? 'esBuild' : 'babel'}`)} ${_chalk().default.yellow(moduleType)} for ${_chalk().default.blue(`${output}${chunk.path.replace(basePath, '')}`)}`
340+
msg: `${_chalk().default.green(`➜ [${esBuild ? 'esBuild' : 'babel'}]:`)} ${_chalk().default.yellow(moduleType)} for ${_chalk().default.blue(`${output}${chunk.path.replace(basePath, '')}`)}`
341341
});
342342
chunk.path = chunk.path.replace(_path().default.extname(chunk.path), '.js');
343343
callback(null, chunk);

lib/cli.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/cli.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

lib/config.d.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/config.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

lib/ecma.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/ecma.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

lib/getBabelConifg.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

lib/getBabelConifg.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

lib/getEsBuildConfig.d.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

lib/getEsBuildConfig.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

lib/getTsConifg.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)