Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit d2b8501

Browse files
committed
Merge branch 'release/v1.0.1'
2 parents 986dfc3 + 9852154 commit d2b8501

11 files changed

+179
-9
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@ root = true
55

66
# Unix-style newlines with a newline ending every file
77
[*]
8+
charset = utf-8
89
end_of_line = lf
910
insert_final_newline = true
1011
indent_style = space
1112
indent_size = 2
13+
trim_trailing_whitespace = true
14+
15+
[*.php]
16+
indent_size = 4
17+
18+
[Makefile]
19+
indent_size = 4
20+
indent_style = tab
21+
22+
[.htaccess]
23+
indent_size = 4

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## v1.0.1 - 2015-09-23
6+
### Fixed
7+
- The JavaScript Minification in build mode works now correctly.
8+
- A bug in the watcher task was removed.
9+
10+
### Changes
11+
- The default output theme folder will be named after package.json of your project instead of the npm package.
12+
513
## v1.0.0 - 2015-07-03
614
### Added
715
- **npm support**: gulp-wp-theme is now useable via npm. This makes it easier to

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@ build:
1111

1212
compile:
1313
@node_modules/gulp/bin/gulp.js
14+
15+
wordpress:
16+
@cd dist && rm -rf wp-{a*,b*,com*,cont*,cr*,config-s*,i*,l*,m*,s*,t*} xmlrpc.php in* lic* lie* rea* wor*
17+
@curl https://wordpress.org/latest.zip -o dist/wordpress.zip
18+
@cd dist && unzip wordpress.zip
19+
@cd dist && rm ./wordpress/wp-config-sample.php
20+
@cd dist && cp -Rfn ./wordpress/* .
21+
@if [ ! -a dist/local-config.php ]; then php dist/local-config-generator.php; fi;
22+
@cd dist && rm -rf wordpress readme.html liesmich.html license.txt wordpress.zip wp-content/themes/twenty*

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gulp-wp-theme",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "WordPress Theme Project Templates for Gulp ",
55
"authors": [
66
"René Stalder <[email protected]>"

dist/local-config-generator.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/**
3+
* local-config.php Generator
4+
*/
5+
6+
if (php_sapi_name() !== 'cli') {
7+
header('HTTP/1.0 403 Forbidden');
8+
exit;
9+
}
10+
if (file_exists(__DIR__ . '/local-config.php')) {
11+
die('local-config.php already exists.');
12+
}
13+
14+
$contents = [];
15+
16+
$contents[] = '<?php';
17+
$contents[] = '';
18+
$contents[] = 'define(\'DB_NAME\', \'gulp-wp-theme\');';
19+
$contents[] = 'define(\'DB_USER\', \'root\');';
20+
$contents[] = 'define(\'DB_PASSWORD\', \'\');';
21+
$contents[] = 'define(\'DB_HOST\', \'localhost\');';
22+
$contents[] = '';
23+
$contents[] = '$table_prefix = \'wp_\';';
24+
$contents[] = '';
25+
$contents[] = 'define(\'WP_DEBUG\', false);';
26+
$contents[] = '';
27+
$contents[] = file_get_contents('https://api.wordpress.org/secret-key/1.1/salt/');
28+
29+
file_put_contents(__DIR__ . '/local-config.php', implode(PHP_EOL, $contents));
30+
31+
echo PHP_EOL . 'please insert your database details in dist/local-config.php' . PHP_EOL;

