Skip to content

Commit 23b5618

Browse files
authored
Merge pull request #6 from michaelbragg/dev
Dev
2 parents b5967ae + 2ce3d34 commit 23b5618

22 files changed

+10821
-308
lines changed

.travis.yml

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,63 @@
11
sudo: false
2-
32
notifications:
43
on_success: change
54
on_failure: always
6-
7-
# Cache Composer's caches to speed up build times.
85
cache:
96
apt: true
107
directories:
11-
- node_modules
12-
- vendor
13-
- $HOME/.composer/cache
14-
8+
- node_modules
9+
- vendor
10+
- "$HOME/.composer/cache"
1511
language:
16-
- php
17-
18-
matrix:
19-
include:
20-
- php: nightly
21-
env: WP_VERSION=master WP_MULTISITE=0
22-
- php: 7.1
23-
env: WP_VERSION=4.8-branch WP_MULTISITE=0
24-
- php: 7.0
25-
env: WP_VERSION=4.8-branch WP_MULTISITE=0
26-
- php: 5.6
27-
env: WP_VERSION=4.8-branch WP_MULTISITE=0
28-
allow_failures:
29-
- php: nightly
12+
- php
13+
jobs:
3014
fast_finish: true
15+
allow_failures:
16+
- php: nightly
17+
include:
18+
- php: nightly
19+
env: WP_VERSION=master WP_MULTISITE=0
20+
- php: 7.1
21+
env: WP_VERSION=4.8-branch WP_MULTISITE=0 SNIFF=1
22+
- php: 7.0
23+
env: WP_VERSION=4.8-branch WP_MULTISITE=0
24+
- php: 5.6
25+
env: WP_VERSION=4.8-branch WP_MULTISITE=0
26+
- stage: deployment
27+
install: npm install
28+
before_script: skip
29+
script: npm run build
30+
deploy:
31+
provider: releases
32+
api_key:
33+
secure: eKvDiB+VpF15OqWsVCd+HgZDzsLiUOshVk3VSBv4VlzMycDBCsLsxDBgqzSImrZZcKz4aSiFuV9OA/ccenh4/rPdPTiUp9527fLmyjur3SnxxkJs3vKE/sHSYByH3xG+Mt8KMW6eciSU7M7cuhTUF8tVXybqBN97A8168v7b6gLYON/AQ0fhvcrK/XYqAfmKBMd6xjui3DsVQ/KDq6IHlIiRQQmZpaug9Nh/DHDp8YEx5ek2Kzjk5sQiejFmbdw037h7Y+TNOMtWXLK2HT3QNl8UTwhNHpDVzv5bcLBYlyPRUQoDNCx33rUHYTyB0113vXxCMEET9pYWtM7qQM5NYgbBhoY2c9IP3MTIaRKlgYDh17i6SMAKmT1PbQA3KNXsSJTQE0nsC84GH/qvwQ00/x7SlFxWaWI0MfHsi2wF0GcGrXIflVq0KS76ihq6rf3AI3OlfMAcFLVHV7UFLujCASVNqbISxeLEiXM6HV19eWPl9aId95wDWt+XmcojP588XKqb1eInL2ZLcCRY0yfMZg4ttusD39fN1VnJpaY7skfmQp2TKplWPfjX/nU1g4epwFK/MbXh6rLXL1yh8g3EjgyWeKMCyJrTELIo4m+SobC2kjcYmsrHrDfiNZeGWudOsS24OfCusi/wd4yOqXQfiM7bcTFPZ7IKwJ2Y0KItMpg=
34+
file: "*"
35+
skip_cleanup: true
36+
on:
37+
repo: michaelbragg/published
38+
tags: true
3139

