-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93b81b3
commit 3b11be4
Showing
28 changed files
with
344 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,159 @@ | ||
'use strict'; | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
jsbanner: '/*!\n' + | ||
' * <%= pkg.pluginName %> Scripts - Version <%= pkg.version %>\n' + | ||
' * \n' + | ||
' * Modifications and Additions to WPCF7 Scripts to work with CF7BS\n' + | ||
' * <%= pkg.author.name %> <<%= pkg.author.email %>>\n' + | ||
' */', | ||
pluginheader: '/*\n' + | ||
'Plugin Name: <%= pkg.pluginName %>\n' + | ||
'Plugin URI: <%= pkg.homepage %>\n' + | ||
'Description: <%= pkg.description %>\n' + | ||
'Version: <%= pkg.version %>\n' + | ||
'Author: <%= pkg.author.name %>\n' + | ||
'Author URI: <%= pkg.author.url %>\n' + | ||
'License: <%= pkg.license.name %>\n' + | ||
'License URI: <%= pkg.license.url %>\n' + | ||
'*/', | ||
fileheader: '/**\n' + | ||
' * @package CF7BS\n' + | ||
' * @version <%= pkg.version %>\n' + | ||
' * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n' + | ||
' */', | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
jsbanner: '/*!\n' + | ||
' * <%= pkg.pluginName %> Scripts - Version <%= pkg.version %>\n' + | ||
' * \n' + | ||
' * Modifications and Additions to WPCF7 Scripts to work with CF7BS\n' + | ||
' * <%= pkg.author.name %> <<%= pkg.author.email %>>\n' + | ||
' */', | ||
pluginheader: '/*\n' + | ||
'Plugin Name: <%= pkg.pluginName %>\n' + | ||
'Plugin URI: <%= pkg.homepage %>\n' + | ||
'Description: <%= pkg.description %>\n' + | ||
'Version: <%= pkg.version %>\n' + | ||
'Author: <%= pkg.author.name %>\n' + | ||
'Author URI: <%= pkg.author.url %>\n' + | ||
'License: <%= pkg.license.name %>\n' + | ||
'License URI: <%= pkg.license.url %>\n' + | ||
'Text Domain: bootstrap-for-contact-form-7\n' + | ||
'Domain Path: /languages/\n' + | ||
'*/', | ||
fileheader: '/**\n' + | ||
' * @package CF7BS\n' + | ||
' * @version <%= pkg.version %>\n' + | ||
' * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n' + | ||
' */', | ||
|
||
clean: { | ||
scripts: [ | ||
'assets/scripts.min.js' | ||
] | ||
}, | ||
clean: { | ||
scripts: [ | ||
'assets/scripts.min.js' | ||
], | ||
translation: [ | ||
'languages/bootstrap-for-contact-form-7.pot' | ||
] | ||
}, | ||
|
||
jshint: { | ||
options: { | ||
jshintrc: 'assets/.jshintrc' | ||
}, | ||
src: [ | ||
'assets/scripts.js' | ||
] | ||
}, | ||
jshint: { | ||
options: { | ||
jshintrc: 'assets/.jshintrc' | ||
}, | ||
src: [ | ||
'assets/scripts.js' | ||
] | ||
}, | ||
|
||
uglify: { | ||
options: { | ||
preserveComments: 'some', | ||
report: 'min' | ||
}, | ||
dist: { | ||
src: 'assets/scripts.js', | ||
dest: 'assets/scripts.min.js' | ||
} | ||
}, | ||
uglify: { | ||
options: { | ||
preserveComments: 'some', | ||
report: 'min' | ||
}, | ||
dist: { | ||
src: 'assets/scripts.js', | ||
dest: 'assets/scripts.min.js' | ||
} | ||
}, | ||
|
||
usebanner: { | ||
options: { | ||
position: 'top', | ||
banner: '<%= jsbanner %>' | ||
}, | ||
files: { | ||
src: [ | ||
'assets/scripts.min.js' | ||
] | ||
} | ||
}, | ||
usebanner: { | ||
options: { | ||
position: 'top', | ||
banner: '<%= jsbanner %>' | ||
}, | ||
files: { | ||
src: [ | ||
'assets/scripts.min.js' | ||
] | ||
} | ||
}, | ||
|
||
replace: { | ||
header: { | ||
src: [ | ||
'bootstrap-for-contact-form-7.php' | ||
], | ||
overwrite: true, | ||
replacements: [{ | ||
from: /((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/, | ||
to: '<%= pluginheader %>' | ||
}] | ||
}, | ||
version: { | ||
src: [ | ||
'bootstrap-for-contact-form-7.php', | ||
'modifications.php', | ||
'classes/*.php', | ||
'modules/*.php' | ||
], | ||
overwrite: true, | ||
replacements: [{ | ||
from: /\/\*\*\s+\*\s@package\s[^*]+\s+\*\s@version\s[^*]+\s+\*\s@author\s[^*]+\s\*\//, | ||
to: '<%= fileheader %>' | ||
}] | ||
} | ||
} | ||
replace: { | ||
header: { | ||
src: [ | ||
'bootstrap-for-contact-form-7.php' | ||
], | ||
overwrite: true, | ||
replacements: [{ | ||
from: /((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/, | ||
to: '<%= pluginheader %>' | ||
}] | ||
}, | ||
version: { | ||
src: [ | ||
'bootstrap-for-contact-form-7.php', | ||
'modifications.php', | ||
'classes/*.php', | ||
'modules/*.php' | ||
], | ||
overwrite: true, | ||
replacements: [{ | ||
from: /\/\*\*\s+\*\s@package\s[^*]+\s+\*\s@version\s[^*]+\s+\*\s@author\s[^*]+\s\*\//, | ||
to: '<%= fileheader %>' | ||
}] | ||
} | ||
}, | ||
|
||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-banner'); | ||
grunt.loadNpmTasks('grunt-text-replace'); | ||
makepot: { | ||
translation: { | ||
options: { | ||
mainFile: 'bootstrap-for-contact-form-7.php', | ||
domainPath: '/languages', | ||
exclude: [ 'vendor/.*' ], | ||
potComments: 'Copyright (c) 2014-<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>', | ||
potFilename: 'bootstrap-for-contact-form-7.pot', | ||
potHeaders: { | ||
'language-team': '<%= pkg.author.name %> <<%= pkg.author.email %>>', | ||
'last-translator': '<%= pkg.author.name %> <<%= pkg.author.email %>>', | ||
'project-id-version': '<%= pkg.name %> <%= pkg.version %>', | ||
'report-msgid-bugs-to': '<%= pkg.homepage %>', | ||
'x-generator': 'grunt-wp-i18n 0.5.3', | ||
'x-poedit-basepath': '.', | ||
'x-poedit-language': 'English', | ||
'x-poedit-country': 'UNITED STATES', | ||
'x-poedit-sourcecharset': 'uft-8', | ||
'x-poedit-keywordslist': '__;_e;_x:1,2c;_ex:1,2c;_n:1,2; _nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_attr__; esc_html__;esc_attr_e; esc_html_e;esc_attr_x:1,2c; esc_html_x:1,2c;', | ||
'x-poedit-bookmars': '', | ||
'x-poedit-searchpath-0': '.', | ||
'x-textdomain-support': 'yes' | ||
}, | ||
type: 'wp-plugin' | ||
} | ||
} | ||
} | ||
|
||
grunt.registerTask('scripts', [ | ||
'clean:scripts', | ||
'jshint', | ||
'uglify' | ||
]); | ||
}); | ||
|
||
grunt.registerTask('plugin', [ | ||
'usebanner', | ||
'replace:version', | ||
'replace:header' | ||
]); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-banner'); | ||
grunt.loadNpmTasks('grunt-text-replace'); | ||
grunt.loadNpmTasks('grunt-wp-i18n'); | ||
|
||
grunt.registerTask('default', [ | ||
'scripts' | ||
]); | ||
grunt.registerTask('scripts', [ | ||
'clean:scripts', | ||
'jshint', | ||
'uglify' | ||
]); | ||
|
||
grunt.registerTask('build', [ | ||
'scripts', | ||
'plugin' | ||
]); | ||
grunt.registerTask('translation', [ | ||
'clean:translation', | ||
'makepot:translation' | ||
]); | ||
|
||
grunt.registerTask('plugin', [ | ||
'usebanner', | ||
'replace:version', | ||
'replace:header' | ||
]); | ||
|
||
grunt.registerTask('default', [ | ||
'scripts' | ||
]); | ||
|
||
grunt.registerTask('build', [ | ||
'scripts', | ||
'translation', | ||
'plugin' | ||
]); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,21 @@ | |
Plugin Name: Bootstrap for Contact Form 7 | ||
Plugin URI: http://wordpress.org/plugins/bootstrap-for-contact-form-7/ | ||
Description: This plugin modifies the output of the popular Contact Form 7 plugin to be styled in compliance with themes using the Bootstrap CSS framework. | ||
Version: 1.2.3 | ||
Version: 1.2.4 | ||
Author: Felix Arntz | ||
Author URI: http://leaves-and-love.net | ||
License: GNU General Public License v2 | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
Text Domain: bootstrap-for-contact-form-7 | ||
Domain Path: /languages/ | ||
*/ | ||
/** | ||
* @package CF7BS | ||
* @version 1.2.3 | ||
* @version 1.2.4 | ||
* @author Felix Arntz <[email protected]> | ||
*/ | ||
|
||
define( 'CF7BS_VERSION', '1.2.3' ); | ||
define( 'CF7BS_VERSION', '1.2.4' ); | ||
define( 'CF7BS_MAINFILE', __FILE__ ); | ||
define( 'CF7BS_PATH', untrailingslashit( plugin_dir_path( CF7BS_MAINFILE ) ) ); | ||
define( 'CF7BS_URL', untrailingslashit( plugin_dir_url( CF7BS_MAINFILE ) ) ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @package CF7BS | ||
* @version 1.2.3 | ||
* @version 1.2.4 | ||
* @author Felix Arntz <[email protected]> | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @package CF7BS | ||
* @version 1.2.3 | ||
* @version 1.2.4 | ||
* @author Felix Arntz <[email protected]> | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @package CF7BS | ||
* @version 1.2.3 | ||
* @version 1.2.4 | ||
* @author Felix Arntz <[email protected]> | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @package CF7BS | ||
* @version 1.2.3 | ||
* @version 1.2.4 | ||
* @author Felix Arntz <[email protected]> | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/** | ||
* @package CF7BS | ||
* @version 1.2.3 | ||
* @version 1.2.4 | ||
* @author Felix Arntz <[email protected]> | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.