Downloads
Stars
Version
MP7:
Webs interessants:
CRUD de tasques per línia de comandes (vegeu més abaix notes sobre les comandes):
MP8: Crud per interfície JSON API
MP9:
Comparar 3 interfícies:
i aprofitar codi (aproximació DRY no WET):
MP8: Ajax | HTTP CLIENT AXIOS | Working wiht APIs: JSON
Promise Based Axios:
TODO:
JSON APIS:
Mostrar els errors (catch de promises, missatges d'error de la pròpia API)
MP8: Vue.js
TLTR:
Explicar slots: Widget/Panel boostrap -> Col·locar en algún lloc la llista de todos: dins un widget
Components pares i fills -> comunicació entre components
Vue Events i Event Dispatcher -> Comunicació entre esdeveniments
Llista de todos/tasques dins d'un widget AdminLTE: https://adminlte.io/themes/AdminLTE/pages/widgets.html
Aprofitar per explicar slots i named slots de Vue.js per fer Content Distribution: https://vuejs.org/v2/guide/components.html#Content-Distribution-with-Slots
Ja tinc un paquet per anar posant els components AdminLTE fets: https://www.npmjs.com/package/adminlte-vue
MOSTRAR ERRORS API i missatges ok (added task) <- MessageComponent
Utilitzar component vam fer en un altre projecte: message /flash message MessageComponent
Altres llibreries i noms
CLI: another interface (like WEB or API JSON)
https://laravel.com/docs/5.5/artisan
php artisan make:command CreateTask
API:
php artisan make:task
Preguntar pel nom de la tasca
php artisan make:task taskname
Install npm libraries:
npm install --save-dev vue-test-utils mocha mocha-webpack jsdom jsdom-global expect
Create folder for Tests and file setup.js
tests/Javascript/setup.js
Example JSON:
https://github.com/acacha/relationships/blob/master/tests/Javascript/setup.js
File content:
require('jsdom-global')()
Add mpm script test on package.json:
"test" : mocha-webpack --webpack-config=node_modules/laravel-mix/setup/webpack.config.js --require tests/Javascript/setup.js tests/Javascript/**/*.spec.js
Hooking into Laravel mix: Observe --webpack-config=node_modules/laravel-mix/setup/webpack.config.js
Folder for Javascript Tests:
tests/Javascript
Execute tests:
npm run test
PHPStorm configuration
Example test:
Exemple sense Laravel Mix:
Resources
Vuetable:
npm i babel-plugin-transform-runtime babel-preset-stage-2 babel-preset-es2015