Skip to content

Conversation

@AlCalzone
Copy link
Contributor

This PR makes the build script handling a bit more flexible than it currently is. In detail:

  • Accept watch:react script as an alternative to watch:parcel (I want to get rid of parcel some time in the future)
  • Use RegExp to detect the first successful build

I've also edited tsconfig to force LF in the generated files.

Comment on lines -438 to +446
await this.spawnAndAwaitOutput('npm', ['run', 'watch:ts', '--', '--preserveWatchOutput'], this.rootDir, 'Watching for', { shell: true });
await this.spawnAndAwaitOutput('npm', ['run', 'watch:ts' /*, '--', '--preserveWatchOutput'*/], this.rootDir, /watching (files )?for/i, { shell: true });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why was the preserveWatchOutput flag necessary? Since I'm using esbuild (estrella), this causes errors, but I didn't see any downside to disabling it.

Maybe we should make the scripts, their flags and the test regexp/string configurable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The problem with watch:ts using tsc was that it would clear the screen with every build. Since we are "forwarding" stdout from watch:ts, this would clear the screen every time, thus we would not be able to see all other logs anymore.

Copy link
Collaborator

@UncleSamSwiss UncleSamSwiss left a comment

Choose a reason for hiding this comment

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

Thanks for your PR. Everything looks good.

I will remove the "clear screen" ANSI escape sequence and no longer use the --preserveWatchOutput command line argument for watch:ts

@UncleSamSwiss UncleSamSwiss merged commit 653d90c into ioBroker:main Apr 29, 2021
UncleSamSwiss added a commit that referenced this pull request May 5, 2021
**Breaking Change:** it is no longer possible to use `dev-server` without providing a command. Use `dev-server run` for the same behavior as before.
Made build script handling more flexible (#23)
Added support for different profiles (#39)
Added possibility to create a backup (#28)
Added possibility to restore a backup file during `dev-server setup` (#28)
Added automatic installation of adapter dependencies (#8)
Added version check when starting dev-server
Added option to specify the ioBroker.admin version to use
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.

2 participants