Skip to content

Commit

Permalink
Publishing dist folder & changing the name of the component
Browse files Browse the repository at this point in the history
  • Loading branch information
depsimon committed Aug 27, 2018
1 parent 6b10087 commit 3e61d87
Show file tree
Hide file tree
Showing 8 changed files with 7,519 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/dist
/.idea
/vendor
/node_modules
Expand All @@ -9,3 +8,4 @@ phpunit.xml
.phpunit.result.cache
.DS_Store
Thumbs.db
yarn-error.log
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "depsimon/nova-stripe-payment-field",
"name": "depsimon/nova-stripe-checkout-field",
"description": "A Laravel Nova field that shows a Stripe Checkout Button.",
"keywords": [
"laravel",
Expand All @@ -11,13 +11,13 @@
},
"autoload": {
"psr-4": {
"Depsimon\\NovaStripePaymentField\\": "src/"
"Depsimon\\NovaStripeCheckoutField\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Depsimon\\NovaStripePaymentField\\FieldServiceProvider"
"Depsimon\\NovaStripeCheckoutField\\FieldServiceProvider"
]
}
},
Expand Down
Empty file added dist/css/field.css
Empty file.
1 change: 1 addition & 0 deletions dist/js/field.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/js/field.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Nova.booting((Vue, router) => {
Vue.component('form-nova-stripe-payment-field', require('./components/FormField'));
Vue.component('form-nova-stripe-checkout-field', require('./components/FormField'));

const script = document.createElement('script');
script.src = 'https://checkout.stripe.com/checkout.js';
Expand Down
6 changes: 3 additions & 3 deletions src/FieldServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Depsimon\NovaStripePaymentField;
namespace Depsimon\NovaStripeCheckoutField;

use Laravel\Nova\Nova;
use Laravel\Nova\Events\ServingNova;
Expand All @@ -16,8 +16,8 @@ class FieldServiceProvider extends ServiceProvider
public function boot()
{
Nova::serving(function (ServingNova $event) {
Nova::script('nova-stripe-payment-field', __DIR__.'/../dist/js/field.js');
Nova::style('nova-stripe-payment-field', __DIR__.'/../dist/css/field.css');
Nova::script('nova-stripe-checkout-field', __DIR__.'/../dist/js/field.js');
Nova::style('nova-stripe-checkout-field', __DIR__.'/../dist/css/field.css');
});
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php

namespace Depsimon\NovaStripePaymentField;
namespace Depsimon\NovaStripeCheckoutField;

use Laravel\Nova\Fields\Field;

class NovaStripePaymentField extends Field
class NovaStripeCheckoutField extends Field
{
/**
* The field's component.
*
* @var string
*/
public $component = 'nova-stripe-payment-field';
public $component = 'nova-stripe-checkout-field';

/**
* Create a new field.
Expand Down
Loading

0 comments on commit 3e61d87

Please sign in to comment.