-
-
Notifications
You must be signed in to change notification settings - Fork 54
[Proposal] Packing should produce dist
folder and not pollute src
folder with .js files
#154
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
Comments
dist
folder and not pollute src
folder with .js filesdist
folder and not pollute src
folder with .js files
You can do this already today. Just need to add a few npm scripts to your package.json. "tsc": "tsc -skipLibCheck --outDir dist",
"tsc.dist": "npm run dist.clean && tsc -skipLibCheck --outDir dist && npm run dist.copy",
"dist.copy": "cp -R platforms dist && cp ../README.md dist && cp carousel.d.ts dist && cp package.json dist",
"dist.clean": "rimraf dist",
"plugin.tscwatch": "npm run tsc -- -w", The only thing I've noticed is that watch & HMR only apply the first change, not the later ones. Even tho it detects them and reports that they have been synced. |
This one major drawback of the seed. And this is why I use grunt to build my plugins TS to JS, having gazzilions copy scripts in the |
I think I made this work w/o those copy scripts:
This way when you make a change the watch will replace the files in the |
Please, provide the following version numbers that your issue occurs with:
tns --version
to fetch it) 6.0.0node_modules/tns-core-modules/package.json
file in your project)Please, tell us how to recreate the issue in as much detail as possible.
Currently the seed structure has npm scripts that will trigger 'tsc' inside the
src
folder which will produce JavaScript files in it. With NativeScript 6.0.0 any symlinked plugin should not contain both TypeScript and JavaScript files because this can make webpack work unexpectedly.The text was updated successfully, but these errors were encountered: