how can i edit velocity theme
-
i wonder to know how can i edit velocity theme as long as it has resource in 2 places 1 in packages and 1 in themes/velocity
i want to know if i make changes to themes folder and if i compile or npm run watch in future will that changes be overwritten ?? thanks -
Hello there,
there will be two scenarios.
1 - If you want to edit blade file you need to change files under resources directory. If you are making changes in files under Velocity package, so you need to publish your blade files everytime to reflect your changes.2 - Next scenario will be if you want to make changes view vue components, you just to install dependencies in velocity package and execute command npm run watch. Your changes should reflect from this.
Feel free to ask further queries!
thanks & regards,
Shubham Mehrotra -
hi,
npm run watch
@ watch /Users/agampradhana/Desktop/projects/bagisto
npm run development -- --watch@ development /Users/agampradhana/Desktop/projects/bagisto
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"sh: cross-env: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development:cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch"
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?npm ERR! A complete log of this run can be found in:
npm ERR! /Users/agampradhana/.npm/_logs/2020-05-26T08_32_35_331Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch:npm run development -- --watch
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?npm ERR! A complete log of this run can be found in:
npm ERR! /Users/agampradhana/.npm/_logs/2020-05-26T08_32_35_355Z-debug.log -
Have you installed dependencies by executing npm i command ?
-
@shubhwebkul
I edit the shopping.blade.php and then I run thephp artisan vendor:publish
but not reflected my chnages -
Hi @Aung-Myo-Oo,
If you have not customized anything then you can run,
php artisan vendor:publish --force
Otherwise, I will suggest you place that file manually in the
resources/themes
path. -
@shubhwebkul Assume we edited all layout structure blade files in velocity theme suppose we want to update future patchwork then can we able to update without losing my exiting velocity theme change?
-
This post is deleted! -
Hi @Kaalee,
If you are doing inside the Velocity package, then in the future if some updates on the package came then it will be tough for you to remove the conflicts.
The suggested way is always to use the
resources/
folder and take a backup of that folder from time to time. So that if mistakenly force published then you can replace it with your backup.And for code like controller, helpers, etc. Always try to override the classes in your
app
directory. -
@devansh-webkul
After I customized the header and some pages in the theme and Run this command php artisan vendor:publish --force all my changes are gone. Is there any way to revive back the code? -
@devansh-webkul said in how can i edit velocity theme:
Hi @Aung-Myo-Oo,
If you have not customized anything then you can run,
php artisan vendor:publish --force
Otherwise, I will suggest you place that file manually in the
resources/themes
path.I already mentioned here that if you have not customized then you can run it.
Now there is no way.