cactbot icon indicating copy to clipboard operation
cactbot copied to clipboard

Move source code into /src folder

Open MaikoTan opened this issue 4 years ago • 3 comments

Thanks to webpack, currently changing the files and folder structure should not affect user side, so what about change

.git
.github
.vscode
docs/
eslint/
plugin/
resources/
screenshots/
test/
types/
ui/
user/
util/
webpack/
.editorconfig
.eslintrc.cjs
.gitattributes
.gitignore
.markdownlint.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
package.json
package-lock.json
requirements.txt
tsconfig-for-webpack.json
tsconfig.base.json
tsconfig.json
tsconfig.triggers.json

to

.git
.github
.vscode
docs/
eslint/
screenshots/
src/
  |- plugin/
  |- resources/
  |- types/
  |- ui/
  |- user/
  |- tsconfig.base.json
  |- tsconfig.json
  |- tsconfig.triggers.json
test/
util/
webpack/
  |- tsconfig-for-webpack.json
.editorconfig
.eslintrc.cjs
.gitattributes
.gitignore
.markdownlint.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
package.json
package-lock.json
requirements.txt

MaikoTan avatar Jul 13 '21 04:07 MaikoTan

What's the goal with this?

(Why is test in src/ but util/ is not? Why are tsconfig files in src/? Should screenshots just get moved into docs/?)

quisquous avatar Jul 15 '21 05:07 quisquous

I think the goal is cleaner, and cleaner.ヾ(*’O’*)/

Oh yes, I think screenshots/ and test/ should be in root, I made a mistake, And I updated it.

I think util/ and test/ would be always run individually, so technically they are not source code? I would prefer to put them in the root.

As for tsconfig.json things, put it in root or src/ both would work. I think put it in src/ would be more cleaner. But as there are *.ts files in util/ and test/, too, I am still not quite confident that they would work perfectly (maybe add a TS_NODE_PROJECT environment variables?), may I ping @Trim21 for comments.

MaikoTan avatar Jul 15 '21 08:07 MaikoTan

“screenshots” should be in docs I think.

And ts config in root dir.

trim21 avatar Jul 15 '21 08:07 trim21

Now the files and folders in the root are much fewer than before, so making this change is not a big deal. So never mind.

MaikoTan avatar Jan 31 '23 06:01 MaikoTan