Giter Site home page Giter Site logo

vecartier / opencollective-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opencollective/opencollective-frontend

0.0 0.0 0.0 32.91 MB

Open Collective Frontend. A React app powered by Next.js.

Home Page: https://opencollective.com

License: MIT License

Dockerfile 0.05% JavaScript 92.89% Shell 0.27% CSS 5.80% HTML 0.99%

opencollective-frontend's Introduction

Open Collective Frontend

Circle CI Slack Status Dependency Status Greenkeeper badge

Babel - Open Collective

Foreword

If you see a step below that could be improved (or is outdated), please update the instructions. We rarely go through this process ourselves, so your fresh pair of eyes and your recent experience with it, makes you the best candidate to improve them for other users. Thank you!

Development

Prerequisite

  1. Make sure you have Node.js version >= 10.
  • We recommend using nvm: nvm use.

Install

We recommend cloning the repository in a folder dedicated to opencollective projects.

git clone [email protected]:opencollective/opencollective-frontend.git opencollective/frontend
cd opencollective/frontend
npm install

Environment variables

This project requires an access to the Open Collective API. You have two options:

  • cp .env-staging .env to connect to the Open Collective staging API
  • cp .env-local .env to connect to the API running locally

If you decide to pick the local strategy, make sure you install and run the opencollective-api project.

Start

npm run dev

Contributing

Code style? Commit convention? Please check our Contributing guidelines.

TL;DR: we use Prettier and ESLint, we do like great commit messages and clean Git history.

Tests

You can run the tests using npm test or more specifically:

  • npm run test:src for pages and components
  • npm run test:server for api
  • npm run test:e2e for end-to-end tests using Cypress

To update the Jest snapshots, run npm run test:update

Localization

To add a translation to a new language, copy paste the en.json from src/lang and rename the copy using the 2 or 4 letter code for your country/language (e.g. fr-BE.json or fr.json).

You will also need to copy paste the last line in scripts/translate.js, and replace ja with your 2-4 letter locale code.

fs.writeFileSync(`${LANG_DIR}ja.json`, JSON.stringify(translatedMessages('ja'), null, 2));

Deployment

To deploy to staging or production, you need to be a core member of the Open Collective team.

Staging (heroku)

# Before first deployment, configure staging remote
git remote add staging https://git.heroku.com/oc-staging-frontend.git

# Then deploy master with
npm run deploy:staging

URL: https://staging.opencollective.com/

Production (heroku)

# Before first deployment, configure production remote
git remote add production https://git.heroku.com/oc-prod-frontend.git

# Then deploy master with
npm run deploy:production

URL: https://opencollective.com/

opencollective-frontend's People

Contributors

xdamman avatar znarf avatar hipsterbrown avatar greenkeeper[bot] avatar asood123 avatar clarete avatar betree avatar marcogbarcellos avatar piamancini avatar richardlitt avatar litomore avatar bartvanremortele avatar pento avatar jdubois avatar nampnq avatar wooorm avatar yasulab avatar hichamelkaddioui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.