3240
before_install:
33-
- phpenv config-rm xdebug.ini
34-
- nvm install 6.11
35-
41+
- phpenv config-rm xdebug.ini
42+
- nvm install 6.11
43+
install:
44+
- if [[ "$SNIFF" == "1" ]]; then npm install; fi
3645
before_script:
37-
# Set up WordPress installation.
38-
- export WP_DEVELOP_DIR=/tmp/wordpress
39-
- mkdir -p $WP_DEVELOP_DIR
40-
# Use the Git mirror of WordPress.
41-
- git clone --depth=1 --branch="$WP_VERSION" https://github.com/WordPress/WordPress.git $WP_DEVELOP_DIR
42-
# Move plugin to WordPress directory.
43-
- export WP_THEME_SLUG=$(basename $(pwd))
44-
- export WP_THEME_DIR=$WP_DEVELOP_DIR/wp-content/themes
45-
- mkdir -p $WP_THEME_DIR
46-
# Move above our WordPress directory.
47-
- cd ..
48-
- mv $WP_THEME_SLUG $WP_THEME_DIR
49-
# Setup WordPress
50-
- mysql -e "CREATE DATABASE wordpress;" -uroot
51-
# Install composer packages before trying to activate themes or plugins
52-
- composer require thoughtsideas/ti-wpcs:dev-develop
53-
- vendor/bin/phpcs --config-set default_standard TI-WPCS
54-
46+
- export WP_DEVELOP_DIR=/tmp/wordpress
47+
- mkdir -p $WP_DEVELOP_DIR
48+
- git clone --depth=1 --branch="$WP_VERSION" https://github.com/WordPress/WordPress.git
49+
$WP_DEVELOP_DIR
50+
- export WP_THEME_SLUG=$(basename $(pwd))
51+
- export WP_THEME_DIR=$WP_DEVELOP_DIR/wp-content/themes
52+
- mkdir -p $WP_THEME_DIR
53+
- cd ..
54+
- mv $WP_THEME_SLUG $WP_THEME_DIR
55+
- mysql -e "CREATE DATABASE wordpress;" -uroot
56+
- if [[ "$SNIFF" == "1" ]]; then composer require thoughtsideas/ti-wpcs:^1.1.1; fi
5557
script:
56-
- ./vendor/bin/phpcs $WP_THEME_DIR/$WP_THEME_SLUG/
57-
- ./vendor/bin/phpmd $WP_THEME_DIR/$WP_THEME_SLUG/ text ./vendor/thoughtsideas/ti-wpcs/TI-WPMD/ruleset.xml
58+
- if [[ "$SNIFF" == "1" ]]; then ./vendor/bin/phpcs $WP_THEME_DIR/$WP_THEME_SLUG/
59+
--standard=$WP_THEME_DIR/$WP_THEME_SLUG/phpcs.xml; fi
60+
- if [[ "$SNIFF" == "1" ]]; then ./vendor/bin/phpmd $WP_THEME_DIR/$WP_THEME_SLUG/
61+
text ./vendor/thoughtsideas/ti-wpcs/TI-WPMD/ruleset.xml; fi
62+
- if [[ "$SNIFF" == "1" ]]; then npm run build --prefix $WP_THEME_DIR/$WP_THEME_SLUG/;
63+
fi

_scripts/qa

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,26 @@ composer run test-phpmd
1414
# PHPMD Results (bool)
1515
QA_PHPMD=$?
1616

17+
echo "Running WordPress PHP Copy Paste Detector test"
18+
composer run test-phpcpd
19+
# PHPCPD Results (bool)
20+
QA_PHPCPD=$?
21+
22+
echo "Running WordPress PHP Security Checker test"
23+
composer run test-phpsc
24+
# PHPSC Results (bool)
25+
QA_PHPSC=$?
26+
27+
echo "Running WordPress PHP Magic Number Detector test"
28+
composer run test-phpmnd
29+
# PHPMND Results (bool)
30+
QA_PHPMND=$?
31+
1732
[ $QA_PHPCS -ne 0 ] && exit 1
1833
[ $QA_PHPMD -ne 0 ] && exit 1
34+
[ $QA_PHPCPD -ne 0 ] && exit 1
35+
[ $QA_PHPSC -ne 0 ] && exit 1
36+
[ $QA_PHPMND -ne 0 ] && exit 1
1937

2038
# If test pass exit successfully.
2139
exit 0

