Outils pour utilisateurs

Outils du site


informatique:participalibre

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
informatique:participalibre [2020/11/25 14:22] – [Installer les dépendances de participalibre] simoninformatique:participalibre [2020/11/25 14:38] (Version actuelle) – [Lancer le serveur localement] simon
Ligne 18: Ligne 18:
  
 ===== Installer les dépendances de participalibre ===== ===== Installer les dépendances de participalibre =====
 +
 +==== PHP ====
  
 Une fois [[composer]] et [[laravel]] installé, la doc propose d'installer les dépendances du projet. Une fois [[composer]] et [[laravel]] installé, la doc propose d'installer les dépendances du projet.
Ligne 30: Ligne 32:
 $ cd participalibre $ cd participalibre
 $ composer install $ composer install
 +</code>
 +<hidden>
 +<code bash>
 Installing dependencies from lock file (including require-dev) Installing dependencies from lock file (including require-dev)
 Verifying lock file contents can be installed on current platform. Verifying lock file contents can be installed on current platform.
Ligne 90: Ligne 95:
 You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
 </code> </code>
 +</hidden>
  
 La ligne importante c'est :  La ligne importante c'est : 
Ligne 99: Ligne 105:
 <code bash> <code bash>
 $ composer update $ composer update
 +</code>
 +<hidden>
 +<code bash>
 Loading composer repositories with package information Loading composer repositories with package information
 Updating dependencies Updating dependencies
Ligne 131: Ligne 140:
 You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
 </code> </code>
 +</hidden>
  
 Il manque manifestement "php-mbstring" Il manque manifestement "php-mbstring"
