You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you put a simple worked project with all the nessesary configure files,configure options, etc, so we can try and figureout the right way to use it?
#53
Open
code42099 opened this issue
Sep 5, 2019
· 2 comments
Hi, I'm very interested in tscc project, but failed to work it out.
I followed these steps on your manual to setup a simple project and tried to use tscc to compile.
my_project
├───tsconfig.json
├───rollup.config.js
└───src
├───Components
│ ...
└───app.ts
Install tscc cli:
yarn global add @tscc/tscc
Create a spec file tscc.spec.json next to tsconfig.json.
{
"modules": {
"out": "src/app.ts" // entry file path
}
}
Execute at the project root:
tscc
result screen
> $ tscc
> TSCC: tsickle uses a custom tslib optimized for closure compiler. importHelpers flag is set.
> - Closure Compiler
> (node:10168) ExperimentalWarning: The fs.promises API is experimental
>
> Administrator@MINGW64 ~/app/tsickle/tt
> $
only a empty out.js file is created in my_project folder.
Can you put a simple worked project with all the nessesary configure files,configure options, etc, so we can try and figureout the right way to use it?
Hi, first of all, your configuration looks good. It's just that app.ts file contains a single function that is called nowhere, so Closure Compiler is removing the function declaration and is producing an empty file. In order to use Closure Compiler (and hence tscc), your are expected to compile all of your source files together, so you can include another file that imports and calls getGreeting to the sources. Another way to keep the function in the compiled output is to assign the function to a global variable, e.g. by adding window.getGreeting = getGreeting.
Regarding a simple starter project, I think I can make something similar to rollup/rollup-starter-code-splitting. Also there are some sample configurations in the todomvc repo, hope this helps!
Hi, I'm very interested in tscc project, but failed to work it out.
I followed these steps on your manual to setup a simple project and tried to use tscc to compile.
result screen
only a empty out.js file is created in my_project folder.
Can you put a simple worked project with all the nessesary configure files,configure options, etc, so we can try and figureout the right way to use it?
Many thanks!
9/5/2019
The project has followings files
src/app.ts:
tsconfig.json:
tscc.spec.json:
Created Result files:
out.js:
only two empty lines, without any charactor,symbols.
.tscc_temp\700d5d6d38f3a92d76761fcecf223eed01bc67e2a2f63b5bbd22bbf9f4bd0633\externs_generated.js:
The text was updated successfully, but these errors were encountered: