Skip to content

Commit

Permalink
Merge pull request #1 from arl1nd/dev
Browse files Browse the repository at this point in the history
Dev merge
  • Loading branch information
arl1nd authored Apr 29, 2020
2 parents 53f65c7 + e339b7b commit 86aac4a
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
*/custom-skin.css
package-lock.json
71 changes: 71 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
module.exports = function ( grunt ) {
let compress = {},
clean = {},
compressDirs = [
'',
'agency',
'architecture',
'automotive',
'blogging',
'bookstore',
'construction',
'education',
'fashion',
'fitness',
'freelancer',
'hotel',
'landing',
'law',
'main',
'medical',
'photgraphy',
'restaurant',
'shop',
'travel',
'wedding',
];

for ( let name of compressDirs ) {
let taskName = name ? name : 'child',
dirName = `kalium-child-${name}`;

if ( '' === name ) {
dirName = 'kalium-child';
}

// Clean
clean[ taskName ] = [`${dirName}.zip`];

// Compress
compress[ taskName ] = {
options: {
archive: `${dirName}.zip`,
},
files: [
{
src: [`${dirName}/**`],
}
],
};
}

grunt.initConfig( {
compress: compress,
clean: clean,
} );

grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-compress' );

grunt.registerTask( 'default', [
'clean',
'compress',
] );

grunt.registerTask( 'zip', function ( childTheme ) {
if ( compress.hasOwnProperty( childTheme ) ) {
// console.log( `clean:${childTheme}`, `compress:${childTheme}` )
grunt.task.run( [`clean:${childTheme}`, `compress:${childTheme}`] );
}
} );
}
1 change: 0 additions & 1 deletion kalium-child-bookstore/custom-skin.css

This file was deleted.

28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "kalium-child-themes",
"version": "1.0.0",
"description": "Kalium Child Themes repository",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/arl1nd/kalium-child-themes.git"
},
"keywords": [
"kalium",
"wordpress"
],
"author": "Laborator",
"license": "ISC",
"bugs": {
"url": "https://github.com/arl1nd/kalium-child-themes/issues"
},
"homepage": "https://github.com/arl1nd/kalium-child-themes#readme",
"devDependencies": {
"grunt": "^1.1.0",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-compress": "^1.6.0"
}
}

0 comments on commit 86aac4a

Please sign in to comment.