Skip to content

No compilation of typescript files after Cleaning / Rebuilding #238

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

Open
ggruber4711 opened this issue May 5, 2018 · 4 comments
Open

No compilation of typescript files after Cleaning / Rebuilding #238

ggruber4711 opened this issue May 5, 2018 · 4 comments

Comments

@ggruber4711
Copy link

ggruber4711 commented May 5, 2018

I noticed that compilation of *.ts files is basically done on save of a file and when you call "Run As => Compile Typescript" on the tsconfig.json file.
However I would like to have also an automatic build, after Eclipse is either

  • refreshing the project
  • re-building the project after a clean
    This are 2 typical situations faced by Java/Web developers when working in a mixed Java/Web/Javascript project containing both java and javascript files.

Is there somehow a solution for this requirement?
Thanks in advance!

@angelozerr
Copy link
Owner

Indeed, it should be implemented, I have started to do something but it's an hard task.

@ggruber4711
Copy link
Author

There is a kind of workaround to get it implemented by adding an external Builder to your Eclipse project Configuration, which looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"> <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc}/.metadata/.plugins/ts.eclipse.ide.server.nodejs.embed.win32.win32.x86_64/node-v6.9.4-win-x64/node.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,clean"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="${workspace_loc}/.metadata/.plugins/ts.repository/repositories/2.4.1/node_modules/typescript/bin/tsc"/> <booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}"/> </launchConfiguration>

The nasty thing about it, is that you have to hardcode the path to

  • nodejs
  • typescript compiler.
    But it works for me :-)

eclipse_typescriptcompilebuilder

@ggruber4711
Copy link
Author

Is there an eclipse variable reflecting the path to tsc and node?

@angelozerr
Copy link
Owner

@ggruber4711 it already exist a typescript builder but it doesn't support clean and build all. I have started to implement itl but I had a lot of problem with performance and I had some limitation with tsserver which doesn't support the compile when file is not opened. I must just find time to retyry it.

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

No branches or pull requests

2 participants