Skip to content
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

add clean-dir.js and remove rimraf #273

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

ticaki
Copy link

@ticaki ticaki commented Dec 26, 2024

Als Ersatz für rimraf

Edit: in der package.json wurde rimraf aus den deps entfernt und in script ein Aufruf angepasst

@AlCalzone
Copy link
Collaborator

Please mention the new functionality in the Readme

@mcm1957
Copy link

mcm1957 commented Dec 27, 2024

Isn't this functionality provided by iobroker/build-tools anyway?
https://github.com/ioBroker/build-tools#deletefoldersrecursive

build-tools is used for react - at least for new projects. Maybe it should be used for Typescript too.

I suggest to discuss with @GermanBluefox

@Apollon77
Copy link
Collaborator

Yes but these tools are JS methods ... here we have CLI ... thats fine.
@ticaki culd you please rebase? Thank you

@mcm1957
Copy link

mcm1957 commented Jan 2, 2025

@Apollon77
OK - please let me know when this change is available as an update.

As rimraf needs to be removed from adapter package.json it would make sense to add a suggestion to iobroker adapter checker after a new version of adapter-dev is available to (eventually) replace rimraf.

@ticaki
Please provide a PR for create-adapter too and remove rimraf and adapter build scripts wehre appropiate as otherwise new repos will still be created using rimraf

Copy link
Collaborator

@AlCalzone AlCalzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new CLI "tool" should be documented like the existing ones, for example:
https://github.com/ioBroker/adapter-dev?tab=readme-ov-file#compile-adapter-files

bin/clean-dir.js Outdated
@@ -0,0 +1,23 @@
/**
* example package.json entry:
* "prebuild": "node ./node_modules/@iobroker/adapter-dev/bin/clean-dir.js ./build",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean-dir.js should be added to adapter-devs package.json bin, like the existing tools. That way the call on the developer side would look like this:

Suggested change
* "prebuild": "node ./node_modules/@iobroker/adapter-dev/bin/clean-dir.js ./build",
* "prebuild": "clean-dir ./build",

@ticaki
Copy link
Author

ticaki commented Jan 3, 2025

@mcm1957
I'll take a look at this

@AlCalzone
Thanks for pointing this out, I have now understood how it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants