diff --git a/gruntfile.js b/gruntfile.js index 62f8777..9ae7d85 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -5,10 +5,10 @@ module.exports = function (grunt) { // Define files to include/exclude in the release package const distFiles = [ '**', // Include all files by default - '!artifacts/**', // Exclude build artifacts + '!artifacts/**', // Exclude release artifacts '!bin/**', // Exclude binary files '!bower_components/**', // Exclude Bower components - '!build/**', // Exclude build directory + '!release/**', // Exclude release directory '!node_modules/**', // Exclude Node.js modules '!packages/**', // Exclude packages directory '!**/node_modules/**', // Exclude nested Node.js modules @@ -40,21 +40,21 @@ module.exports = function (grunt) { grunt.initConfig({ pkg, - // Task to copy files to the build directory + // Task to copy files to the release directory copy: { main: { expand: true, src: distFiles, - dest: 'build/wordpress-plugin-boilerplate', + dest: 'release/wordpress-plugin-boilerplate', }, }, - // Task to compress the build directory into a zip file + // Task to compress the release directory into a zip file compress: { main: { options: { mode: 'zip', - archive: './build/wordpress-plugin-boilerplate-<%= pkg.version %>.zip', + archive: './release/wordpress-plugin-boilerplate-<%= pkg.version %>.zip', }, expand: true, src: distFiles, @@ -66,8 +66,8 @@ module.exports = function (grunt) { // Load all grunt tasks automatically require('load-grunt-tasks')(grunt); - // Register 'build' task to copy files and create a zip archive - grunt.registerTask('build', ['copy:main', 'compress']); + // Register 'release' task to copy files and create a zip archive + grunt.registerTask('release', ['copy:main', 'compress']); // Set linefeed style to Unix (LF) grunt.util.linefeed = '\n'; diff --git a/package.json b/package.json index 12676f7..4c67b30 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,13 @@ "autoprefixer": "^10.4.16", "eslint": "^8.52.0", "eslint-plugin-storybook": "^0.6.15", + "grunt": "^1.6.1", + "grunt-checktextdomain": "^1.0.1", + "grunt-contrib-clean": "^2.0.1", + "grunt-contrib-compress": "^2.0.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-wp-i18n": "^1.0.3", + "load-grunt-tasks": "^5.1.0", "npm-run-all": "^4.1.5", "postcss": "^8.4.31", "prettier": "npm:wp-prettier@^3.0.3-beta-4",