Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
seb86 committed Mar 28, 2019
0 parents commit 43cc1c1
Show file tree
Hide file tree
Showing 7 changed files with 823 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Grunt
/releases/
/node_modules/
npm-debug.log

# Various file types to ignore when exporting.
.DS_Store
Thumbs.db
*.sh
.gitconfig
*.zip
package-lock.json
175 changes: 175 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
module.exports = function(grunt) {
'use strict';

require('load-grunt-tasks')(grunt);

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

// Generate .pot file
makepot: {
target: {
options: {
type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
domainPath: 'languages', // Where to save the POT file.
mainFile: '<%= pkg.name %>.php', // Main project file.
potFilename: '<%= pkg.name %>.pot', // Name of the POT file.
potHeaders: {
'Report-Msgid-Bugs-To': 'https://github.com/autoloadnextpost/alnp-divi-support/issues',
'language-team': 'Sébastien Dumont <[email protected]>',
'language': 'en_US'
},
exclude: [
'releases',
'node_modules'
]
}
}
},

checktextdomain: {
options:{
text_domain: '<%= pkg.name %>', // Project text domain.
keywords: [
'__:1,2d',
'_e:1,2d',
'_x:1,2c,3d',
'esc_html__:1,2d',
'esc_html_e:1,2d',
'esc_html_x:1,2c,3d',
'esc_attr__:1,2d',
'esc_attr_e:1,2d',
'esc_attr_x:1,2c,3d',
'_ex:1,2c,3d',
'_n:1,2,4d',
'_nx:1,2,4c,5d',
'_n_noop:1,2,3d',
'_nx_noop:1,2,3c,4d'
]
},
files: {
src: [
'*.php',
'**/*.php', // Include all files
'!node_modules/**' // Exclude node_modules/
],
expand: true
},
},

potomo: {
dist: {
options: {
poDel: false
},
files: [{
expand: true,
cwd: 'languages',
src: ['*.po'],
dest: 'languages',
ext: '.mo',
nonull: false
}]
}
},

// Bump version numbers (replace with version in package.json)
replace: {
Version: {
src: [
'readme.txt',
'<%= pkg.name %>.php'
],
overwrite: true,
replacements: [
{
from: /Stable tag:.*$/m,
to: "Stable tag: <%= pkg.version %>"
},
{
from: /Version:.*$/m,
to: "Version: <%= pkg.version %>"
},
{
from: /public \$version = \'.*.'/m,
to: "public $version = '<%= pkg.version %>'"
}
]
}
},

// Copies the plugin to create deployable plugin.
copy: {
deploy: {
src: [
'**',
'!.*',
'!*.md',
'!.*/**',
'.htaccess',
'!Gruntfile.js',
'!package.json',
'!package-lock.json',
'!releases/**',
'!node_modules/**',
'!.DS_Store',
'!npm-debug.log',
'!*.sh',
'!*.zip',
'!*.jpg',
'!*.jpeg',
'!*.gif',
'!*.png'
],
dest: '<%= pkg.name %>',
expand: true,
dot: true
}
},

// Compresses the deployable plugin folder.
compress: {
zip: {
options: {
archive: './releases/<%= pkg.name %>-v<%= pkg.version %>.zip',
mode: 'zip'
},
files: [
{
expand: true,
cwd: './<%= pkg.name %>/',
src: '**',
dest: '<%= pkg.name %>'
}
]
}
},

// Deletes the deployable plugin folder once zipped up.
clean: [ '<%= pkg.name %>' ]
});

// Set the default grunt command to run test cases.
grunt.registerTask( 'default', [ 'test' ] );

// Checks for errors.
grunt.registerTask( 'test', [ 'checktextdomain' ]);

// Checks for errors, updates version and runs i18n tasks.
grunt.registerTask( 'dev', [ 'replace', 'makepot' ]);

/**
* Run i18n related tasks.
*
* This includes extracting translatable strings, updating the master pot file.
* If this is part of a deploy process, it should come before zipping everything up.
*/
grunt.registerTask( 'update-pot', [ 'checktextdomain', 'makepot' ]);

/**
* Creates a deployable plugin zipped up ready to upload
* and install on a WordPress installation.
*/
grunt.registerTask( 'zip', [ 'copy', 'compress', 'clean' ]);
};
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Auto Load Next Post: Divi Support

Provides theme support for Divi by Elegant Themes

###### Follow us

💻 [Website](https://autoloadnextpost.com) 🐦[Twitter](https://twitter.com/autoloadnxtpost)

## Requires

* Auto Load Next Post v1.5.0 or above.
* Divi Theme v3+

#### Installation 💽

1. Download a `.zip` file with the [latest version](https://github.com/autoloadnextpost/alnp-divi-support/releases).
2. Go to **WordPress Admin > Plugins > Add New**.
3. Click **Upload Plugin** at the top.
4. **Choose File** and select the `.zip` file you downloaded in **Step 1**.
5. Click **Install Now** and **Activate** the plugin.

#### Reporting Issues 📝

If you think you have found a bug in the plugin, please [open a new issue](https://github.com/autoloadnextpost/alnp-divi-support/issues/new) and I will do my best to help you out.

##### License

Auto Load Next Post: Divi Support is released under [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl-3.0.html).
Loading

0 comments on commit 43cc1c1

Please sign in to comment.