_tests/stylelint.config.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = {
3333
"function-url-quotes": "always",
3434
"function-whitespace-after": "always",
3535
"number-leading-zero": "always",
36-
"number-max-precision": 4,
36+
"number-max-precision": [4,{"severity": "warning"}],
3737
"number-no-trailing-zeros": true,
3838
"string-no-newline": true,
3939
"string-quotes": "single",
@@ -143,7 +143,10 @@ module.exports = {
143143
"after-comment",
144144
"inside-block"
145145
],
146-
"ignoreAtRules": [ "else" ]
146+
"ignoreAtRules": [
147+
"else",
148+
"media"
149+
]
147150
}
148151
],
149152
"at-rule-blacklist": [ "debug" ],
@@ -196,15 +199,25 @@ module.exports = {
196199
"no-descending-specificity": true,
197200
"no-duplicate-selectors": true,
198201
"no-empty-source": true,
199-
"no-eol-whitespace": true,
202+
"no-eol-whitespace": [
203+
true,
204+
{
205+
ignore: ["empty-lines"]
206+
}
207+
],
200208
"no-extra-semicolons": true,
201209
"no-missing-end-of-source-newline": true,
202210
"no-unknown-animations": true,
203211
"plugin/no-unsupported-browser-features": [
204-
true,
205-
{
206-
"severity": "warning"
207-
}
212+
true,
213+
{
214+
"severity": "warning",
215+
"browsers": [
216+
"> 5%",
217+
"last 2 versions",
218+
"not ie 10"
219+
]
220+
}
208221
]
209222
}
210223
}
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
/* ==========================================================================
2+
Component #Articles
3+
4+
@package @TODO
5+
@subpackage Component\Articles
6+
@version 1.0.0
7+
@author Thoughts & Ideas <[email protected]>
8+
@url https://www.thoughtsideas.uk/
9+
@copyright Copyright (c) 2017 Thoughts & Ideas
10+
@license https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
11+
@link @TODO
12+
========================================================================== */
13+
14+
.s-article {
15+
margin-bottom: 5rem;
16+
}
17+
18+
/* Article Links
19+
*
20+
* Applying link properties to the article scope stops interferance with links
21+
* used in other areas of the site.
22+
========================================================================== */
23+
24+
.s-article a:link {
25+
border-bottom: 1pt solid currentColor;
26+
color: #af1e23;
27+
}
28+
29+
.s-article a:visited {
30+
color: #af1e23;
31+
}
32+
33+
.s-article a:focus,
34+
.s-article a:hover {
35+
background: #ffe3d9;
36+
}
37+
38+
.s-article a:active {
39+
border-bottom: 1pt solid #af1e23;
40+
background: #af1e23;
41+
color: #ffe3d9;
42+
}
43+
44+
/* Article Header
45+
========================================================================== */
46+
.s-article > header {
47+
margin-bottom: 96px;
48+
text-align: center;
49+
}
50+
51+
.s-article .c-byline a:link,
52+
.s-article .c-byline a:visited,
53+
.s-article .c-heading--headline a:link,
54+
.s-article .c-heading--headline a:visited {
55+
border-bottom: 0;
56+
color: #2f2a2a;
57+
}
58+
59+
/* Article Copy
60+
========================================================================== */
61+
62+
.s-article > p + h2 {
63+
margin-top: 36px;
64+
}
65+
66+
.s-article > p + h3 {
67+
margin-top: 24px;
68+
margin-bottom: 12px;
69+
}
70+
71+
.s-article > p + ol,
72+
.s-article > p + ul,
73+
.s-article > p + dl {
74+
margin-top: 24px;
75+
margin-bottom: 12px;
76+
}
77+
78+
.s-article > p {
79+
margin-top: 0;
80+
margin-bottom: 0;
81+
}
82+
83+
.s-article > p + p,
84+
.s-article > .o-media--float-right + p,
85+
.s-article > .o-media--float-left + p {
86+
text-indent: 2em;
87+
}
88+
89+
.s-article > header + p:first-of-type,
90+
.s-article > figure + p:first-of-type {
91+
font-size: 1.4375em;
92+
line-height: 1.3043478261;
93+
}
94+
95+
.s-article > p + .o-media {
96+
margin-top: 24px;
97+
margin-bottom: 24px;
98+
}
99+
100+
.s-article > ol,
101+
.s-article > ul {
102+
padding-left: 0;
103+
list-style-position: outside;
104+
}
105+
106+
/* Article Blockquote
107+
========================================================================== */
108+
109+
.s-article > .o-blockquote {
110+
position: relative;
111+
font-family:
112+
'Karmina Sans',
113+
karmina-sans,
114+
-apple-system,
115+
blinkmacsystemfont,
116+
'Segoe UI',
117+
roboto,
118+
helvetica,
119+
arial,
120+
sans-serif;
121+
font-size: 2.4em;
122+
line-height: 1.5;
123+
font-style: italic;
124+
}
125+
126+
.s-article > .o-blockquote::before {
127+
content: '\201C';
128+
position: absolute;
129+
top: -0.1em;
130+
left: -0.15em;
131+
color: #e7e6e4;
132+
font-family:
133+
'Karmina Sans',
134+
karmina-sans,
135+
-apple-system,
136+
blinkmacsystemfont,
137+
'Segoe UI',
138+
roboto,
139+
helvetica,
140+
arial,
141+
sans-serif;
142+
font-size: 6em;
143+
line-height: 1;
144+
z-index: -1;
145+
}
146+
147+
.s-article > p + .o-blockquote {
148+
margin-top: 36px;
149+
margin-bottom: 36px;
150+
}
151+
152+
.s-article > .o-blockquote > p {
153+
margin: 0;
154+
margin-bottom: 0.5em;
155+
font-size: 1.625rem;
156+
font-style: italic;
157+
line-height: 1.1538461538;
158+
}
159+
160+
.s-article > .o-blockquote footer,
161+
.s-article > .o-blockquote cite {
162+
font-size: 1rem;
163+
font-style: normal;
164+
line-height: 1.5;
165+
}

0 commit comments

Comments
 (0)