Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aschweigert committed Jul 15, 2015
2 parents 07e5704 + f49a961 commit 5fcc1d6
Show file tree
Hide file tree
Showing 23 changed files with 632 additions and 22 deletions.
54 changes: 44 additions & 10 deletions Gruntfile.js
Expand Up @@ -3,20 +3,29 @@ module.exports = function(grunt) {

// Force use of Unix newlines
grunt.util.linefeed = '\n';

// Find what the current theme's directory is, relative to the WordPress root
var path = process.cwd();
path = path.replace(/^[\s\S]+\/wp-content/, "\/wp-content");

var CSS_LESS_FILES = {
'css/child.css': 'less/child.less',
'homepages/assets/css/your_homepage.css': 'homepages/assets/less/your_homepage.less',
};

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

less: {
development: {
options: {
paths: ['less']
paths: ['less'],
sourceMap: true,
outputSourceFiles: true,
sourceMapBasepath: path,
},
files: {
'css/style.css': 'less/style.less',
'homepages/assets/css/your_homepage.css': 'homepages/assets/less/your_homepage.less'
}
}
files: CSS_LESS_FILES
},
},

watch: {
Expand All @@ -25,17 +34,42 @@ module.exports = function(grunt) {
'less/**/*.less',
'homepages/assets/less/**/*.less'
],
tasks: 'less'
tasks: [
'less:development',
'cssmin'
]
},
sphinx: {
files: ['docs/*.rst', 'docs/*/*.rst'],
tasks: ['docs']
}
},

cssmin: {
target: {
options: {
report: 'gzip'
},
files: [{
expand: true,
cwd: 'css',
src: ['*.css', '!*.min.css'],
dest: 'css',
ext: '.min.css'
},
{
expand: true,
cwd: 'homepages/assets/css',
src: ['*.css', '!*.min.css'],
dest: 'homepages/assets/css',
ext: '.min.css'
}]
}
},

pot: {
pot: {
options: {
text_domain: 'your_theme_domain',
text_domain: 'largo',
dest: 'lang/',
keywords: [ //WordPress localization functions
'__:1',
Expand Down Expand Up @@ -69,4 +103,4 @@ module.exports = function(grunt) {
});

require('load-grunt-tasks')(grunt, { scope: 'devDependencies' });
}
}
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -4,11 +4,11 @@ An example WordPress child theme based on the Largo parent theme (http://github.
* * *
## WARNING

We are still working on this so right now it just gives you an example of our preferred directory structure for a child theme (mirroring what we do in the Largo parent theme).
We are actively working on this!

Soon, it will contain a readme in each folder explaining what goes where, how to modify the behavior/look/feel of Largo and other helpful tips and examples.
To create a child theme of your own WE DO NOT recommend cloning this repo exactly as-is. Rather, this is intended as a verbose example of how to structure a child theme. You probably do not need (or want) everything that is included in here but we hope it is a helpful reference as you're building your own child theme with Largo.

If you have specific questions or requests for docs, please open an issue so make sure to address them.
If you have specific questions or requests for documentation, please open an issue so we make sure to address them.

* * *

Expand Down Expand Up @@ -111,4 +111,4 @@ For example:
}
add_action('wp_enqueue_scripts', 'replace_largoCore')

See the documentation for [`wp_dequeue_script`](http://codex.wordpress.org/Function_Reference/wp_dequeue_script) and [`wp_dequeue_style`](http://codex.wordpress.org/Function_Reference/wp_dequeue_style).
See the documentation for [`wp_dequeue_script`](http://codex.wordpress.org/Function_Reference/wp_dequeue_script) and [`wp_dequeue_style`](http://codex.wordpress.org/Function_Reference/wp_dequeue_style).
192 changes: 192 additions & 0 deletions css/child.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions css/child.min.css
@@ -0,0 +1 @@
.delete-this-class-its-just-for-show{display:inherit}
1 change: 0 additions & 1 deletion css/style.css

This file was deleted.

0 comments on commit 5fcc1d6

Please sign in to comment.