dist/wp-config.php

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?php
2+
/**
3+
* The base configuration for WordPress
4+
*
5+
* The wp-config.php creation script uses this file during the
6+
* installation. You don't have to use the web site, you can
7+
* copy this file to "wp-config.php" and fill in the values.
8+
*
9+
* This file contains the following configurations:
10+
*
11+
* * MySQL settings
12+
* * Secret keys
13+
* * Database table prefix
14+
* * ABSPATH
15+
*
16+
* @link https://codex.wordpress.org/Editing_wp-config.php
17+
*
18+
* @package WordPress
19+
*/
20+
21+
if (file_exists(dirname(__FILE__) . '/local-config.php'))
22+
require(dirname(__FILE__) . '/local-config.php');
23+
24+
// ** MySQL settings - You can get this info from your web host ** //
25+
/** The name of the database for WordPress */
26+
if ( !defined('DB_NAME') )
27+
define('DB_NAME', 'database_name_here');
28+
29+
/** MySQL database username */
30+
if ( !defined('DB_USER') )
31+
define('DB_USER', 'username_here');
32+
33+
/** MySQL database password */
34+
if ( !defined('DB_PASSWORD') )
35+
define('DB_PASSWORD', 'password_here');
36+
37+
/** MySQL hostname */
38+
if ( !defined('DB_HOST') )
39+
define('DB_HOST', 'localhost');
40+
41+
/** Database Charset to use in creating database tables. */
42+
if ( !defined('DB_CHARSET') )
43+
define('DB_CHARSET', 'utf8');
44+
45+
/** The Database Collate type. Don't change this if in doubt. */
46+
if ( !defined('DB_COLLATE') )
47+
define('DB_COLLATE', '');
48+
49+
/**#@+
50+
* Authentication Unique Keys and Salts.
51+
*
52+
* Change these to different unique phrases!
53+
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
54+
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
55+
*
56+
* @since 2.6.0
57+
*/
58+
if ( !defined('AUTH_KEY') )
59+
define('AUTH_KEY', 'put your unique phrase here');
60+
if ( !defined('SECURE_AUTH_KEY') )
61+
define('SECURE_AUTH_KEY', 'put your unique phrase here');
62+
if ( !defined('LOGGED_IN_KEY') )
63+
define('LOGGED_IN_KEY', 'put your unique phrase here');
64+
if ( !defined('NONCE_KEY') )
65+
define('NONCE_KEY', 'put your unique phrase here');
66+
if ( !defined('AUTH_SALT') )
67+
define('AUTH_SALT', 'put your unique phrase here');
68+
if ( !defined('SECURE_AUTH_SALT') )
69+
define('SECURE_AUTH_SALT', 'put your unique phrase here');
70+
if ( !defined('LOGGED_IN_SALT') )
71+
define('LOGGED_IN_SALT', 'put your unique phrase here');
72+
if ( !defined('NONCE_SALT') )
73+
define('NONCE_SALT', 'put your unique phrase here');
74+
75+
/**#@-*/
76+
77+
/**
78+
* WordPress Database Table prefix.
79+
*
80+
* You can have multiple installations in one database if you give each
81+
* a unique prefix. Only numbers, letters, and underscores please!
82+
*/
83+
if (!isset($table_prefix))
84+
$table_prefix = 'wp_';
85+
86+
/**
87+
* For developers: WordPress debugging mode.
88+
*
89+
* Change this to true to enable the display of notices during development.
90+
* It is strongly recommended that plugin and theme developers use WP_DEBUG
91+
* in their development environments.
92+
*
93+
* For information on other constants that can be used for debugging,
94+
* visit the Codex.
95+
*
96+
* @link https://codex.wordpress.org/Debugging_in_WordPress
97+
*/
98+
if ( !defined('WP_DEBUG') )
99+
define('WP_DEBUG', false);
100+
101+
/* That's all, stop editing! Happy blogging. */
102+
103+
/** Absolute path to the WordPress directory. */
104+
if ( !defined('ABSPATH') )
105+
define('ABSPATH', dirname(__FILE__) . '/');
106+
107+
/** Sets up WordPress vars and included files. */
108+
require_once(ABSPATH . 'wp-settings.php');

gulp/config-development.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var fs = require('fs');
2-
var packageConfig = require('../package.json');
2+
var packageConfig = require(process.env.PWD + '/package.json');
33

44
var dest = './dist/wp-content/themes/' + packageConfig.name;
55
var src = './src';

gulp/config-production.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var fs = require('fs');
22
var gutil = require('gulp-util');
3-
var packageConfig = require('../package.json');
3+
var packageConfig = require(process.env.PWD + '/package.json');
44

55
var dest = './dist/wp-content/themes/' + packageConfig.name;
66
var src = './src';

gulp/tasks/browserify.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ module.exports = function(gulp, config){
6060
b.transform(debowerify);
6161

6262
if(config.browserify.transforms && config.browserify.transforms.uglifyify){
63-
b.transform({
64-
global: true
65-
}, 'uglifyify');
63+
if(!bundleConfig.transforms){
64+
bundleConfig.transforms = [];
65+
}
66+
67+
bundleConfig.transforms.push([ 'uglifyify', { global: true } ]);
6668
}
6769

6870
var bundle = function() {

gulp/tasks/watchify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
2-
var browserifyTask = require('./browserify');
32

4-
module.exports = function(gulp){
3+
module.exports = function(gulp, config){
4+
var browserifyTask = require('./browserify')(gulp, config);
55
gulp.task('watchify', function(callback) {
66
// Start browserify task with devMode === true
77
browserifyTask(callback, true);

0 commit comments

Comments
 (0)