-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
16,070 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"useBuiltIns": "entry", | ||
"corejs": 3 | ||
} | ||
], | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-proposal-class-properties" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
last 2 versions | ||
> 1% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.php] | ||
indent_size = 4 | ||
|
||
[*.scss] | ||
indent_size = 2 | ||
|
||
[*.js] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module.exports ={ | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: "module" | ||
}, | ||
plugins: [ | ||
"@typescript-eslint", | ||
"import" | ||
], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env : { | ||
amd: true, | ||
node: true, | ||
es2020: true, | ||
browser: true, | ||
jquery: true | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
"import/no-dynamic-require": 2, | ||
"no-console": 0, | ||
"quotes": ["error", "single"], | ||
"comma-dangle": [ | ||
"error", { | ||
"arrays": "always-multiline", | ||
"objects": "always-multiline", | ||
"imports": "always-multiline", | ||
"exports": "always-multiline", | ||
"functions": "ignore" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.* @seebeen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and release | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- '!.wordpress-org/**' | ||
- '!.github/workflows/wp-deploy.yml' | ||
- '!.github/workflows/wp-assets.yml' | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2.4.0 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
- name: Cache Composer dependencies | ||
uses: actions/cache@v2.1.6 | ||
with: | ||
path: /tmp/composer-cache | ||
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install composer dependencies | ||
uses: php-actions/composer@v6 | ||
with: | ||
php_version: 7.4 | ||
version: 2 | ||
dev: no | ||
quiet: yes | ||
args: --optimize-autoloader --classmap-authoritative --prefer-dist | ||
- name: Install Yarn dependencies | ||
run: yarn install | ||
- name: Lint | ||
run: yarn lint | ||
- name: Build | ||
run: "yarn build:production" | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: yarn run release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.cache-loader | ||
.vscode | ||
config/modules.php | ||
dist | ||
node_modules | ||
vendor | ||
studio.json | ||
yarn-error.log | ||
*.zip | ||
|
||
.yarn/* | ||
!.yarn/cache | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create(); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
return $config->setRules([ | ||
'@PSR12' => true, | ||
// 'strict_param' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'braces' => [ | ||
'allow_single_line_closure' => true, | ||
'position_after_functions_and_oop_constructs' => 'same' | ||
], | ||
]) | ||
->setFinder($finder) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"printWidth": 150, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"branches": ["master", "next"], | ||
"plugins": [ | ||
["@semantic-release/changelog", { | ||
"changelogFile": "CHANGELOG.md" | ||
}], | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/exec", { | ||
"prepareCmd": "sh ./assets/build/release.sh ${nextRelease.version}" | ||
}], | ||
["@semantic-release/git", { | ||
"assets": [ | ||
"CHANGELOG.md", "serbian-addons-for-woocommerce.php", ".wordpress-org/readme.txt" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
}], | ||
["@semantic-release/github", { | ||
"assets": [{ | ||
"path": "/tmp/release.zip", | ||
"name": "serbian-addons-for-woocommerce-${nextRelease.version}.zip", | ||
"label": "Version ${nextRelease.version}" | ||
}] | ||
}] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = { | ||
// overrides: [ | ||
// { | ||
// files: ['assets/styles/**/*.scss'], | ||
// customSyntax: 'postcss-scss', | ||
// }, | ||
// ], | ||
extends: 'stylelint-config-standard-scss', | ||
ignoreFiles: ['**/*.js', 'dist/**/*.css'], | ||
ignore: ['no-descending-specificity', 'selectors-within-list'], | ||
rules: { | ||
'selector-id-pattern': null, | ||
'color-function-notation': 'legacy', | ||
'scss/dollar-variable-pattern': null, | ||
'selector-class-pattern': null, | ||
'no-descending-specificity': null, | ||
'no-empty-source': null, | ||
'string-quotes': 'double', | ||
'value-keyword-case': [ | ||
'lower', | ||
{ | ||
ignoreKeywords: ['BlinkMacSystemFont'], | ||
ignoreProperties: ['$main_font_family', '$font-family-base'], | ||
}, | ||
], | ||
'no-invalid-position-at-import-rule': null, | ||
'at-rule-no-unknown': [ | ||
true, | ||
{ | ||
ignoreAtRules: [ | ||
'use', | ||
'extend', | ||
'at-root', | ||
'debug', | ||
'warn', | ||
'error', | ||
'if', | ||
'else', | ||
'for', | ||
'each', | ||
'while', | ||
'mixin', | ||
'include', | ||
'content', | ||
'return', | ||
'function', | ||
'tailwind', | ||
'apply', | ||
'responsive', | ||
'variants', | ||
'screen', | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Name: Serbian Addons for WooCommerce | ||
Contributors: oblakstudio, seebeen | ||
Donate link: https://srbizasrbe.org | ||
Tags: serbia, woocommerce, woocommerce-serbia | ||
Requires at least: 5.6 | ||
Tested up to: 5.8 | ||
Requires PHP: 7.2 | ||
Stable tag: 1.0.0 | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
Serbian addons for WooCommerce adds various fixes and tweaks to make WooCommerce fully compatible with Serbian Bureaucracy and Accounting | ||
|
||
== Description == | ||
|
||
Serbian addons extend Woocommerce to technically match specific Serbian legal and accounting conditions. | ||
The main objective of this plugin is to adapt WooCommerce to speficic requirements of Serbian market. | ||
Secondary objective is to make life easier for owners and administrators of Serbian WooCommerce stores, by adding quality-of-life tweaks. | ||
|
||
### Features | ||
|
||
* Customer types - persons and companies | ||
* Additional fields for company number and tax number | ||
* Remove unneeded fields in Serbia (Address 2 and State) | ||
* Company fields are automatically hidden when purchasing as a person | ||
* Disallow specific customer types from making orders | ||
* Company fields are automatically displayed in user account, administration and order e-mails | ||
* Transliterate currency symbol | ||
* Lightweight - Plugin uses optimized autoloader, and minified assets | ||
|
||
*WooCommerce logo used with permission* | ||
|
||
== Installation == | ||
|
||
1. Upload serbian-addons-for-woocommerce.zip to plugins via WordPress admin panel, or upload unzipped folder to your plugins folder | ||
2. Activate the plugin through the "Plugins" menu in WordPress | ||
3. Go to WooCommerce->Settings to manage the options | ||
|
||
== Frequently Asked Questions == | ||
|
||
= Can I make a B2B system by limiting customer type to companies = | ||
|
||
Yes, you can | ||
|
||
== Screenshots == | ||
|
||
1. Plugins settings | ||
|
||
2. Modified Billing fields | ||
|
||
3. Properly formatted billing address in user account | ||
|
||
4. Company name displayed in admin order table | ||
|
||
5. Properly formatted billing address when viewing order as admin | ||
|
||
== Changelog == | ||
|
||
You can view the full changelog on [Github](https://github.com/oblakstudio/serbian-addons-for-woocommerce) | ||
|
||
= 1.0.0 = | ||
Initial Release | ||
|
||
== Upgrade Notice == | ||
|
||
None so far |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
yarnPath: .yarn/releases/yarn-3.1.1.cjs | ||
nodeLinker: node-modules | ||
logFilters: | ||
- code: 'YN0061' | ||
level: discard | ||
- code: 'YN0032' | ||
level: discard | ||
networkConcurrency: 100 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const path = require('path'); | ||
const { argv } = require('yargs'); | ||
const { merge } = require('webpack-merge'); | ||
|
||
// eslint-disable-next-line import/no-dynamic-require | ||
const userConfig = require('../../wpwp.config.js'); | ||
const nodeVersion = process.versions.node.split('.')[0]; | ||
const isProduction = !!((argv.env && argv.env == 'production') || argv.p); | ||
const rootPath = userConfig.paths && userConfig.paths.root ? userConfig.paths.root : process.cwd(); | ||
|
||
const wpwpConfig = merge( | ||
{ | ||
useFibers: nodeVersion != 16 ? true : false, | ||
open: true, | ||
copy: 'images/**/*', | ||
cacheBusting: userConfig.cacheBusting, | ||
externals: userConfig.externals, | ||
paths: { | ||
root: rootPath, | ||
assets: path.join(rootPath, 'assets'), | ||
dist: path.join(rootPath, 'dist'), | ||
}, | ||
enabled: { | ||
sourceMaps: true, //!isProduction, | ||
optimize: isProduction, | ||
cacheBusting: isProduction, | ||
watcher: !!argv.watch, | ||
linter: userConfig.lintOnBuild, | ||
}, | ||
watch: [], | ||
}, | ||
userConfig, | ||
); | ||
|
||
module.exports = merge(wpwpConfig, { | ||
env: Object.assign({ production: isProduction, development: !isProduction }, argv.env), | ||
publicPath: `${wpwpConfig.publicPath}/${path.basename(wpwpConfig.paths.dist)}/`, | ||
manifest: {}, | ||
}); | ||
|
||
if (process.env.NODE_ENV === undefined) { | ||
process.env.NODE_ENV = isProduction ? 'production' : 'development'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
plugins: [ | ||
require('autoprefixer'), | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#/bin/bash | ||
|
||
PROJECT_NAME="serbian-addons-for-woocommerce" | ||
NEXT_VERSION=$1 | ||
CURRENT_VERSION=$(cat $PROJECT_NAME.php | grep "Version" | head -1 | awk -F= "{ print $2 }" | sed 's/[* Version:,\",]//g' | tr -d '[[:space:]]') | ||
|
||
sed -i "s/Version: $CURRENT_VERSION/Version: $NEXT_VERSION/g" serbian-addons-for-woocommerce.php | ||
sed -i "/Stable Tag: $CURRENT_VERSION/Stable Tag: $NEXT_VERSION/g" .wordpress-org/readme.txt | ||
|
||
rm -f /tmp/release.zip | ||
mkdir /tmp/$PROJECT_NAME | ||
cp -ar config dist languages lib vendor ./*.php loco.xml /tmp/$PROJECT_NAME 2>/dev/null | ||
cp ./.wordpress-org/readme.txt /tmp/$PROJECT_NAME 2>/dev/null | ||
|
||
cd /tmp | ||
zip -qr /tmp/release.zip ./*.php $PROJECT_NAME |
Oops, something went wrong.