For instance, the yet-to-be-released Twenty Twelve theme is available on GitHub, but it's a Forge build.
And in order to retrieve the actual theme with the normal directory structure, I'd have to install Ruby, RubyGems, Forge and some configuration to go with it.
I am no developer and I just want to use the theme. Is there a way to manually pull out the theme files from the build?
This is what I am thinking:
All the required template, JS and CSS files are in the build directory.
Add html5.js to the javascripts directory inside build directory. Then rename javascripts directory to js (<= compared its directory structure to that on WordPress.com SVN)
Now rename build directory to twentytwelve—the theme is ready.
Is that all, or am I missing the whole point?
PS: I am sure that some of you'd suggest me to download the theme directly from the WP.com SVN repo., but the reason why I don't want to is that on GitHub I can easily track the changes to the theme.
If you really want to just get the latest, ready-to-go version of the theme, use SVN. They push updates over when it's in a stable form, so you don't need to worry so much about whether or not there's broken functions in the version you're grabbing - or any number of weird issues when using an alpha build of the theme.
While that will kind of work, you should really either:
Use the GitHub repository the way it was meant to (clone it, and use Forge to build the theme).
Wait for the theme to actually be released.
While you might be able to extract the theme as-is from the /build directory, there's no real way for you "track the changes to the theme" since the changes will be made in the /source directory. There's no guarantee the committers will build the theme before pushing (which is how the /build directory is currently kept in sync.
Update
If you've been following active development, Twenty Twelve was just rolled into WordPress trunk for the upcoming (late 2012) release of version 3.5:
Changeset 21261
Timestamp: 07/12/12 04:20:46 (14 hours ago)
Author: nacin
Message: The Twenty Twelve for WordPress.
props drewstrojny, lancewillett.
also props corvannoorloos, jeffsebring, kobenland, iandstewart, mfields,
mtdesign, op12no2, philiparthurmoore, sixhours, mamaduka.
So rather than playing around with extracting the theme via GitHub, just use Subversion to check out WordPress trunk and look at the /wp-content/themes/twentytwelve directory.
There's nothing 'easy' about the way you're suggesting going about it. Certainly not easier than installing SVN, pointing it to the repo, and tracking changes there (you know, when they're actually done). It's still version controlled, still easy to see the diff, and still the latest version. Also, note that in github, the theme files do point to /javascripts, so if you're renaming the directory you'll have to manually catch it in the files themselves as well.
If you really want to just get the latest, ready-to-go version of the theme, use SVN. They push updates over when it's in a stable form, so you don't need to worry so much about whether or not there's broken functions in the version you're grabbing - or any number of weird issues when using an alpha build of the theme.
Related
I am looking to integrate version control into my Wordpress development workflow. I have experience with Git in rails application development, so that seemed like a good option. However, I haven't found any holistic information that pertains to my needs and is in my knowledge level.
I would like to be able to accomplish the following:
develop site locally(I would only be touching the theme files for the most part, so I would want to look to the production environment for the rest of the files to avoid redundancy)
have Wordpress look for theme information in my repository (most likely will be on Bitbucket, but am open to server hosting solutions)
I hope that I am describing this clear enough for someone to have insight. If not I am glad to go into more depth of my goals.
You can refer to "WordPress + Composer + GIT"
It uses (in addition of Git) Composer (a dependencies managing tool for PHP), and WordPress Packagist (a repositories site that automatically packages the plugins and themes available in WordPress site in the format required for working with composer)
That way, you keep a declarative approach where you declare ion a composer.json what you need: this is easier to version in a Git repo.
I am developing a wordpress theme. I am new to using Grunt and composer for packages.
I have also integrated git flows. At the moment I am developing on develop branch and then merge to master once I am satisfied with the code.
The problem I am facing is that my master branch has Gruntfile.js as well as package.json in it. Similarly there are sass files in css folders. I want a clean release branch, in which there are only required theme files and no gruntjs, pacakge.json and sass files.
These all files are being tracked in master, how can I create a clean release branch.
I have followed the Woocommerce repository for making my development environment.
I could not find a build process in it also. Am I missing any proper step?
P.S : I don't know if I should be sharing any code samples here, but if you want anything I can share it here.
As far as I'm aware you can't do what you're trying to do and I don't believe git is meant to work that way. Having your grunt & SASS files in the master branch is the correct way of doing this, those files are also in the Woocommerce repository you've linked to.
I'm guessing what you're trying to do is create a release of a theme that doesn't have any of the 'development only files', for lack of a better term, to give to the the end user installing the theme? If so that release would be a separate 'thing' to git as git is mainly for developer version control. What I think you're after is just creating a stand-alone downloadable zip file by the sounds of things?
For example if you were to submit your theme to WordPrss.org they take it as a zip file rather than a link to a git repository.
Probably a silly question, but I cannot find any good advice on the internet so far, so hopefully you guys have some good advice. I would like to use GIT for version control and use it to deploy changes to my websites to the server(s). It's easy when I use NodeJS, but a bit more complicated when using a CMS system, to my opinion.
When I use NodeJS
When I use NodeJS it's quite easy to have a node_modules folder which contains all the external libraries which I will install on deployment. The rest(my own files) will be saved on Github and deployed to my server if changed. Obviously I will not store the node_modules folder on my Github account or send it to my server (node modules will be installed on the server, on deployment). So it's pretty easy to keep those two (third-party an my own files) seperated.
When I use Wordpress, Magento or something similar
Now it gets complicated. Mostly because CMS systems like Wordpress have a folder structure like wp_content/themes/theme_name/, so your own theme files are more or less entangled with the core structure, instead of separated like NodeJS. And it doesn't seem right to commit all my core files to my Github account as well or send all those core files to my server on every deploy (I would prefer to install them using composer or something, serverside), because I'll never touch the core files, obviously.
So is there any advice? Is there a better whey to handle this? Maybe change a configuration file with the path to my theme folder or something?
The best way to do this is to move your wp-content folder outside of your standard installation. I tend to have a folder called "wp" with the basic WordPress installation in it and a folder called "wp-content" at the same level for my content files. You can then tell WordPress that your content folder is elsewhere with the following:
define('WP_CONTENT_DIR', dirname(__FILE__) . '/content');
That goes into wp-content.php which you can also take out of the main WordPress install (and thus add to git) and place at the same level as your folders.
To make things even better consider looking at composer https://getcomposer.org/ and using that to bring in WordPress core and plugins https://wpackagist.org/ is your friend here. This guide got me started on using composer with WordPress and its a good start https://roots.io/using-composer-with-wordpress/ you can pull in your theme from git as well via composer which is great for when you deploy etc... Capistrano for example can run composer on a server :)
Tl;dr : Is there an equivalent in meteor to .gitignore?
Yes, I am aware of using a leading '.' in the directory name to get meteor to exclude it. But using leading dot is not a solution in this case. Read below to understand.
Longer:
I would like to use Bower.io to install various browser plugins.
Ideally, I run bower in the client subdirectory. Bower does its thing creating the bower_components directory and pulls down the plugin (pick a random jquery plugin for example).
Many plugins include example html, demo css files, etc. to show how to use the plugin.
Unfortunately, Meteor wants to include all that stuff in the application. Which unsurprisingly causes problems.
My current solution is to have bower.io run in the project's parent directory. This is not ideal as I have to copy js/css files over from the bower directory to the meteor client directory. (yes, I could use soft links but then the files would be missing when pushing to production).
With only a few client plugins / css packages this is becoming quite annoying.
NOTE: Renaming files/directories retrieved by bower.io to have a leading '.' or using bower in a dotted subdirectory helps only marginally. I would then have to manually include the files needed.
Is this possibly a duplicate of How to exclude directories/files from Meteor's bundler?
If you want to define the way you name your files, you could try including a certain regex to match in the meteor bundler. Otherwise, maybe it's something that needs to be implemented on a framework level.
I also found this tutorial by Tri on integrating meteor and bower: http://tridnguyen.com/articles/meteor-and-bower/. Tri defines a new meteor package to specify the exact files required on the client.
The best solution, however, is move away from Bower as Meteor offers its own package manager at a framework level. Including the front end files that you need using Meteor packages would be the more productive solution in the long run, especially as the framework changes.
I installed the WordPress bundle/ruble for Aptana Studio, but it's only providing code assistance for a subset of WordPress functions. I'd like code assistance for all WordPress core functions (or as many as possible). My projects have PHP as their nature, and are connected via SFTP to remote WordPress installations.
After the bundle (which hasn't been updated in over a year) didn't provide everything I was looking for, I tried using a local copy of WordPress as an external library, then adding it as an external directory to the PHP Buildpath. Neither one added any more functions than the bundle provided. These actions were suggested in Aptana Studio Support and WordPress Answers.
Am I doing something wrong, or is the level of code assistance I'm looking for not available?
It's true that the WordPress bundle offers just some limited auto-completion support. Though including the local copy of another WordPress installation as a PHP external library seemed to solve this in the latest Aptana Studio version (3.4.0,) as you already mention to have tried, and as it is suggested in this one of the links that you pointed out.
Here are all the specific steps I took, so you can check if there was something different in the procedure you followed.
Open the Preferences menu going to Window > Preferences
Select Aptana Studio > Editors > PHP > Libraries
Click "New user library"
Add the path to another local WordPress installation (not the same WordPress files in the current project,) selecting the root folder of a freshly extracted WordPress download (e.g.: C:\wordpress-3.5.1\wordpress)
Make sure the new library is selected in the user libraries list (marking it with a checkmark next to the library icon.)
Apply the changes and press OK
Make sure your project is a PHP project. Right click the project folder, select Properties > Project Natures and mark the PHP checkbox.
Now, inside PHP code, I get autocompletion suggestions for all core WordPress functions - and I can even go to check their source by pressing F3 on their function name.
I followed the steps of E. Serrano and it works perfectly. What is silly is that if you want autocompletion for, say, add_action('wp_print_footer_scripts', 'scripts.js', 1); the moment that you type the quote, autocompletion is lost... if you try add_action( wp_ you get all WP commands. Hope it helps...