Skip to content

Commit

Permalink
dummy skeleton added
Browse files Browse the repository at this point in the history
  • Loading branch information
devansh-webkul committed Sep 7, 2023
1 parent 3697f15 commit 3c3d392
Show file tree
Hide file tree
Showing 32 changed files with 224 additions and 0 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"Webkul\\Sales\\": "packages/Webkul/Sales/src",
"Webkul\\Shipping\\": "packages/Webkul/Shipping/src",
"Webkul\\Shop\\": "packages/Webkul/Shop/src",
"Webkul\\ShopModule\\": "packages/Webkul/ShopModule/src",
"Webkul\\Sitemap\\": "packages/Webkul/Sitemap/src",
"Webkul\\SocialLogin\\": "packages/Webkul/SocialLogin/src",
"Webkul\\SocialShare\\": "packages/Webkul/SocialShare/src",
Expand Down
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@
Webkul\Tax\Providers\TaxServiceProvider::class,
Webkul\Theme\Providers\ThemeServiceProvider::class,
Webkul\User\Providers\UserServiceProvider::class,

Webkul\ShopModule\Providers\ShopModuleServiceProvider::class,
])->toArray(),

/*
Expand Down
6 changes: 6 additions & 0 deletions config/bagisto-vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,11 @@
'build_directory' => 'themes/shop/default/build',
'package_assets_directory' => 'src/Resources/assets',
],

'shop_module' => [
'hot_file' => 'shop-module-vite.hot',
'build_directory' => 'themes/shop-module/build',
'package_assets_directory' => 'src/Resources/assets',
],
],
];
4 changes: 4 additions & 0 deletions packages/Webkul/ShopModule/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
/npm-debug.log
/package-lock.json
/resources/lang/vendor/shop/*
23 changes: 23 additions & 0 deletions packages/Webkul/ShopModule/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"autoprefixer": "^10.4.14",
"axios": "^1.1.2",
"laravel-vite-plugin": "^0.7.2",
"postcss": "^8.4.23",
"tailwindcss": "^3.3.2",
"vite": "^4.0.0",
"vue": "^3.2.47"
},
"dependencies": {
"@vee-validate/i18n": "^4.9.1",
"@vee-validate/rules": "^4.9.1",
"mitt": "^3.0.0",
"vee-validate": "^4.9.1",
"vue-flatpickr": "^2.3.0"
}
}
6 changes: 6 additions & 0 deletions packages/Webkul/ShopModule/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
12 changes: 12 additions & 0 deletions packages/Webkul/ShopModule/src/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Webkul\ShopModule\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
use DispatchesJobs, ValidatesRequests;
}
16 changes: 16 additions & 0 deletions packages/Webkul/ShopModule/src/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Webkul\ShopModule\Http\Controllers;

class HomeController extends Controller
{
/**
* Loads the home page.
*
* @return \Illuminate\View\View
*/
public function index()
{
return view('shop_module::home.index');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace Webkul\ShopModule\Providers;

use Illuminate\Support\ServiceProvider;

class ShopModuleServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
$this->loadRoutesFrom(__DIR__ . '/../Routes/web.php');

$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shop_module');
}

/**
* Register services.
*
* @return void
*/
public function register()
{
}
}
3 changes: 3 additions & 0 deletions packages/Webkul/ShopModule/src/Resources/assets/css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/Webkul/ShopModule/src/Resources/assets/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* This will track all the images and fonts for publishing.
*/
import.meta.glob(["../images/**", "../fonts/**"]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<x-shop::layouts>
@push('styles')
@bagistoVite(['src/Resources/assets/css/app.css', 'src/Resources/assets/js/app.js'], 'shop_module')
@endpush

<div class="flex gap-2 p-2">
<div>
<img src="{{ bagisto_asset('images/chibbi.jpg', 'shop_module') }}" style="width: 220px; height: 200px; border-radius: 10px;">
</div>

<div>
<img src="{{ bagisto_asset('images/luffy.jpg', 'shop_module') }}" style="width: 220px; height: 200px; border-radius: 10px;">
</div>
</div>
</x-shop::layouts>
8 changes: 8 additions & 0 deletions packages/Webkul/ShopModule/src/Routes/web.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

use Illuminate\Support\Facades\Route;
use Webkul\ShopModule\Http\Controllers\HomeController;

Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function () {
Route::get('shop-module', [HomeController::class, 'index']);
});
10 changes: 10 additions & 0 deletions packages/Webkul/ShopModule/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/Resources/**/*.blade.php", "./src/Resources/**/*.js"],

