-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Without master branch, bower doesn't work #180
Comments
A way to fix it:
|
Thanks for the fix. I suspect if you're only using Prism during development though, you're doing something wrong! |
+1 For fixing this. Also had issues installing here |
@callumacrae It's not the subject here, do |
I'm trying to use prism with https://rails-assets.org so I can ditch bower when developing my Rails apps. rails-assets uses master branch by default to build ruby gems. Also I think this project should be properly versioned with a change log. |
+1 |
@LeaVerou: as far as I can tell, you should do the following:
NoteTypically when a project has a master and gh-pages branch, you'd have everything for dev on master plus anything needed for package managers. So no css-tricks logo, etc. Then the gh-pages branch would only have what's needed for prismjs.com, so no package.json, bower.json, etc. This means though that any outstanding pull requests would have to be re-issued to the master branch. |
This really should have a master branch, we don't need the gh-pages in our code repos. Also it's defeating the purpose of Bower. Bower aka making it easy for us (developers) to install JS libraries without having to browse the web. |
I'd like to see this repo refactored to have a master branch. It's not just a bower thing |
The only reason this is on gh-pages is that Github only uses that for Github Pages. Once Github allows Github pages from master, I will switch all my repos to use a master branch instead. I like @adam-lynch’s idea of using the master branch for all Prism code and gh-pages for the website files. That would also eliminate contributor confusion about which file to edit. However, I'm still not sure how to do this in a maintainable way. I don't want to have to manually keep the branches in sync… |
You could branch gh-pages into master, and then delete all website stuff from master. Merge master into gh-pages, then use Prism changes would need to be made to master and then merged into gh-pages, but that's pretty easy (you could probably even have it running on a hook, although that could be dangerous). So, it's sort of manual, but it's not as bad as copying and pasting code. It sounds more confusing than it is. I could fork the repo and demonstrate, if you want. |
What exactly do you need to keep in sync? Isn't it just the This file needs to be edited manually anyways, so there should be no issues. The only thing you need to change then would be the download URL in the website. (Or am I missing something?) |
The whole components folder. Not sure if components.js should even be in the master branch, it's only used by the website. But if it's not, then people would have to issue PRs to two branches every time they add a language/theme/plugin, which is suboptimal… |
The way I'm suggesting, they'd only need to send it to master, but then you'd need to merge it (although it really would be as simple as It would be confusing if the branches diverged, but they don't need to. |
Sure, but it's an extra step every single time a change is made. I know from experience that even a tiny extra step every time adds quite a lot of extra work in total. If it could be automatic somehow, sure. |
You could use a git hook—use the post-merge hook to merge a change into gh-pages when you merge it into master. |
@kud With the
|
I personally believe this you have the wrong outlook to have on this issue @LeaVerou. Who cares about the gh-pages branch being up to the minute accurate? It's just a demo. The far more important issue is that Prism works in packaging systems so people can easily include it in their projects which means that master should be the default branch. If it is important to have the demo up to the minute, why can't you just link to the default raw file in the master branch like https://raw.githubusercontent.com/LeaVerou/prism/gh-pages/prism.js? |
I don't use anymore bower, instead npm. |
@homosaur because you can't include these files to be runnable. Github serves these files as But: I am currently working on a github setup which would solve all these things. Just a little more patience. 😉 |
+1 to being bower friendly. |
+1 to the other plus 1s! |
I think I don't really need the gh-pages in my development environment please make a master branch. |
My, gosh. Hopeless branchy structure. |
My, gosh. Useless comment. |
Still seems impossible to install with bower, without specifying #gh-pages branch. |
Prism is great! I also look forward to when it can be consumed via Bower without a workaround 👍 |
Makes this hard to use with Ember CLI. |
Need make a tag with the version |
Would love to use this but I would love to not have to use the gh-pages branch. It's not semantic and makes it a pain to manage. Also proper semver would be great on bower distribution. You can do it with git-tags and if you need to you can also use an interactive rebase on a master branch to tag appropriately. I know it's a lot of work but it'll make your project much more successful. |
@LeaVerou what @HarleyKwyn says is true. And its a huge public demand. |
Hi all. I'm seeing this error when trying to install with this: Error: |
Has this now been resolved? Or does it need more work? |
There is still no "master" branch. So Bower will still require you to specify the "gh-pages" branch. |
I can see a "master" branch on this repo, which was last updated approx 1 month ago, could you explain what you mean, given that there is one? Also bower seems to work without problem for me lol. Am I missing something here?
|
There didn’t use to be a master branch in the past, to prevent the inevitable syncing issues between the two. I don’t quite remember when one was added, @Golmote do you? |
Tbh merging changes to the master branch, and then only pushing to gh-pages On Tuesday, May 5, 2015, Lea Verou notifications@github.com wrote:
|
Crap! I didn't realize there were a master branch! I have no idea who created it and when. I don't know how to get the info... I might even have created it by mistake... I think my local branch is named "master"... |
I'd guess it was created on March 21st by you, because that's the last commit! If you delete the master branch now, you could break any site that's started using prism between March and now. Could I suggest that now would be a good time to start using the master branch? npm weekly had a couple links this week on how you can use npm scripts to speed this up. |
That's a good idea. It prevents the GitHub page being broken and reduces |
@LeaVerou Majority of this I can do in a PR, but some will require you to setup up hooks and accounts, which I can talk you through on Skype with screenshare etc. Travis CI will also give us all those lovely integrations we see on other projects, such as a build status logo on the README and a test build hook on every commit/PR, and most importantly it will give this project CI, which should be an absolute minimum imho. Also the general rule of the thumb is that no one should be committing to master directly, all changes should happen within a feature branch and all merges to master should be done via a PR. If you haven't already, I'd strongly recommend reading Github Flow. Anyway, my skype is cal.leeming. I'm free tonight after 8pm GMT. |
A test build hook would be useful... if we actually had tests. |
Heh, so TDD is out of the window.. At the absolute very least we can have a On Tuesday, May 5, 2015, Golmote notifications@github.com wrote:
|
Sure, and I agree that this needs to be sorted out. Eventually we'll need tests too. |
As we now have a master branch, that is updated on every new official release, I think this issue can be closed. |
The text was updated successfully, but these errors were encountered: