Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Merged in develop, fixed conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
ampersarnie committed Dec 10, 2018
2 parents 272090e + 1bad872 commit 3d559d5
Show file tree
Hide file tree
Showing 24 changed files with 150 additions and 177 deletions.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behaviour**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Developer console output (if applicable):**
If there are console errors relating to the bug, please include screenshot(s) or Gist here.

**Platform (please complete the following information):**
- OS: [e.g. OS X]
- Browser [e.g. chrome, safari]
- Version [e.g. 59]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[REQUEST] "
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Question
about: Ask a question
title: "[QUESTION] "
labels: question
assignees: ''

---

**Is your question related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm having difficulty with this feature [...]

**Additional context**
Add any other context, code snippets, or screenshots about your question here.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ $RECYCLE.BIN/

# Composer
composer.lock

# Production Assets
assets/scripts
assets/styles
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
sudo: false
language: php
cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.yarn"
- "./node_modules"
before_install:
- yarn
jobs:
include:
- stage: lint
php: 5.6
script:
- "./bin/lint.sh"
- stage: lint
php: 7.2
script:
- "./bin/lint.sh"
- stage: deploy
php: 7.2
script:
- "./bin/build.sh"
if: branch = master
deploy:
provider: releases
api_key:
secure: ZJk3Z638wSch+7E24kRcryHxKeb+kLQ4eb8FTPoGMeawXK8e34EbapXd5Cw0jnlG7Oi5lBVilmzXYqdjx/nA/nB2XRElXaveHGfKe77fRLDtbVxW1fkJiraQxy1FQ1shDmf1DqI/RtA95zvasqXjVNzf66dqSUmhGMu/Mdypn5RzoDz3wkpWExP+Jhw/zR+s957PYcNKXWCdvfyB6gq14ZHI5zuqrRcsPjnvGCTUW5AXFOhr1IxbdjICAo/n/s3RZluL5lvOsHRAdUBX/q32A5m2VRd5IvpRoBXnC/lfrfsvr2nGwi7LeLb/nNoX09Ysdcc1I6CQ6aS/RYJBbTcJbbLIn8GPZWWxfmzc59QqOmXLZVISRJk3b80Tgn++CxaI79qaIM0vB++AVsrBEXI6pVpSz3H4GcI6+9XJ2WvuYZknS4tkGypVvGA9gcStzjqdWmtlgotc1XhyuxKAKFJhxUdwil49CR/MKyRG6SDXK0AiSRfLhGzoqWE7HCAUcNpGk6N3cR/0ZPJszbYg2p7SmOLBdrzymlHjdeNtByKSxPU4usyXWiRsB2KlDTbISe+ByDSIXhazw4ZZOcAOxk+YQZhSuCuWQDyC7ca8AsU5lapLtWHZwydNbtKzlrOqvKpR5DovxpdJP8ir2qpSCBhhUc4yv3zPF8inUkQ84IMyCCc=
file: "../benenson.zip"
skip_cleanup: true
draft: true
on:
repo: bigbitecreative/benenson
1 change: 0 additions & 1 deletion assets/scripts/admin.js

This file was deleted.

2 changes: 0 additions & 2 deletions assets/scripts/array-reverse-polyfill.js

This file was deleted.

88 changes: 0 additions & 88 deletions assets/scripts/blocks.js

This file was deleted.

35 changes: 0 additions & 35 deletions assets/scripts/bundle.js

This file was deleted.

5 changes: 0 additions & 5 deletions assets/styles/app.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/styles/gutenberg.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/styles/print.css

This file was deleted.

16 changes: 16 additions & 0 deletions bin/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env sh

