HELLO v3!!!

This commit is contained in:
Ryan Dewhurst
2018-09-26 21:12:01 +02:00
parent 28b9c15256
commit d268a86795
1871 changed files with 988118 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
{
"package": "Woo Variation Swatches",
"name": "woo-variation-swatches",
"version": "1.0.0",
"author": "Emran Ahmed <emran.bd.08@gmail.com>",
"contact": "emran.bd.08@gmail.com",
"license": "GNU General Public License v3",
"private": true,
"scripts": {
"webpack": "cross-env NODE_ENV=development node_modules/.bin/webpack --progress --hide-modules --config=node_modules/wp-mix/setup/webpack.config.js",
"dev": "npm run webpack -- --watch",
"build": "cross-env NODE_ENV=production node_modules/.bin/webpack --progress --hide-modules --config=node_modules/wp-mix/setup/webpack.config.js",
"bundle": "npm run webpack && npm run build",
"package:bundle": "cross-env NODE_ENV=package node_modules/.bin/webpack --progress --hide-modules --config=node_modules/wp-mix/setup/webpack.config.js",
"package": "npm run bundle && npm run package:bundle"
},
"devDependencies": {
"cli-color": "^1.2.0",
"emojic": "^1.1.12",
"extend": "^3.0.1",
"fs-extra": "^5.0.0",
"sanitize-html": "^1.16.3",
"sprintf-js": "^1.1.1"
},
"dependencies": {
"wp-mix": "^1.0.5"
}
}

View File

@@ -0,0 +1,81 @@
const mix = require('wp-mix');
const fsExtra = require("fs-extra");
const path = require("path");
const cliColor = require("cli-color");
const emojic = require("emojic");
const min = Mix.inProduction() ? '.min' : '';
const PackageFile = JSON.parse(File.find(Mix.paths.root('package.json')).read());
if (process.env.NODE_ENV === 'package') {
mix.then(function () {
let bundledir = path.basename(path.resolve(__dirname));
let copyfrom = path.resolve(__dirname);
let copyto = path.resolve(`${bundledir}`);
// Select All file then paste on list
let list = `assets
woo-variation-swatches.php
images
includes
languages
package.json
README.txt
uninstall.php
webpack.mix.js`;
let includes = list.split("\n");
fsExtra.ensureDir(copyto, function (err) {
if (err) return console.error(err)
includes.map(include => {
fsExtra.copy(`${copyfrom}/${include}`, `${copyto}/${include}`, function (err) {
if (err) return console.error(err)
console.log(cliColor.white(`=> ${emojic.smiley} ${include} copied...`));
/*if (include == 'assets') {
// Just Removed SCSS Dir
fsExtra.removeSync(`${copyto}/${include}/scss`);
}*/
})
});
console.log(cliColor.white(`=> ${emojic.whiteCheckMark} Build directory created`));
})
});
return;
}
if (Mix.inProduction()) {
mix.generatePot({
package : 'WooCommerce Variation Swatches',
bugReport : 'https://github.com/EmranAhmed/woo-variation-swatches/issues',
src : '**/*.php',
domain : 'woo-variation-swatches',
destFile : `languages/woo-variation-swatches.pot`
});
}
mix.banner({
banner : "WooCommerce Variation Swatches v1.0.10 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
});
mix.notification({
title : 'WooCommerce Variation Swatches',
// contentImage : Mix.paths.root('images/logo.png')
});
if (!Mix.inProduction()) {
mix.sourceMaps();
}
mix.js(`src/js/backend.js`, `assets/js/admin${min}.js`);
mix.js(`src/js/frontend.js`, `assets/js/frontend${min}.js`);
mix.babel(`src/js/FormFieldDependency.js`, `assets/js/form-field-dependency${min}.js`);
mix.sass(`src/scss/backend.scss`, `assets/css/admin${min}.css`);
mix.sass(`src/scss/frontend.scss`, `assets/css/frontend${min}.css`);
mix.sass(`src/scss/tooltip.scss`, `assets/css/frontend-tooltip${min}.css`);

View File

@@ -0,0 +1,8 @@
/*!
* WooCommerce Variation Swatches v1.0.10
*
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
* Date: 2018-2-22 21:58:22
* Released under the GPLv3 license.
*/
.button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;-webkit-box-shadow:0 1px 0 #a72d2b;box-shadow:0 1px 0 #a72d2b;vertical-align:top}.button.button-danger.active,.button.button-danger:active,.button.button-danger:focus,.button.button-danger:hover{color:#fff;background:#c9302c}[data-depends]{display:none}.meta-image-field-wrapper{display:table}.meta-image-field-wrapper .button{margin:5px 0;display:block}.meta-image-field-wrapper .image-preview{display:table-cell;width:60px;padding-right:10px}.meta-image-field-wrapper .button-wrapper{display:table-cell;vertical-align:top}.gwp-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.gwp-rate-stars svg,.gwp-rate-stars svg a{fill:#ffb900;stroke:#ffb900;cursor:pointer}.gwp-rate-stars svg:hover,.gwp-rate-stars svg a:hover{fill:#ffb900}.gwp-rate-stars svg:hover~svg,.gwp-rate-stars svg:hover~svg a,.gwp-rate-stars svg a:hover~svg,.gwp-rate-stars svg a:hover~svg a{fill:none}