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

feat: watch mode #200

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

feat: watch mode #200

wants to merge 9 commits into from

Conversation

tpluscode
Copy link
Contributor

This adds watch mode.

  • Enabled by default in kopflos serve --mode development.
  • Can be switched off with kopflos serve --mode development --no-watch
  • Can be forced enabled in production mode kopflos serve --watch

Always watches for changes in the config file. Additional paths to watch are defined in the config

export default {
  watch: ['lib', 'handlers']
}

Not need to watch vite root directory since vite development server has its own hot module reload.

Resources deployed using plugin @kopflos-cms/plugin-deploy-resources are watched independently and do not trigger a full server restart. This behavior can be changed by adding them to the main watch list and disabling the plugin's watch

export default {
  watch: ['lib', 'handlers', 'resources'],
  plugins: {
    '@kopflos-cms/plugin-deploy-resources': {
      paths: ['resources'],
      watch: false
    }
  }
}

Copy link

changeset-bot bot commented Nov 20, 2024

🦋 Changeset detected

Latest commit: 9938db2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@kopflos-cms/core Patch
@kopflos-cms/express Patch
@kopflos-cms/plugin-deploy-resources Patch
kopflos Patch
example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 98.59155% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.12%. Comparing base (80a4ffa) to head (9938db2).

Files with missing lines Patch % Lines
packages/plugin-deploy-resources/index.ts 96.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   94.00%   94.12%   +0.12%     
==========================================
  Files          38       38              
  Lines        1585     1635      +50     
  Branches      199      210      +11     
==========================================
+ Hits         1490     1539      +49     
- Misses         94       95       +1     
  Partials        1        1              
Flag Coverage Δ
@kopflos-cms/core 95.88% <85.71%> (-0.54%) ⬇️
@kopflos-cms/express 87.00% <95.45%> (+0.50%) ⬆️
@kopflos-cms/plugin-deploy-resources 59.86% <65.15%> (+0.44%) ⬆️
@kopflos-cms/serve-file 100.00% <ø> (ø)
@kopflos-cms/vite 68.33% <ø> (ø)
@kopflos-labs/handlebars 77.49% <ø> (ø)
@kopflos-labs/html-template 83.83% <ø> (ø)
sparql-path-parser 95.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@tpluscode tpluscode marked this pull request as ready for review November 21, 2024 11:46
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.

3 participants