Skip to content

Commit

Permalink
added initial files
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciuslizarte committed Jun 30, 2021
1 parent 1eb52a0 commit bc1096b
Show file tree
Hide file tree
Showing 60 changed files with 12,402 additions and 0 deletions.
135 changes: 135 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/*jshint node:true */
module.exports = function( grunt ) {
'use strict';

grunt.initConfig({

// Setting folder templates.
dirs: {
css: 'assets/css',
fonts: 'assets/fonts',
images: 'assets/images',
js: 'assets/js'
},

// Gets the package vars.
pkg: grunt.file.readJSON( 'package.json' ),

// Javascript linting with jshint.
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'<%= dirs.js %>/*.js',
'!<%= dirs.js %>/*.min.js'
]
},

// Minify .js files.
uglify: {
options: {
preserveComments: false
},
dist: {
files: [{
expand: true,
cwd: '<%= dirs.js %>/',
src: [
'*.js',
'!*.min.js'
],
dest: '<%= dirs.js %>/',
ext: '.min.js'
}]
}
},

// Minify all .css files.
cssmin: {
minify: {
expand: true,
cwd: '<%= dirs.css %>/',
src: [
'*.css',
'!*.min.css'
],
dest: '<%= dirs.css %>/',
ext: '.min.css'
}
},

// Watch changes for assets
watch: {
css: {
files: [
'<%= dirs.css %>/*.css',
'!<%= dirs.css %>/*.min.css'
],
tasks: ['cssmin']
},
js: {
files: [
'<%= dirs.js %>/*js',
'!<%= dirs.js %>/*.min.js'
],
tasks: ['jshint', 'uglify']
}
},

// Create .pot files
makepot: {
dist: {
options: {
type: 'wp-plugin'
}
}
},

// Check Text Domain
checktextdomain: {
options:{
text_domain: '<%= pkg.name %>',
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', // Include all files
'!node_modules/**' // Exclude node_modules/
],
expand: true
}
}
});

// Load tasks
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
grunt.loadNpmTasks( 'grunt-wp-i18n' );
grunt.loadNpmTasks( 'grunt-checktextdomain' );

// Register tasks
grunt.registerTask( 'default', [
'jshint',
'uglify',
'cssmin'
]);
};
Loading

1 comment on commit bc1096b

@tiagorodriguesdev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opa @viniciuslizarte beleza? Esse novo plugin tem alguma previsão para lançamento? Abraços

Please sign in to comment.