How do I remove typescript?
Zaya6 opened this issue · 2 comments
Zaya6 commented
Is it possible to get a version of this without typescript or at least get some documentation on how to remove it? I'm not very versed in either typescript or webpack and all of my attempts to fix it have broken the project.
a7ul commented
Hi @Zaya6
By default, nodegui-starter project is a typescript project. In order to convert our starter to a JS project you can make the following minor changes.
- Delete the
index.ts
file that comes with the starter. - Create a new file
index.js
under thesrc
directory with the following contents:
src/index.js
const { QMainWindow, QLabel } = require("@nodegui/nodegui");
const win = new QMainWindow();
win.setWindowTitle("Hello world");
const label = new QLabel();
label.setText("Hello World");
win.setCentralWidget(label);
win.show();
global.win = win;
Now run the app again:
npm start
a7ul commented
Please close the issue if this works for you.