yarn && yarn build && zip -r ../benenson.zip . \
-x .\* \
-x CODE_OF_CONDUCT.md \
-x ISSUE_TEMPLATE.md \
-x bin/\* \
-x gulp/\* \
-x gulpfile.js \
-x node_modules/\* \
-x package.json \
-x phpcs.xml \
-x pull_request_template.md \
-x src/\* \
-x webpack.config.js \
-x yarn.lock
2 changes: 2 additions & 0 deletions bin/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
composer global require dealerdirect/phpcodesniffer-composer-installer wp-coding-standards/wpcs automattic/vipwpcs && yarn lint
2 changes: 1 addition & 1 deletion includes/blocks/header/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function benenson_render_header_block( array $attributes = [] ) {
'<div class="page-heroCta"><a class="btn" href="%s" data-modal-embed="%s"><i class="play-icon">%s</i>%s</a></div>',
esc_url( $attributes['ctaLink'] ),
esc_url( $attributes['embed'] ),
esc_html__( 'Play video', 'amnnesty' ),
esc_html__( 'Play video', 'benenson' ),
esc_html( $attributes['ctaText'] )
);
}
Expand Down
14 changes: 9 additions & 5 deletions includes/scripts-and-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ function benenson_gutenberg_assets() {
'wp-data',
], true, false );

wp_add_inline_script(
'benenson-blocks-js',
sprintf( "wp.i18n.setLocaleData(%s, 'benenson')", wp_json_encode( gutenberg_get_jed_locale_data( 'benenson' ) ) ),
'before'
);
if ( function_exists( 'gutenberg_get_jed_locale_data' ) ) {
wp_add_inline_script(
'benenson-blocks-js',
sprintf( "wp.i18n.setLocaleData(%s, 'benenson')", wp_json_encode( gutenberg_get_jed_locale_data( 'benenson' ) ) ),
'before'
);
} elseif ( function_exists( 'wp_set_script_translations' ) ) {
wp_set_script_translations( 'benenson-blocks-js', 'benenson' );
}

wp_enqueue_style( 'benenson-gutenberg', benenson_asset_uri( 'styles' ) . '/gutenberg.css', [ 'wp-block-library-theme' ], '1', 'all' );
}
Expand Down
2 changes: 1 addition & 1 deletion languages/benenson.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Benenson\n"
"POT-Creation-Date: 2018-12-06 16:24+0000\n"
"PO-Revision-Date: 2018-12-06 16:23+0000\n"
"POT-Creation-Date: 2018-12-07 13:48+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@
"webpack": "^3.6.0"
},
"scripts": {
"lint": "yarn lint-scripts && yarn lint-styles && yarn lint-php",
"lint-php": "$(composer config -g home)/vendor/bin/phpcs .",
"lint-scripts": "./node_modules/.bin/eslint ./src/",
"lint-styles": "./node_modules/.bin/stylelint \"src/**/*.scss\"",
"test": "./node_modules/.bin/jest",
"build": "[[ ! $NODE_ENV ]] && NODE_ENV='production' && export NODE_ENV; gulp --production",
"watch": "[[ ! $NODE_ENV ]] && NODE_ENV='production' && export NODE_ENV; gulp watch --production",
"build": "export \"${NODE_ENV:-production}\"; gulp --production",
"watch": "export \"${NODE_ENV:-production}\"; gulp watch --production",
"lang": "npx pot-to-php block-languages/benenson-blocks.pot includes/block-translations.php benenson"
},
"jest": {
Expand Down
10 changes: 5 additions & 5 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Fixes #

## Proposed Changes
-
-
-

-
-
-
## Linked Issues
- Fixes #
10 changes: 1 addition & 9 deletions src/scripts/__tests__/App.spec.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import App from '../App';
import Attribution from '../modules/Attribution';

// Mock the module calls.
jest.mock('../modules/Attribution', () => jest.fn());
import App from '../app';

describe('App', () => {
beforeAll(() => {
App();
});

test('Attribution has been called', () => {
expect(Attribution.mock.calls.length).toBe(1);
});
});
File renamed without changes.
18 changes: 0 additions & 18 deletions src/scripts/modules/__tests__/Attribution.spec.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/static/scripts/array-reverse-polyfill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
Theme Name: Benenson
Theme URI: https://bigbitecreative.com
Description: Benenson Theme
Version: 1.0.1
Version: 1.0.2
Author: Big Bite Creative
Author URI: https://bigbitecreative.com
Text Domain: benenson
Domain Path: /languages
Domain Path: /languages
License: GNU General Public License v3
License URI: LICENSE
*/

0 comments on commit 3d559d5

Please sign in to comment.