Skip to content

Commit 9908c98

Browse files
author
Martynas Žilinskas
authored
Bugfix/v0.1.1 (#2)
* Fixed generator seperator. * 0.1.1
1 parent 478efcf commit 9908c98

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

example/dist/hello.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/* Generated by main-file-generator */
2-
module.exports.default = require('..\build.js').Default;
2+
module.exports.default = require('../build.js').Default;

example/dist/world.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/* Generated by main-file-generator */
2-
module.exports.default = require('..\build.js').World;
2+
module.exports.default = require('../build.js').World;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dts-bundle-proxyjs",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Generates JS proxies from bundled dts.",
55
"main": "index.js",
66
"scripts": {

src/generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export default class Generator {
4343

4444
// Get `require` relative path.
4545
let requireFileFullPath = path.join(process.cwd(), this.config.proxyjs.requireFile);
46-
let requireFileRelativePath = path.relative(fullFilePath, requireFileFullPath);
47-
46+
let requireFileRelativePath = path.relative(fullFilePath, requireFileFullPath).split(path.sep).join('/');
47+
4848
console.log(fullFilePath);
4949
//Write to file
5050
let stream = fs.createWriteStream(fullFilePath, { 'flags': 'w' });

0 commit comments

Comments
 (0)