front-core
npm install @reagentum/front-core___Front Core (FC)___ - это расширяемый boilerplate для создания приложений уровня enterprise на React
!!! главное отличие от статических boilerplate - это наследуемость и будущие поставки c новыми фичами и правками.
То есть вы инсталити FC как обычный модуль, подключаетесь в описанных входных точках, пишите кастомную логику и
получаете без лишних забот новые обновления и новые версии коры.
Вы не тратите уйму времени и денег на настройку и подгонку плагинов, каких-то важных кусков базовой для enterprise функциональности.
Все это уже есть в коробке.
Можно провести аналогию с https://github.com/facebook/create-react-app только не для hello world, а для enterprise проектов.
___Front Core (FC) - в проектах должен быть проектный код!___
Чтобы начать работать с корой, можно воспользоваться генератором кода для yoman:
Следуйте инструкциям, это займет не более 10 минут на создание проекта и модуля и еще минут 15 на выкачивание зависимостей перед первым стартом.
NodeJS@9+ версии. react@16 - слой визуализацииreact-router@3 - роутинг приложенияredux@3 - слой управления даннымиredux middle promises - для управления состояниями промис запросовjson-patch для Http PATCHi18next@8 - интернализация \ локализацияmoment@2 - работа с датамиwinston@2 - логированиеwebpack@3 - сборщикbabel@6 - компилятор ES7karma@1 + mocha@2 + chai@3 - тестированиеdocumentation.js@6 - документирование hapi@16 - nodeJs серверmocha@2 - тестированиеOAuth 2.0 - для дефолтной авторизации npm install -g windows-build-tools./node_modules/@reagentum/front-core/node_modules./node_modules/config"config": "github:kinjeiro/node-config",npm inpm iX-CSRF-Token, X-Request-ID либо отключить их в настройках
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with, X-CSRF-Token, X-Request-ID");
`На java включается это с помощью
`
@CrossOrigin(origins = "", allowedHeaders = "")
`разработчики могут отключить cors у себя в браузере, сделав такой ярлык:
`
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="C:/Chrome dev session" --disable-web-security
`Поддержка
IE 11+
(IE <= 10 не поддерживает наследование статических методов в классе (используется у нас в UniRedux и redux-orm)
Есть непроверенные workaround, но это если ооооочень понадобиться.Commits
Используем стиль для коммитов$3
Each commit message consists of a header, a body and a footer. The header has a special
format that includes a type, a scope and a subject:`
():
`The header is mandatory and the scope of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.
$3
If the commit reverts a previous commit, it should begin with revert: , followed by the header
of the reverted commit.
In the body it should say: This reverts commit , where the hash is the SHA of the commit
being reverted.
A commit with this format is automatically created by the [git revert][git-revert] command.$3
Must be one of the following:* feat: A new feature
* fix: A bug fix
* docs: Documentation only changes
* style: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)
* refactor: A code change that neither fixes a bug nor adds a feature
* perf: A code change that improves performance
* test: Adding missing or correcting existing tests
* chore: Changes to the build process or auxiliary tools and libraries such as documentation
generation
$3
The scope could be anything specifying place of the commit change. For example $location,
$browser, $compile, $rootScope, ngHref, ngClick, ngView, etc...You can use
* when the change affects more than a single scope.$3
The subject contains succinct description of the change:* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end
$3
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.$3
The footer should contain any information about Breaking Changes and is also the place to
[reference GitHub issues that this commit closes][closing-issues].Breaking Changes should start with the word
BREAKING CHANGE:` with a space or two newlines.A detailed explanation can be found in this [document][commit-message-format].