Following are the instructions for developers
only.
- composer.json version should match with your release via github then only it will be updated on
packagist
Features: &template=feature-template.md
Releases: &template=release-template.md
composer require webreinvent/vaahcms
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=assets --force
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=migrations --force
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=seeds --force
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=config --force
Add following service provider in config/app.php
/*
* Package Service Providers...
*/
'providers' => [
//...
WebReinvent\VaahCms\VaahCmsServiceProvider::class,
//...
],
'providers' => [
//...
'users' => [
'driver' => 'eloquent',
'model' => \ WebReinvent\VaahCms\Models\User::class,
],
//...
],
Create following folder in your laravel root folder
vaahcms/Modules
vaahcms/Themes
Add following two lines in psr-4
in composer.json
...
"autoload": {
"files": [],
"psr-4": {
"App\\": "app/",
...
"VaahCms\\Modules\\": "vaahcms/Modules/",
"VaahCms\\Themes\\": "vaahcms/Themes/"
...
},
"classmap": [
"database/seeds",
"database/factories"
]
},
...
Then run following command
composer dump-autoload
Step 7) If you get Numeric value out of range
error then you can fix it by adding following code in App\Providers\AppServiceProvider.php
public function boot()
{
Schema::defaultStringLength(191);
}
php artisan queue:work --queue=high,medium,low,default --env=pradeep
How to dispatch job:
dispatch((new ProcessNotifications($notification, $user, $inputs))
->onQueue('high'));
How to set jobs where you can track progress? Answer: Batches
$batch = Bus::batch([])->onQueue('high')->dispatch();
$batch->add(new ProcessNotifications($notification, $user, $inputs));
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider"
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=config
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=lang
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=views
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=migrations
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=seeds
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=assets
php artisan make:migration create_vh_users_table --path=/packages/vaahcms/Database/Migrations
php artisan make:seeder PermissionsTableSeeder --path=/packages/vaahcms/Database/Seeders
php artisan make:seeder RolesTableSeeder --path=/packages/vaahcms/Database/Seeders
php artisan make:command HealthcheckCommand --path=/packages/vaahcms/Database/Seeders
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=assets --force
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=migrations --force
php artisan vendor:publish --provider="WebReinvent\VaahCms\VaahCmsServiceProvider" --tag=seeds --force
php artisan migrate --force
php artisan db:seed --force
Install following package
npm install --save-dev fs
Replace the content of webpack.mix.fs
var admin_path = 'resources/assets/vendor/vaahcms/admin/';
var admin_default_theme_path = admin_path+'default/';
mix.setPublicPath(admin_default_theme_path);
var admin_assets_json = JSON.parse(fs.readFileSync(admin_default_theme_path+'assets.json'));
//console.log(admin_assets_json);
var admin_copy_path = './resources/assets/vendor/vaahcms/admin/';
var admin_copy_path_des = './packages/vaahcms/src/Resources/assets/admin/';
fs_extra.removeSync(admin_copy_path_des);
mix.combine(admin_assets_json['css'], admin_default_theme_path+'builds/vaahcms.css')
.combine(admin_assets_json['js'], admin_default_theme_path+'builds/vaahcms.js')
.js(admin_default_theme_path+'vue/app-setup.js', './builds')
.js(admin_default_theme_path+'vue/app-dashboard.js', './builds')
.js(admin_default_theme_path+'vue/app-modules.js', './builds')
.copyDirectory(admin_copy_path, admin_copy_path_des, false)
.version();
//mix.copyDirectory(admin_copy_path, admin_copy_path_des, false);
mix.webpackConfig({
watchOptions: {
aggregateTimeout: 2000,
poll: 20,
ignored: [
'/app/',
'/bootstrap/',
'/config/',
'/database/',
'/packages/',
'/public/',
'/routes/',
'/storage/',
'/tests/',
'/vaahcms/',
'/node_modules/',
'/vendor/',
]
}
});
-
Step 1) Install
composer require --dev laravel/dusk
-
Step 2) Run
php artisan dusk:install
-
Step 3) Download
chromdriver
fromhttps://sites.google.com/a/chromium.org/chromedriver/downloads
-
Step 4) Unzip and open
chromedriver.exe
and keep it running. -
Step 5) To do browser based test, open file
tests/DuskTestCase.php
and commentstatic::startChromeDriver();
-
Step 6) In tests/DuskTestCase.php file comment
'--headless',
:
...
$options = (new ChromeOptions)->addArguments([
'--disable-gpu',
//'--headless', <-- comment this line
'--window-size=1920,1080',
]);
...
-
Step 7) Make sure your
APP_URL
in.env
is as per the the xampp or actual application url -
Step 8) Run
php artisan dusk
, it may showWarning: TTY mode is not supported on Windows platform.
error you can ignore this error. If it run successfully, it will will open chrome and run your tests. -
Step 9) Install
composer require beyondcode/dusk-dashboard --dev
-
Step 10) Run
php artisan dusk:dashboard
- Change path of dusk in
phpunit.dusk.xml
to following:
...
<directory suffix="Test.php">./VaahCms/Modules/<module_name>/Tests/Browser</directory>
...
- Create a
release
branch fromGitflow
fromGitKrane
- Update
version
incomposer.json
andconfig\vaahcms.php
- Run
npm run production
to generate new assets - Commit the changes to git
- Finish the
release branch
, this will merge to the code tomaster
branch - Run
auto-changelog --template changelog-template.hbs --commit-limit false
to generateCHANGELOG.MD
file - Commit and push changes
- Visit
https://github.com/webreinvent/vaahcms/releases
and click onDraft a new release
- Enter the latest version in
Tag version
&Release title
and changes log in description.
- https://www.mkdocs.org - for docs
- https://saojs.org - For creating standalone installer
- As the PayLoad URL type in:
Visit:
https://packagist.org/profile/
and get theAPI Token
and
https://packagist.org/api/github?username=PACKAGIST_USERNAME
- Go to your GitHub repository and select Settings -> WebHooks -> Add Webhook
- In
Payload URL
enter the packagist url - In
Content type
chooseapplication/json
- In
Secrete
addAPI Token
- Choose
Let me select individual events.
and selectPushes
- Click on
Save
$process = new Process('cd .. && php artisan dusk --group=bkkrishna');
$process->setPTY(true);
$process->run();
auto-changelog --commit-limit false --template changelog-template.hbs