GithubHelp home page GithubHelp logo

phpsmarter / tocco-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tocco/tocco-client

0.0 2.0 0.0 10.39 MB

Web Client for the Tocco Business Framework

Home Page: https://www.tocco.ch

License: GNU Affero General Public License v3.0

JavaScript 94.29% Shell 0.20% CSS 5.32% HTML 0.19%

tocco-client's Introduction

Tocco Client

travics-ci Build Status codecov devDependencies Status saucelabs Build Status

This repository contains the web client for the Tocco Business Framework.

This project is based on following technologies, tools and libraries:

Initial project structure is based on: https://github.com/davezuko/react-redux-starter-kit.

Project Structure

This project uses Lerna for package management. The repository is maintained as monorepo.

Packages are located in folder packages/. Every package maintains its own dependencies and can be re-used in other packages.

Package naming

  • tocco-... naming is used in package.json; in folder structure tocco- prefix can be omitted

Please ensure that every package is prefixed with tocco-

Package tocco-ui

Package tocco-ui is a collection of reusable components. Components can be seen in action in the showcase-app deployed on GitHub. Content of this page is re-generated by Travis-CI on any change to packages tocco-ui or tocco-ui-showcase.

Documentation

Since this project heavily uses Redux and Sagas, you should be aware of it's concepts and also ES6. A good starting point can be found in these docs:

Development

Prerequisites

Run a Tocco Business Framework application with enabled REST API on: http://localhost:8080

Getting started

Just install yarn https://yarnpkg.com/en/docs/install and execute the following commands:

npm install --global [email protected]
npm run setup
lerna bootstrap
npm start --package={PACKAGE_NAME}

Open http://localhost:3000 and start coding!

Tests

Tests are using following tools and libraries:

All packages:

npm test

Single Package:

npm test --package={PACKAGE_NAME}

During development with watch:

npm run test:dev --package={PACKAGE_NAME}

Generators

The project provides some code generators. Generators are developed with Plop and can be executed with:

npm run plop

At the moment there is a generator to create a react-component and a generator to add a redux-action.

Publish bundle

Once the package is ready to publish, run following npm scripts. This registers the bundle in the npm registry.

lerna publish

Only build:

npm run deploy:dev --package={PACKAGE_NAME}
npm run deploy:prod --package={PACKAGE_NAME}

Linting

Eslint is used for linting. Linting will also be executed automatically on our CI.

npm run lint

And automatically fix issues:

npm run lint:fix

Contribute

Pull requests

  • Create a remote branch that fits the following naming convention: pr/{package}-{description-of-contribution}
  • Push commits to this branch. Set a commit message as described below.
  • Once all changes are pushed, create a pull request. The changes should never break a package and therefore must be self-contained.
  • The pull request will be verified by TravisCI and Codecov. If one of them returns a bad result, the problems have to be fixed.
  • Optionally assign a reviewer manually.
  • Once the pull request is merged, the branch must be deleted.

Git Commit Msg

Similar to Karma commit messages follow this convention:

<type>(<scope>): <subject>

<body>

Message subject (first line)

First line must not be longer than 70 characters, second line is always blank and other lines should be wrapped at 80 characters.

Allowed <type> values:

  • feat (new feature)
  • fix (bug fix)
  • docs (changes to documentation)
  • style (formatting etc.; no code change)
  • refactor (refactoring production code)
  • test (adding missing tests, refactoring tests; no production code change)
  • chore (updating grunt tasks etc; no production code change)

Example <scope> values:

  • If the changes affect a single package the scope is set to package name (e.g. login)
  • If the change is a global or difficult to assign to a single package the parentheses are omitted.
  • If changes affect the monorepo itself, the scope is set to 'tocco-client'

Message body

  • uses the imperative, present tense: “change” not “changed” nor “changes”
  • includes motivation for the change and contrasts with previous behavior

Setup Linting with IntelliJ

  • Install ESLint Plugin
  • Settings (Preferences on OS X) | Languages & Frameworks | JavaScript | Code Quality Tools --enable
  • Settings (Preferences on OS X) | Editor | Inspections | Code style issues | Unterminated statement -- disable

tocco-client's People

Contributors

methodenmann avatar niklaushug avatar ottrob avatar rzueger avatar uwolfer avatar

Watchers

 avatar  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.