Ligne 427: Ligne 437:
 </code> </code>
 </hidden> </hidden>
 +
 +Et puis ''composer install''
 +<code bash>
 +composer install
 +</code>
 +<hidden>
 +<code bash>
 +Installing dependencies from lock file (including require-dev)
 +Verifying lock file contents can be installed on current platform.
 +Nothing to install, update or remove
 +Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
 +Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
 +Generating optimized autoload files
 +> Illuminate\Foundation\ComposerScripts::postAutoloadDump
 +> @php artisan package:discover --ansi
 +Discovered Package: facade/ignition
 +Discovered Package: fideloper/proxy
 +Discovered Package: fruitcake/laravel-cors
 +Discovered Package: laravel/tinker
 +Discovered Package: nesbot/carbon
 +Discovered Package: nunomaduro/collision
 +Package manifest generated successfully.
 +49 packages you are using are looking for funding.
 +Use the `composer fund` command to find out more!
 +</code>
 +</hidden>
 +
 +Et ''composer fund''
 +<code bash>
 +$ composer fund
 +</code>
 +<hidden>
 +<code bash>
 +The following packages were found in your dependencies which publish funding information:
 +
 +brick
 +  math
 +    https://tidelift.com/funding/github/packagist/brick/math
 +
 +doctrine
 +  inflector, instantiator, lexer
 +    https://www.doctrine-project.org/sponsorship.html
 +    https://www.patreon.com/phpdoctrine
 +  inflector
 +    https://tidelift.com/funding/github/packagist/doctrine%2Finflector
 +  instantiator
 +    https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator
 +  lexer
 +    https://tidelift.com/funding/github/packagist/doctrine%2Flexer
 +
 +dragonmantank
 +  cron-expression
 +    https://github.com/sponsors/dragonmantank
 +
 +egulias
 +  email-validator
 +    https://github.com/sponsors/egulias
 +
 +facade
 +  flare-client-php
 +    https://github.com/sponsors/spatie
 +
 +fruitcake
 +  laravel-cors
 +    https://github.com/sponsors/barryvdh
 +
 +guzzlehttp
 +  guzzle
 +    https://github.com/sponsors/GrahamCampbell
 +    https://github.com/sponsors/Nyholm
 +    https://github.com/sponsors/alexeyshockov
 +    https://github.com/sponsors/gmponos
 +
 +league
 +  commonmark
 +    https://enjoy.gitstore.app/repositories/thephpleague/commonmark
 +    https://www.colinodell.com/sponsor
 +    https://www.paypal.me/colinpodell/10.00
 +    https://github.com/sponsors/colinodell
 +    https://www.patreon.com/colinodell
 +    https://tidelift.com/funding/github/packagist/league/commonmark
 +  flysystem
 +    https://offset.earth/frankdejonge
 +  flysystem, mime-type-detection
 +    https://github.com/sponsors/frankdejonge
 +    https://tidelift.com/funding/github/packagist/league/flysystem
 +
 +monolog
 +  monolog
 +    https://github.com/sponsors/Seldaek
 +    https://tidelift.com/funding/github/packagist/monolog/monolog
 +
 +myclabs
 +  deep-copy
 +    https://tidelift.com/funding/github/packagist/myclabs/deep-copy
 +
 +nesbot
 +  carbon
 +    https://opencollective.com/Carbon
 +    https://tidelift.com/funding/github/packagist/nesbot/carbon
 +
 +nunomaduro
 +  collision
 +    https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L
 +    https://github.com/sponsors/nunomaduro
 +    https://www.patreon.com/nunomaduro
 +
 +phpoption
 +  phpoption
 +    https://github.com/sponsors/GrahamCampbell
 +    https://tidelift.com/funding/github/packagist/phpoption/phpoption
 +
 +phpunit
 +  php-code-coverage, php-file-iterator, php-text-template, php-timer, php-token-stream, phpunit
 +    https://github.com/sponsors/sebastianbergmann
 +  phpunit
 +    https://phpunit.de/donate.html
 +
 +ramsey
 +  collection, uuid
 +    https://github.com/sponsors/ramsey
 +  collection
 +    https://tidelift.com/funding/github/packagist/ramsey/collection
 +  uuid
 +    https://tidelift.com/funding/github/packagist/ramsey/uuid
 +
 +sebastian
 +  code-unit-reverse-lookup, comparator, diff, environment, exporter, global-state, object-enumerator, object-reflector, recursion-context, resource-operations, type, version
 +    https://github.com/sponsors/sebastianbergmann
 +
 +swiftmailer
 +  swiftmailer
 +    https://github.com/sponsors/fabpot
 +    https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer
 +
 +symfony
 +  console, css-selector, deprecation-contracts, error-handler, event-dispatcher, event-dispatcher-contracts, finder, http-client-contracts, http-foundation, http-kernel, mime, polyfill-ctype, polyfill-iconv, polyfill-intl-grapheme, polyfill-intl-idn, polyfill-intl-normalizer, polyfill-mbstring, polyfill-php72, polyfill-php73, polyfill-php80, process, routing, service-contracts, string, translation, translation-contracts, var-dumper
 +    https://symfony.com/sponsor
 +    https://github.com/sponsors/fabpot
 +    https://tidelift.com/funding/github/packagist/symfony/symfony
 +
 +theseer
 +  tokenizer
 +    https://github.com/sponsors/theseer
 +
 +vlucas
 +  phpdotenv
 +    https://github.com/sponsors/GrahamCampbell
 +    https://tidelift.com/funding/github/packagist/vlucas/phpdotenv
 +
 +voku
 +  portable-ascii
 +    https://www.paypal.me/moelleken
 +    https://github.com/sponsors/voku
 +    https://opencollective.com/portable-ascii
 +    https://www.patreon.com/voku
 +    https://tidelift.com/funding/github/packagist/voku/portable-ascii
 +
 +Please consider following these links and sponsoring the work of package authors!
 +Thank you!
 +</code>
 +</hidden>
 +
 +==== Front avec npm ====
 +<code bash>
 +$ npm install --dev
 +npm WARN install Usage of the `--dev` option is deprecated. Use `--include=dev` instead.
 +
 +added 1116 packages, and audited 1116 packages in 18s
 +
 +10 vulnerabilities (4 low, 6 high)
 +
 +To address all issues, run:
 +  npm audit fix
 +
 +Run `npm audit` for details.
 +</code>
 +
 +Donc, il vaut mieux utiliser cette commande : 
 +<code bash>
 +$ npm install --include=dev
 +</code>
 +
 +La commande conseille d'utiliser ''npm audit fix''
 +<code bash>
 +$ npm audit fix
 +
 +added 7 packages, removed 16 packages, changed 19 packages, and audited 1107 packages in 6s
 +
 +1 package is looking for funding
 +  run `npm fund` for details
 +
 +found 0 vulnerabilities
 +</code>
 +
 +Et aussi ''npm fund''
 +<code bash>
 +$ npm fund
 +participalibre
 +└── https://github.com/chalk/ansi-styles?sponsor=1
 +    └── ansi-styles@4.3.0
 +</code>
 +
 +===== Configuration de l'env Laravel =====
 +
 +On copie l'env par défaut : 
 +<code bash>
 +$ cp .env.example .env
 +</code>
 +
 +Et on génère une clé :
 +<code bash>
 +$ php artisan key:generate
 +Application key set successfully.
 +</code>
 +
 +===== Lancement du serveur =====
 +
 +==== Compiler le front-end ====
 +Il faudra compiler le code du front-end au préalable avec ''npm run dev'' (ou ''npm run build'' pour une installation en production).
 +<code bash>
 +$ npm run dev
 +</code>
 +
 +(Note: Pour travailler sur le front-end ''npm run watch'' est conseillé car le SCSS sera recompilé à chaque modification.)
 +
 +==== Lancer le serveur localement ====
 +<code bash>
 +$ php artisan serve
 +</code>
 +
 +Le site est accessible sur [[http://127.0.0.1:8000]] ou [[http://localhost:8000]].
 +
 +{{ :informatique:participalibre.png?400 |}}
informatique/participalibre.1606314150.txt.gz · Dernière modification : 2020/11/25 14:22 de simon