Skip to content

Commit

Permalink
Merge pull request #19 from weDevsOfficial/chore/build-process
Browse files Browse the repository at this point in the history
chore: release build process
  • Loading branch information
nurul-umbhiya authored Dec 21, 2020
2 parents 3eb03be + 0d7e5cb commit cdccc3c
Show file tree
Hide file tree
Showing 7 changed files with 2,689 additions and 1,530 deletions.
78 changes: 78 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,91 @@ module.exports = function(grunt) {
}
}
},

// Generate POT files.
makepot: {
target: {
options: {
domainPath: '/languages/', // Where to save the POT file.
potFilename: 'dokani.pot', // Name of the POT file.
type: 'wp-theme', // Type of project (wp-plugin or wp-theme).
potHeaders: {
'report-msgid-bugs-to': 'https://wedevs.com/support/forum/theme-support',
'language-team': 'LANGUAGE <EMAIL@ADDRESS>'
}
}
}
},

// Clean up build directory
clean: {
main: ['build/']
},

// Copy the theme into the build directory
copy: {
main: {
src: [
'**',
'!node_modules/**',
'!build/**',
'!bin/**',
'!.git/**',
'!Gruntfile.js',
'!package.json',
'!debug.log',
'!phpunit.xml',
'!.gitignore',
'!.gitmodules',
'!npm-debug.log',
'!assets/less/**',
'!tests/**',
'!**/Gruntfile.js',
'!**/package.json',
'!**/README.md',
'!**/export.sh',
'!**/*~'
],
dest: 'build/'
}
},

//Compress build directory into <name>.zip and <name>-<version>.zip
compress: {
main: {
options: {
mode: 'zip',
archive: './build/_release/dokani-theme-v'+ pkg.version + '.zip'
},
expand: true,
cwd: 'build/',
src: ['**/*'],
dest: 'dokani'
}
},
});

// Load NPM tasks to be used here
grunt.loadNpmTasks( 'grunt-wp-i18n' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-compress' );
grunt.loadNpmTasks( 'grunt-contrib-less' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );

grunt.registerTask( 'default', [
'watch',
]);


grunt.registerTask('release', [
'makepot',
'less'
]);

grunt.registerTask( 'zip', [
'clean',
'copy',
'compress'
]);
};
28 changes: 14 additions & 14 deletions assets/css/master.css

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

2 changes: 1 addition & 1 deletion assets/css/master.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions inc/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ function dokani_get_color_defaults() {
'store_header_title_color' => '#000000',
'store_header_link_color' => '#222222',
'store_header_link_hover_color' => '#f2624d',
'background_color' => '#efefef',
);

return apply_filters( 'dokani_color_option_defaults', $dokani_color_defaults );
Expand Down
Loading

0 comments on commit cdccc3c

Please sign in to comment.