Candidatos brasileiros em 2014
- Node.js (tested with version 4.3.2)
- Inkscape and ImageMagick (to generate the icons)
- Ruby and RubyGems (to run the tests)
src/app
: React cross-browser application.src/chrome
: Sources for the Google Chrome extension.src/web
: Sources for the web application.src/android
: Sources for the Android application.
- Copy
config.json.example
toconfig.json
and define your configurations npm install react-native react-native-css ngrok -g
npm install
npm rebuild node-sass
Building and running
- Copy
config.json.example
toconfig.json
and define your configurations - Execute
./docker/run.sh
- Enter the container with
./docker/shell.sh
and compile the code (PLATFORM=web npm run build
,PLATFORM=chrome npm run build
, etc.) - Still inside the container, run the test with
npm run test
(see at the bottom more information on running tests)
Interacting
- The directories
build
andreleases
are shared between the host and the container - that's where your compiled code will be located - The web application will be available locally in port 3333 of the host
- The web application will be available for the world through Ngrok (check
releases/web.log
for the generated URL) - While you run the tests from inside the container using
npm run test
, you can see what's going on by connecting to VNC, on port 5999 and password "keefer"
PLATFORM=<chrome|web|android> npm run build
- The theme files (SASS files) are under
src/app/styles
- Other development files are under
src/app/
- In order to reflect your changes, run
PLATFORM=<chrome|web|android> npm run build
- In order to use the Relay features, add the
relay.json
file todata/
directory
- Go to Google Chrome / Chromium
- Type
chrome://extensions
- Hit "Load unpacked extension..."
- Choose the
build/chrome
directory - An icon will be added to your Google Chrome toolbar
- Start a webserver in
build/web
(or runPLATFORM=web npm run publish
)
- Run
PLATFORM=android npm run build
and the APK will be compiled and sent to your device (real or virtual)
- Run
PLATFORM=<chrome|web> npm run release
, which will bump version number and create zip files underreleases/
directory
- Run
PLATFORM=<chrome|web> npm run publish
, which will upload and publish the item to the internet (e.g., Chrome extension to Chrome store or a Ngrok server for the web app)
- Run
npm run test
(you needruby
andrubygems
, and need a filetest/config.yml
) - In order to test the browser extension, you need to add its id to
test/config.yml
, and to find out the id you need to install the extension in Google Chrome in developer mode, so you'll be able to see the id inchrome://extensions