Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

Commit

Permalink
Merge restructuring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmann committed Apr 30, 2013
2 parents d067a21 + 484d7c6 commit 37f46a6
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ After running the init command above, you will be presented with a standard dire
.. .. .. /less
.. .. /js
.. .. .. /src
.. .. /img
.. .. .. /src
.. /images
.. .. /src
.. /includes
.. /lang
.. .. plugin.po
.. /languages
.. .. plugin.pot
.. .gitignore
.. Gruntfile.js
.. plugin.php
Expand All @@ -63,19 +63,20 @@ After running the init command above, you will be presented with a standard dire

Depending on how you answer the prompt regarding the use of a preprocessor, you will either have a `/src` directory (CSS), a `/sass` directory (Sass), or a `/less` directory (LESS) under your normal `/css` directory. The goal here is that you only ever edit files in the related source directory and Grunt will automatically build and minify your final stylesheets directly in `/css`.

If you're using Sass or Less, the raw files will be processed into `/css/filename.src.css` and minified into `/css/filename.min.css`.
If you're using Sass or Less, the raw files will be processed into `/css/filename.css` and minified into `/css/filename.min.css`.

If you're using vanilla CSS, the source files will be minified into `/css/filename.min.css`.

### JavaScript

You should only ever be modifying script files in the `/js/src` directory. Grunt will automatically concatenate and minify your scripts into `/js/filename.src.js` and `/js/filename.min.js`. These generated files should never be modified directly.
You should only ever be modifying script files in the `/js/src` directory. Grunt will automatically concatenate and minify your scripts into `/js/filename.js` and `/js/filename.min.js`. These generated files should never be modified directly.

### Images

The `/img/src` directory exists only to allow you to keep track of source files (like PSDs or separate images that have been merged into sprites). This helps keep source files under version control, and allows you to bundle them with the distribution of your new GPL plugin.

## Release History

* 2013-04-26 v0.1.1 Minor bug fixes
* 2013-04-29 v0.1.2 Folder restructuring and renaming.
* 2013-04-26 v0.1.1 Minor bug fixes.
* 2013-04-25 v0.1.0 Initial public release.
2 changes: 1 addition & 1 deletion rename.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"assets/css/sass/plugin.scss": "assets/css/sass/{%= js_safe_name %}.scss",
"assets/css/src/plugin.css": "assets/css/src/{%= js_safe_name %}.css",
"assets/css/js/src/plugin.js": "assets/css/js/src/{%= js_safe_name %}.js",
"lang/plugin.po": "lang/{%= prefix %}.po"
"languages/plugin.pot": "languages/{%= prefix %}.pot"
}
6 changes: 3 additions & 3 deletions root/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function( grunt ) {
src: [
'assets/js/src/{%= js_safe_name %}.js'
],
dest: 'assets/js/{%= js_safe_name %}.src.js'
dest: 'assets/js/{%= js_safe_name %}.js'
}
},
jshint: {
Expand Down Expand Up @@ -45,7 +45,7 @@ module.exports = function( grunt ) {
uglify: {
all: {
files: {
'assets/js/{%= js_safe_name %}.min.js': ['assets/js/{%= js_safe_name %}.src.js']
'assets/js/{%= js_safe_name %}.min.js': ['assets/js/{%= js_safe_name %}.js']
},
options: {
banner: '/*! <%= pkg.title %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
Expand Down Expand Up @@ -91,7 +91,7 @@ module.exports = function( grunt ) {
expand: true,
{% if ('sass' === css_type || 'less' === css_type) { %}
cwd: 'assets/css/',
src: ['{%= js_safe_name %}.src.css'],
src: ['{%= js_safe_name %}.css'],
{% } else { %}
cwd: 'assets/css/src/',
src: ['{%= js_safe_name %}.css'],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 1 addition & 4 deletions root/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
* Author URI: {%= author_url %}
* License: GPLv2+
*/
?>

<?php
/**
* Copyright {%= grunt.template.today('yyyy') %} {%= author_name %} (email : {%= author_email %})
*
Expand Down Expand Up @@ -39,7 +37,7 @@
* - Registers the default textdomain.
*/
function {%= prefix %}_init() {
load_plugin_textdomain( '{%= prefix %}', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/lang' );
load_plugin_textdomain( '{%= prefix %}', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages' );
}

/**
Expand Down Expand Up @@ -68,4 +66,3 @@ function {%= prefix %}_deactivate() {
// Wireup filters

// Wireup shortcodes
?>

0 comments on commit 37f46a6

Please sign in to comment.