-
Couldn't load subscription status.
- Fork 0
Hackathon syncing #39
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
Open
kylebyrne
wants to merge
27
commits into
main
Choose a base branch
from
hackathon-syncing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DevServer will be whats run by theme developers to sync files to their themes when they're developing. This implements a Watcher which listens for changes and uses Observable to allow observers to act on those changes, we will implement a watchlist that decides which files should be listened to and an uploader which uploads changes to the app
We make use of a PStore to maintain config in a file at the root of the directory. We create a new `/.canvas/` directory if it doesn't exist and maintain a `config.pstore` file there. We implement some basic manipulation methods on this for easy setting and getting
This is a bit hacky as far as test go but we add an integration which shows how we can now monitor linked files for changes and act upon that
This uses the GlobalConfig PStore to save your auth details in your home directory.
Previously this was from when we had the concept of linking certain files, now we just want to listen to every change
This class will post to the easol platform for each file change, we can then check this on our side and update the files accordingly For now I've just hardcoded in our local dev url
This lets us scope the files we're linting to those specified in the command line call, e.g. ``` canvas lint blocks/gallery/block.html ```
I'm not proud of the code here, but cli ui sucks and makes outputting stuff a pain in the ass. What this does is effectively just run the linter on the changed file before we sync it, most of the changes are just making the canvas gem not output so that we can manage in the context of the new spin group or something?
We might not get JSON back so we dont force it, we just rescue this for now
Using this we can move to actually using the correct subdomain and site_id in our client posting
ca16c0a to
a0d96c9
Compare
We now need the ability to set values within a local config as well as read them
On the `canvas dev` command, this will create a dev site by POSTing to /canvas_api/dev_sites and then polling GET /canvas_api/dev_sites until it has succeeded in duplicating the company's published site.
When running the canvas `dev command`, we want to sync files with the API that have changes compared to what is on the git repo and therefore what will be on the company's dev site.
Sync site/create dev site
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.