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

Make contributions easier #546

Merged
merged 1 commit into from
Feb 26, 2019
Merged

Make contributions easier #546

merged 1 commit into from
Feb 26, 2019

Conversation

jankeromnes
Copy link
Contributor

👋 Hello!

Thanks for making this cool Git tutorial. I work on gitpod.io, a service that provides free online workspaces for open source projects, and I thought you might be interested in having pre-configured dev environments to help your contributors get started easily.

I've configured Gitpod to pre-install grunt and all npm dependencies, then to automatically build your app and open index.html in a preview pane. Here is what it looks like:

Open in Gitpod
screenshot 2019-02-26 at 17 45 20
Please have a look when you have time. 🙂

@@ -77,7 +77,7 @@ You'll also need `npm` to download all the dependencies of the project.

The general workflow / steps are below:

```
```bash
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, this is a drive-by change: I thought the setup instructions could be more readable when syntax-highlighted as Bash.

Copy link
Owner

Choose a reason for hiding this comment

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

nah this is a good change!

onOpen: open-preview
tasks:
- init: npm install && npm install -g grunt-cli
command: grunt build && python3 -m http.server 8000
Copy link
Owner

Choose a reason for hiding this comment

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

if you're ok with doing hard refreshes, grunt fastBuild is a faster version. it skips the hashing step and simply puts the assets in build.js or something, which means you need to hard refresh but saves you a decent chunk of time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! I'll follow up to use grunt fastBuild instead of grunt build. Saving time is 👌.

@@ -97,6 +97,10 @@ git push
# go online and request a pull
```

Alternatively, you can also build and run the app in a pre-configured online workspace:

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/pcottle/learnGitBranching/blob/master/src/js/git/index.js)
Copy link
Owner

Choose a reason for hiding this comment

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

oh so the link is the file that opens, but it reads the yaml file automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, after the gitpod.io/# prefix, you can use basically any GitHub URL (specific file, branch, pull request...) and it will try to do the right thing. It will also look for a .gitpod.yml config file at the root of the repository, to see if there is anything specific to do to set up that project.

I chose to pre-open src/js/git/index.js in the editor, but feel free to change it if you have a better idea.

@pcottle
Copy link
Owner

pcottle commented Feb 26, 2019

I'm super down to accept this, I just think we need some kind of callout on how to rebuild the project. is that included as part of command? also see the inline about the fastBuild variant

@pcottle pcottle merged commit db00223 into pcottle:master Feb 26, 2019
@pcottle
Copy link
Owner

pcottle commented Feb 26, 2019

actually this provides value already, but curious to hear what you think about my comments above

@jankeromnes
Copy link
Contributor Author

Hi @pcottle, thanks for the fast review! I'm so happy that you find it useful. 😄 You also raised some great points, I'll reply to your other comments individually.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Feb 27, 2019

I'm super down to accept this, I just think we need some kind of callout on how to rebuild the project. is that included as part of command? also see the inline about the fastBuild variant

That's a great question. Maybe we can improve what Gitpod does beyond the immediate project setup.

Basically, when you start a workspace for the first time, it will run init and then command; and if you restart a workspace that already existed, it will just run command.

In Gitpod, I usually type Ctrl+C, UpArrow and Enter in the Terminal to interrupt and re-run the command, but maybe that's not obvious, or there can be better ways to suggest relevant commands.

A similar idea was to allow configuring various helpful project-specific workflows in .gitpod.yml, and to show these in the IDE, e.g. via a Run button or dropdown. It's filed as gitpod-io/gitpod#247 but hasn't been implemented yet. Maybe I should take another look there.

@jankeromnes
Copy link
Contributor Author

jankeromnes commented Feb 27, 2019

Actually, maybe there is a simpler way to call out how to rebuild:

What about adding something like echo "To rebuild the app, run 'grunt fastBuild' and reload 'index.html'." to the command?

@pcottle
Copy link
Owner

pcottle commented Feb 27, 2019

Oh yeah that'd be a nice hack/fix to give people the heads up!

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.

None yet

2 participants