Closed linonetwo closed 11 months ago
Im agree it, I'm notice there is outDir='./dist'
in tsconfig
however the build file (.js
) remain side by side with .ts
.
The source code need tidy at many places like separate build into dist, and remove too much console log, in fact documentation need more proper organize too. I think the founder aware all this and he just need more time.
Already fixed in new release for bpmn-server tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [ "es6" ],
"sourceMap": true,
"declaration": true,
"rootDir": "./src",
"outDir": "./dist"
},
I am not sure we can this with the webApp folder since its an express app, but still investigating...
Can you please in more details what do you mean by:
Also, Can you publish the docs to a github page? If the doc is generated from source, maybe this should be done in github action, and not commit to the master branch.
I am not convinced that is an improvement in the case of a Web App bpmn-web
using express.
Any thoughts?
I think this is 2 topics
Keep src in source and build into dist I believe is ok cause most of the project I involve using framework like nestjs and nuxtjs doing that. I feel convenient
Store web app sample project in bpmn-server library: I feel this is the one create the problem. When I first try this project I'm confused will the folder structure and sample source code import './'
You above comment seems also come from issue put web app into repo (correct me if I'm wrong)
My suggestion is:
The usage of pug files , and start it by running index.ts , are legacy usage. In modern web dev, we are using tsx file, and start-up is taken care of by nestjs/nuxtjs/modern.dev/create-react-app.
But we don't have so much time to refactor them, so have to keep this usage. But trust me (or GPT4), not mixing dist and src is a right choice to improve DX, otherwise potential contributors will be scared.
Another advantage is it will make this 100% ts, so people know this is a modern project.
Here is what I am thinking:
But when develop use we use /src for output as well:
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"lib": [ "es6" ],
"sourceMap": true,
"declaration": false,
"incremental": true,
"allowJs": false,
"rootDir": "./src",
// "outDir": "./dist"
},
"include": [
"./src"
],
"exclude": [
"node_modules" , "./dist" , "./webApp"
]
}
So, no copying of files and allow user to change pug files without recompile
To test this I have created a branch no-dist
under bpmn-web.
Thanks
Oh, I understand you feel slow when have to copy file during dev. Can we just use ts-node for dev, so no need to compile and copy?
Also, do you mean this repo or bpmn-web repo? If is bpmn-web, we can discuss there.
Yes, was talking about bpmn-web. for bpmn-server, already done closing this one.
I'm confused by the style of this repo, can you remove those generated file? They belong to /dist , and should be git ignored, so I don't have to commit and clone them.
Also, Can you publish the docs to a github page? If the doc is generated from source, maybe this should be done in github action, and not commit to the master branch.