theme: {
extend: {}
},

plugins: [],
};
43 changes: 43 additions & 0 deletions packages/Webkul/ShopModule/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { defineConfig, loadEnv } from "vite";
import laravel from "laravel-vite-plugin";
import path from "path";

export default defineConfig(({ mode }) => {
const envDir = "../../../";

Object.assign(process.env, loadEnv(mode, envDir));

return {
build: {
emptyOutDir: true,
},

envDir,

server: {
host: process.env.VITE_HOST || "localhost",
port: process.env.VITE_PORT || 5173,
},

plugins: [
laravel({
hotFile: "../../../public/shop-module-vite.hot",
publicDirectory: "../../../public",
buildDirectory: "themes/shop-module/build",
input: [
"src/Resources/assets/css/app.css",
"src/Resources/assets/js/app.js",
],
refresh: true,
}),
],

experimental: {
renderBuiltUrl(filename, { hostId, hostType, type }) {
if (hostType === "css") {
return path.basename(filename);
}
},
},
};
});
1 change: 1 addition & 0 deletions public/themes/shop-module/build/assets/app-13af6c73.css

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

1 change: 1 addition & 0 deletions public/themes/shop-module/build/assets/app-4ed993c7.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions public/themes/shop-module/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"src/Resources/assets/css/app.css": {
"file": "assets/app-13af6c73.css",
"isEntry": true,
"src": "src/Resources/assets/css/app.css"
},
"src/Resources/assets/images/black-kitten.jpg": {
"file": "assets/black-kitten-e3254ea1.jpg",
"src": "src/Resources/assets/images/black-kitten.jpg"
},
"src/Resources/assets/images/chibbi.jpg": {
"file": "assets/chibbi-4916f720.jpg",
"src": "src/Resources/assets/images/chibbi.jpg"
},
"src/Resources/assets/images/cute-angry-bird.jpg": {
"file": "assets/cute-angry-bird-beebcff4.jpg",
"src": "src/Resources/assets/images/cute-angry-bird.jpg"
},
"src/Resources/assets/images/dva.jpg": {
"file": "assets/dva-9f0c7f75.jpg",
"src": "src/Resources/assets/images/dva.jpg"
},
"src/Resources/assets/images/luffy.jpg": {
"file": "assets/luffy-a1512cb6.jpg",
"src": "src/Resources/assets/images/luffy.jpg"
},
"src/Resources/assets/images/pug-as-a-jedi-master-with-lightsaber-in-france.jpg": {
"file": "assets/pug-as-a-jedi-master-with-lightsaber-in-france-388336ce.jpg",
"src": "src/Resources/assets/images/pug-as-a-jedi-master-with-lightsaber-in-france.jpg"
},
"src/Resources/assets/images/red-panda-as-a-jedi-master-cute-hd-dark-evil-ominous.jpg": {
"file": "assets/red-panda-as-a-jedi-master-cute-hd-dark-evil-ominous-51e78020.jpg",
"src": "src/Resources/assets/images/red-panda-as-a-jedi-master-cute-hd-dark-evil-ominous.jpg"
},
"src/Resources/assets/js/app.js": {
"file": "assets/app-4ed993c7.js",
"isEntry": true,
"src": "src/Resources/assets/js/app.js"
}
}

0 comments on commit 3c3d392

Please sign in to comment.