Skip to content

Commit

Permalink
Compatibility with OCv3
Browse files Browse the repository at this point in the history
  • Loading branch information
samgeorges committed May 13, 2022
1 parent 5561264 commit 387ac69
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
11 changes: 0 additions & 11 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class Plugin extends PluginBase
*/
public function register()
{
$this->registerAssetBundles();
}

/**
Expand All @@ -27,14 +26,4 @@ public function register()
public function boot()
{
}

/**
* registerAssetBundles for compiling assets
*/
protected function registerAssetBundles()
{
CombineAssets::registerCallback(function ($combiner) {
$combiner->registerBundle('$/rainlab/deploy/assets/less/deploy.less');
});
}
}
5 changes: 1 addition & 4 deletions assets/css/deploy.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions assets/less/deploy.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
padding: 10px 0 5px;
margin-top: -20px;

h5 {
margin-top: 0.75rem;
font-weight: 400;
font-size: 1rem;
}

p {
color: #999;
}
Expand Down
2 changes: 1 addition & 1 deletion controllers/servers/_action_form.htm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<input type="hidden" name="server_id" value="<?= post('server_id') ?>" />

<div class="modal-header">
<div class="modal-header flex-row-reverse">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title"><?= e(__($actionTitle)) ?></h4>
</div>
Expand Down
2 changes: 1 addition & 1 deletion controllers/servers/_field_privatekey.htm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
placeholder="<?= e(trans($field->placeholder)) ?>"
<?= $field->getAttributes() ?>><?= e($field->value) ?></textarea>

<p class="help-block">
<p class="help-block form-text">
<?= __("Paste an existing RSA private key in here or :action.", [
'action' => '<a href="javascript:generatePrivateKey()">'.__("generate a new one").'</a>'
]) ?>
Expand Down
2 changes: 1 addition & 1 deletion controllers/servers/_shell_form.htm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<input type="hidden" name="server_id" value="<?= post('server_id') ?>" />

<div class="modal-header">
<div class="modal-header flex-row-reverse">
<button type="button" class="close" data-dismiss="popup">&times;</button>
<h4 class="modal-title"><?= e(__($actionTitle)) ?></h4>
</div>
Expand Down
14 changes: 14 additions & 0 deletions rainlab-deploy.mix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your theme assets. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/

module.exports = (mix) => {
mix.less('plugins/rainlab/deploy/assets/less/deploy.less', 'plugins/rainlab/deploy/assets/css/');
}

2 comments on commit 387ac69

@hackolein
Copy link

@hackolein hackolein commented on 387ac69 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @samgeorges,
if I made changes to the less file, how does the compiling works? Is the command run automatically in the rainlab-deploy.mix.js or do I it run manually? I dinn't find anything in the oc doc.
Thanks

@daftspunk
Copy link
Member

@daftspunk daftspunk commented on 387ac69 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @hackolein

Comment out all these lines: https://github.com/octobercms/october/blob/3.x/webpack.mix.js#L33-L67

Then add a new lines to this file, and run npm run prod

require('./webpack.helpers')(mix);
require('./plugins/rainlab/deploy/rainlab-deploy.mix')(mix);

Docs are here: https://laravel-mix.com/

Please sign in to comment.