Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
josh is working on package.
  • Loading branch information
Artistan authored May 9, 2018
2 parents 14902e5 + 701759b commit acbfa10
Show file tree
Hide file tree
Showing 85 changed files with 24,636 additions and 198 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vscode/
node_modules/
package/src/node_modules
test-project/
vendor/
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

19 changes: 19 additions & 0 deletions UsersTableSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(App\User::class)->create([
'name' => 'homestead',
'email' => 'homestead@test.email'
]);
}
}
32 changes: 32 additions & 0 deletions build-test-project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Change these to the values for your test MySQL DB
db_host=192.168.10.10
db_port=3306
db_database=homestead
db_username=homestead
db_password=secret

if [ -d "./test-project" ]; then
cd test-project
php artisan migrate:reset
cd ..
rm -rf test-project
echo "Removed old test project."
fi

composer create-project laravel/laravel test-project 5.5.*
php ./edit-composer.php
cd test-project
sed -i '' "s/DB_HOST=127.0.0.1/DB_HOST=$db_host/g" .env
sed -i '' "s/DB_PORT=3306/DB_PORT=$db_port/g" .env
sed -i '' "s/DB_DATABASE=homestead/DB_DATABASE=$db_database/g" .env
sed -i '' "s/DB_USERNAME=homestead/DB_USERNAME=$db_username/g" .env
sed -i '' "s/DB_PASSWORD=secret/DB_PASSWORD=$db_password/g" .env
sed -i '' "s|// \$this->call(UsersTableSeeder::class);|\$this->call(UsersTableSeeder::class);|" ./database/seeds/DatabaseSeeder.php
cp ../UsersTableSeeder.php ./database/seeds/
php artisan make:auth
composer require brokerexchange/showcase=dev-feature/1.0
npm install
cd ..
bash update-test-project.sh --migrations --rundev
echo "Test project built!"
echo "To fire it up, cd into the test project and use php artisan serve"
16 changes: 16 additions & 0 deletions edit-composer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
$composerFile = file_get_contents('./test-project/composer.json');
$composer = json_decode($composerFile, true);
// $composer['require']["brokerexchange/showcase"] = "dev-feature/1.0";
// var_dump($composer);
$composer['repositories'] = json_decode('[
{
"type": "path",
"url": "../package",
"options": {
"symlink": true
}
}
]');
$composer['minimum-stability'] = "dev";
file_put_contents('./test-project/composer.json', json_encode($composer));
39 changes: 39 additions & 0 deletions package/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "brokerexchange/showcase",
"description": "A widget for showcasing cards of items in a panel or page.",
"authors": [
{
"name": "Josh Anthony",
"email": "jantho1990@gmail.com"
}
],
"require": {
"laracasts/flash": "^3.0",
"illuminate/database": "^5.4",
"doctrine/dbal": "^2.5",
"fzaninotto/faker": "^1.4",
"illuminate/filesystem": "^5.4",
"illuminate/pagination": "^5.4",
"nesbot/carbon": "^1.27"
},
"autoload": {
"classmap": [
"src/database/seeds",
"src/database/factories",
"src/database/migrations"
],
"psr-4": {
"Showcase\\": "src/"
}
},
"require-dev": {
"squizlabs/php_codesniffer": "*"
},
"extra": {
"laravel": {
"providers": [
"Showcase\\App\\Providers\\ShowcaseProvider"
]
}
}
}
Loading

0 comments on commit acbfa10

Please sign in to comment.