-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
152 changed files
with
10,464 additions
and
1,787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"rules": { | ||
"comma-dangle": ["error", "always-multiline"], | ||
"semi": ["error", "always"], | ||
"quotes": ["error", "single", { "avoidEscape": true }], | ||
"no-var": "error", | ||
"eol-last": "error", | ||
"prefer-arrow-callback": "error", | ||
"no-new-require": "error", | ||
"no-sync": "error" | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
options: | ||
merge-default-rules: false | ||
files: | ||
include: 'src/**/*.scss' | ||
rules: | ||
no-warn: 2 | ||
no-debug: 2 | ||
no-important: 2 | ||
indentation: | ||
- 2 | ||
- size: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
language: php | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 5.6.19 | ||
- 7.0 | ||
- 7.1 | ||
|
||
before_script: | ||
- nvm install "$(jq -r '.engines.node' package.json)" | ||
- make test-prepare | ||
- nvm install "$(jq -r '.engines.node' package.json)" | ||
- make install-bin install-composer install-npm db-build clean | ||
|
||
script: | ||
- bin/phpunit --testsuite="majoraotastore_project" --coverage-clover="coverage.clover" | ||
- bin/behat --no-interaction | ||
- bin/behat --no-interaction --profile="nostream" | ||
- npm run lint | ||
- php bin/php-cs-fixer fix src/ --dry-run | ||
- bin/phpunit --testsuite="majoraotastore_project" --coverage-clover="coverage.clover" | ||
- bin/behat --no-interaction | ||
- bin/behat --no-interaction --profile="nostream" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,24 +8,26 @@ so please head to this link and fulfill the **Requirements** section for your OS | |
### Installation | ||
|
||
#### 1. Clone project | ||
```bash | ||
```shell | ||
git clone [email protected]:LinkValue/MajoraOTAStore.git | ||
cd MajoraOTAStore | ||
``` | ||
|
||
#### 2. Virtual machine provisioning | ||
```bash | ||
```shell | ||
make provision | ||
``` | ||
|
||
Note: If it fails at some point, don't hesitate to re-run this command several times. | ||
Note: If it unluckily fails at some point, don't hesitate to re-run this command several times. | ||
|
||
#### 3. Bootstrap project | ||
```bash | ||
#### 3. Install project | ||
```shell | ||
# connect to the VM | ||
make ssh | ||
# then install the project for development | ||
# install the project for development (you'll have to press "Enter" several times to keep default parameters) | ||
make install | ||
# serve assets for development environment | ||
npm start | ||
``` | ||
|
||
#### 4. Enjoy | ||
|
@@ -42,45 +44,21 @@ [email protected] => user | |
|
||
### Frontend development | ||
|
||
All the assets (CSS/JS) are handled by Webpack. | ||
|
||
By default, you'll have to run `npm run build` each time you edit an asset file to see the modification in your browser (after refreshing it). | ||
|
||
But you can also use the webpack-dev-server to watch assets modification without needed to rebuild assets or even refreshing your browser. | ||
|
||
First, activate the webpack-dev-server support in your `parameters.yml` file: | ||
Front assets (css/js/images) are handled by [Webpack](https://webpack.js.org/). | ||
|
||
```yml | ||
# parameters.yml | ||
|
||
... | ||
|
||
use_webpack_dev_server: true | ||
|
||
``` | ||
Then run the following command: | ||
```bash | ||
When you're in development environment (i.e. `http://majoraotastore.dev/app_dev.php/...`), the project is configured to use webpack dev server to serve assets, it means that the project will seems to be broken until you run the following command: | ||
```shell | ||
npm start | ||
``` | ||
|
||
When you're in production environment (i.e. `http://majoraotastore.dev/...`), the project will use the assets found in `web/assets`, it means that you'll have to run `npm run build` each time you edit an asset file to see the modification in your browser (after refreshing it). | ||
|
||
### Common tasks | ||
```bash | ||
```shell | ||
# rebuild the whole database with clean fixtures | ||
make db-rebuild | ||
# update your database schema after adding/removing stuff in your data model | ||
make db-rebuild db-update db-build | ||
# run integration tests | ||
# run functional tests | ||
bin/behat | ||
``` | ||
|
||
|
||
### Get a token | ||
```bash | ||
curl -X POST http://majoraotastore.dev/app_dev.php/api/login_check -d [email protected] -d _password=admin | ||
``` | ||
output : | ||
``` | ||
{"token":"eyJhbGciOiJSUzI1NiJ9.eyJyb2xlcyI6WyJS...2FcOf0m0juoxmorX_N9bNO0cucRJuLTf5-5PZCsohqAFMcXdPX50Qvn8"} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170626235614 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE majoraotastore_application ADD description LONGTEXT DEFAULT NULL'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE majoraotastore_application DROP description'); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.