Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.

Commit e50ea98

Browse files
authored
Push initial commit (#1)
* initial commit * address feedback * rename to fusion-plugin-font-loader-react * use familar custom font name in tests
1 parent 0253c2f commit e50ea98

26 files changed

+5890
-0
lines changed

.buildkite/browserTests

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
export DISPLAY=:99.0
3+
/etc/init.d/xvfb start
4+
5+
./node_modules/.bin/nyc --instrument=false --exclude-after-remap=false --reporter=text --reporter=json ./node_modules/.bin/unitest --browser=dist-tests/browser.js
6+
bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json -n browser

.buildkite/nodeTests

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
./node_modules/.bin/nyc --instrument=false --exclude-after-remap=false --reporter=text --reporter=json node dist-tests/node.js
3+
bash <(curl -s https://codecov.io/bash) -f coverage/coverage-final.json -n node

.buildkite/pipeline.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
steps:
2+
- name: ':docker: :package:'
3+
plugins:
4+
'docker-compose#v1.7.0':
5+
build: fusion-plugin-font-loader-react
6+
image-repository: 296822479253.dkr.ecr.us-east-2.amazonaws.com/fusionjs
7+
- wait
8+
- command: yarn flow
9+
name: ':flowtype:'
10+
plugins:
11+
'docker-compose#v1.7.0':
12+
run: fusion-plugin-font-loader-react
13+
- name: ':eslint:'
14+
command: yarn lint
15+
plugins:
16+
'docker-compose#v1.7.0':
17+
run: fusion-plugin-font-loader-react
18+
- name: ':chrome: :white_check_mark:'
19+
command: .buildkite/browserTests
20+
plugins:
21+
'docker-compose#v1.7.0':
22+
run: fusion-plugin-font-loader-react
23+
- name: ':node: :white_check_mark:'
24+
command: .buildkite/nodeTests
25+
plugins:
26+
'docker-compose#v1.7.0':
27+
run: fusion-plugin-font-loader-react

.buildkite/xvfb_daemon_run

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
export DISPLAY=:99
3+
/etc/init.d/xvfb start
4+
sleep 1
5+
$@
6+
exit_value=$?
7+
/etc/init.d/xvfb stop
8+
exit $exit_value

.buildkite/xvfb_init

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
XVFB=/usr/bin/Xvfb
2+
XVFBARGS="$DISPLAY -ac -screen 0 1024x768x16 +extension RANDR"
3+
PIDFILE=/var/xvfb_${DISPLAY:1}.pid
4+
case "$1" in
5+
start)
6+
echo -n "Starting virtual X frame buffer: Xvfb"
7+
/sbin/start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
8+
echo "."
9+
;;
10+
stop)
11+
echo -n "Stopping virtual X frame buffer: Xvfb"
12+
/sbin/start-stop-daemon --stop --quiet --pidfile $PIDFILE
13+
echo "."
14+
;;
15+
restart)
16+
$0 stop
17+
$0 start
18+
;;
19+
*)
20+
echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
21+
exit 1
22+
esac
23+
exit 0

.cuprc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
babel: {
3+
presets: [
4+
require.resolve('@babel/preset-react'),
5+
],
6+
}
7+
};

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: [require.resolve('eslint-config-fusion')],
3+
};

.flowconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[ignore]
2+
.*/node_modules/.*[^(package)]\.json$
3+
4+
[include]
5+
./src/
6+
7+
[libs]
8+
9+
[lints]
10+
11+
[options]
12+
suppress_comment= \\(.\\|\n\\)*\\$FlowIgnore
13+
14+
[strict]

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
dist/
3+
dist-tests/
4+
coverage/
5+
.nyc_output/
6+
.vscode
7+
8+
.DS_Store
9+
npm-debug.log
10+
yarn-error.log

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:8.9.0
2+
3+
WORKDIR /fusion-plugin-font-loader-react
4+
5+
# Install electron dependencies.
6+
ENV DISPLAY :99
7+
ADD .buildkite/xvfb_init /etc/init.d/xvfb
8+
ADD .buildkite/xvfb_daemon_run /usr/bin/xvfb-daemon-run
9+
10+
RUN dpkg --add-architecture i386
11+
RUN apt-get update
12+
RUN apt-get -y install libgtk2.0-dev libx11-xcb-dev libgtkextra-dev libgconf2-dev libnss3 libasound2 libxtst-dev libxss1 xvfb && \
13+
chmod a+x /etc/init.d/xvfb /usr/bin/xvfb-daemon-run
14+
15+
COPY . .
16+
17+
RUN yarn
18+
19+
RUN yarn build-test

0 commit comments

Comments
 (0)