Skip to content

Commit 32783f7

Browse files
committed
escape CR on text bundle - windows
1 parent 814d0b3 commit 32783f7

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-bundle",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": " A zero configuration bundling tool for TypeScript.",
55
"scripts": {
66
"clean": "node tasks clean",

src/bundler/resources/templates/text.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function get(filePath: string): string {
3434
const content = readFileSync(filePath, 'utf8')
3535
const lines = content.split('\n').map(line => {
3636
const text = line
37+
.replace(/\r/g, '')
3738
.replace(/\\/g, '\\\\"')
3839
.replace(/"/g, '\\"')
3940
return ` "${text}"`

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { writeFileSync } from 'fs'
3636
/** Writes usage information */
3737
async function info() {
3838

39-
console.log(`Version 1.0.5
39+
console.log(`Version 1.0.6
4040
4141
Examples: tsc-bundle index.ts
4242
tsc-bundle tsconfig.json

0 commit comments

Comments
 (0)