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

have cli watch template file for changes #91

Merged
merged 7 commits into from
Dec 22, 2022

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Dec 22, 2022

There was a bug previously where if this was run from a subdirectory, it would always use the default remote template, since it wouldn't find the local one where it expected. That's fixed in this PR.

Also, while it would detect a change in specified template file in the Stoat config file, it wouldn't update automatically on changes within the template itself, which would require restarting stoat local. This wouldn't be that big of a deal except the one of the biggest reasons to use local mode is to fine tune the template.

I created #90 to track an issue that would make it trivial to locally iterate on templates including non-static_hosting plugins. Maybe we could even have a copy button on debug pages next to the merged configs that just gives you the command to run locally to preview that exact config.

@jrhizor jrhizor requested a review from tuliren December 22, 2022 20:02
@stoat-app
Copy link

stoat-app bot commented Dec 22, 2022

Easy and customizable dashboards for your build system. Learn more about Stoat ↗︎

Static Hosting

Name Link Commit Status
CLI Test Coverage Visit cd506cd
Action Test Coverage Visit cd506cd
Action Test Coverage (single file) Visit cd506cd

Job Runtime

debug

import { Template } from '../../../../action/src/types';

import { findStoatConfigPath } from '../pathHelpers';
import {findGitRoot, findStoatConfigPath} from '../pathHelpers';
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick. The code is not auto formatted. husky is probably not working for cli.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to what I think is a better husky configuration. There's no root .husky now, only .husky/pre-commit for subprojects.

Copy link
Member

Choose a reason for hiding this comment

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

Nice.

@jrhizor jrhizor merged commit 7663f4b into main Dec 22, 2022
@jrhizor jrhizor deleted the jrhizor/have-cli-watch-for-templates branch December 22, 2022 20:54
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