Skip to content

Default settings cause files to be output to root directory #1540

Description

@wauterboi

Hello,

Discussion of this issue took place in this Discord thread. @Zamiell summarized it nicely:

yeah i guess something in tstl broke

mkdir test
cd test
npm init --yes
npm install --save typescript typescript-to-lua
mkdir src
echo 'const x = 1;' > src/main.ts
vim tsconfig.json
(paste in config from getting started page)
npx tstl

that results in a main.lua file in root dir instead of in subdir
which im pretty sure is different from historical behavior

It doesn't matter where the file is in the folder hierarchy - it ends up compiling and storing the file in the root directory.

The configuration from the getting started page, at the time of writing, is:

{
  // Optional: Schema file for hints and validation
  "$schema": "https://raw.githubusercontent.com/TypeScriptToLua/TypeScriptToLua/master/tsconfig-schema.json",

  // ... tsconfig options

  "tstl": {
    // Custom options
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions