Skip to content

Commit 10eeb53

Browse files
authored
Merge pull request #194 from Wikia/IW-4970
2 parents 8bb74f8 + 6d957d2 commit 10eeb53

File tree

380 files changed

+1277
-542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+1277
-542
lines changed

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
always-auth=true
2+
@fandom:registry=https://artifactory.wikia-inc.com/artifactory/api/npm/wikia-npm/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v10.13.0
1+
v12

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

Jenkinsfile-pr-checks

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
def gitCommit = "${params.commit}"
2+
3+
def postStatus(state, context, gitCommit) {
4+
def description = "Jenkins pipeline for React Common"
5+
def payload = "{\"state\": \"${state}\", \"description\": \"${description}\", \"context\": \"${context}\", \"target_url\": \"${build_url}\""
6+
sh "/usr/bin/curl -s -X POST -H 'Authorization: token ${GITHUB_TOKEN}' -d '${payload}' https://api.github.com/repos/Wikia/react-common/statuses/${gitCommit}"
7+
}
8+
9+
node('qa-executors') {
10+
stage('Clone repo and start PR checks') {
11+
git credentialsId: 'bd3cf712-39a7-4b16-979e-ff86208ab2ea', url: 'git@github.com:Wikia/react-common.git', branch: "${params.branch}"
12+
13+
nodejs('v12 LTS') {
14+
currentBuild.description = "branch: ${params.branch}, commit: ${params.commit}, PR: ${params.pull_num}"
15+
16+
stage('Install dependencies') {
17+
postStatus("pending", "1. Install dependencies", gitCommit)
18+
19+
try {
20+
sh 'yarn install --frozen-lockfile'
21+
postStatus("success", "1. Install dependencies", gitCommit)
22+
} catch (e) {
23+
postStatus("failure", "1. Install dependencies", gitCommit)
24+
error 'FAIL' // sh "exit 1" - this makes this stage fail
25+
}
26+
}
27+
28+
stage('Run Linter') {
29+
postStatus("pending", "2. Run Linter", gitCommit)
30+
31+
try {
32+
sh 'yarn ci'
33+
postStatus("success", "2. Run Linter", gitCommit)
34+
} catch (e) {
35+
postStatus("failure", "2. Run Linter", gitCommit)
36+
error 'FAIL' // sh "exit 1" - this makes this stage fail
37+
}
38+
}
39+
40+
stage('Run tests with coverage') {
41+
postStatus("pending", "3. Run tests & coverage", gitCommit)
42+
43+
try {
44+
sh 'yarn coverage'
45+
postStatus("success", "3. Run tests & coverage", gitCommit)
46+
} catch (e) {
47+
postStatus("failure", "3. Run tests & coverage", gitCommit)
48+
error 'FAIL' // sh "exit 1" - this makes this stage fail
49+
}
50+
}
51+
}
52+
}
53+
}

config/rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const buildConfig = file => {
6868
external: isThisExternalDependency,
6969
plugins: [
7070
string({
71-
include: 'node_modules/design-system/dist/svg/sprite.svg',
71+
include: 'node_modules/@fandom/design-system/dist/svg/sprite.svg',
7272
}),
7373
resolve({
7474
module: true,
@@ -96,7 +96,7 @@ const buildConfig = file => {
9696
},
9797
],
9898
},
99-
exclude: 'node_modules/design-system/dist/svg/sprite.svg',
99+
exclude: 'node_modules/@fandom/design-system/dist/svg/sprite.svg',
100100
}),
101101
babel(babelConfig),
102102
commonjs({

config/styleguide.ExampleWrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styled, { ThemeProvider } from 'styled-components';
44

55
import i18n from 'i18next';
66
import { initReactI18next } from "react-i18next";
7-
import designSystemTranslations from 'design-system/i18n/en/design-system.json';
7+
import designSystemTranslations from '@fandom/design-system/i18n/en/design-system.json';
88

99
import ButtonGroup from '../source/components/ButtonGroup';
1010
import Button from '../source/components/Button';

config/styleguide.webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = () => {
1616
},
1717
{
1818
test: /\.svg$/,
19-
exclude: /node_modules\/design-system\/dist\/svg\/sprite\.svg$/,
19+
exclude: /node_modules\/@fandom\/design-system\/dist\/svg\/sprite\.svg$/,
2020
use: [
2121
{
2222
loader: 'babel-loader',
@@ -39,7 +39,7 @@ module.exports = () => {
3939
],
4040
},
4141
{
42-
test: /node_modules\/design-system\/dist\/svg\/sprite\.svg$/,
42+
test: /node_modules\/@fandom\/design-system\/dist\/svg\/sprite\.svg$/,
4343
loader: 'raw-loader',
4444
},
4545
],

docs/build/1.0868ecb8.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/build/1.7cd9ad06.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/build/bundle.33c63e05.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)