Skip to content

Compling in other path (dist), no in same path (src/app) #2368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jamlfy opened this issue Dec 20, 2016 · 7 comments
Closed

Compling in other path (dist), no in same path (src/app) #2368

jamlfy opened this issue Dec 20, 2016 · 7 comments

Comments

@jamlfy
Copy link

jamlfy commented Dec 20, 2016

Well, the compiling files for .ts is in the same path. The problem is don't clear the project, when you search a line into all the fails compiling is very very hard, with that.

app.component.html
app.component.js // Compling
app.component.js.map // Compling
app.component.ts
app.css
app.module.js // Compling
app.module.js.map // Compling
app.module.ts
main.aot.ts
main.js // ??
main.js.map //??
main.ts

Is very clear when use the path dist

@Plamen5kov
Copy link
Contributor

@alejonext can you provide steps to reproduce?

@Dashue
Copy link

Dashue commented Sep 12, 2017

I think this is an issue as well, having the .ts and .scss compile alongside within the app folder is messy.

How much of an effort would it be to support compiling to a different folder? For example using outDir of typescript?

@Plamen5kov
Copy link
Contributor

No reason searching for a solution, until we know the problem.

@Dashue
Copy link

Dashue commented Sep 12, 2017

Right.. apologies for assuming this was understood already.
So the concern is that files are getting compiled alongside the .ts and .scss files inside the app folder. Does that make it clearer?

@dolanmiu
Copy link

I am finding this annoying too

it's good practice to put compiled files in a /build or /dist folder

How does one do it?

@Fatme
Copy link
Contributor

Fatme commented Apr 11, 2018

Hi @dolanmiu, @Dashue,

For typescirpt projects you can specify outDir property in tsconfig.json file. For example:

{
    "compilerOptions": {
          "outDir": "./app/dist"
    }
}

@rosen-vladimirov rosen-vladimirov added this to the 6.0.0 milestone May 22, 2019
@rosen-vladimirov
Copy link
Contributor

Hey, when using the bundle workflow, the generated files (bundle.js, vendor.js, etc.) are produced in <project dir>/platforms/<platform>/.../app directory and they are never produced next to your source files. As in NativeScript 6.0 the bundle workflow will be the only one supported, I'm closing this thread.

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

No branches or pull requests

9 participants