Skip to content

Instantly share code, notes, and snippets.

@michaelbunch
Last active October 4, 2015 05:35
Show Gist options
  • Save michaelbunch/b990f1ef7cea692e6f45 to your computer and use it in GitHub Desktop.
Save michaelbunch/b990f1ef7cea692e6f45 to your computer and use it in GitHub Desktop.
Laravel 5 Project Starter
default:
autoload:
'': %paths.base%/tests/features/bootstrap
extensions:
Behat\MinkExtension:
base_url: http://<project>.app
goutte: ~
selenium2: ~
suites:
auth_suite:
paths: [%paths.base%/tests/features/auth, %paths.base%/tests/features/auth/admin]
#!/bin/bash
project=$1
# Create Project
laravel new $project
cd $project
# Setup Homestead
composer require --dev laravel/homestead
php vendor/bin/homestead make
# Setup Testing
composer require --dev behat/behat='~3.0.6' \
behat/mink \
behat/mink-goutte-driver \
behat/mink-selenium2-driver \
benconstable/phpspec-laravel='~2.0'
mkdir -p tests/features
mkdir -p tests/specs
curl https://gist.githubusercontent.com/michaelbunch/b990f1ef7cea692e6f45/raw/behat.yml > behat.yml
curl https://gist.githubusercontent.com/michaelbunch/b990f1ef7cea692e6f45/raw/phpspec.yml > phpspec.yml
# Setup Frontend Resources
npm install
npm install --save bootstrap
npm install --save angular
npm install --save font-awesome
curl https://gist.githubusercontent.com/michaelbunch/b990f1ef7cea692e6f45/raw/gulpfile.js > gulpfile.js
var elixir = require('laravel-elixir');
var paths = {
css: './public/css',
fonts: './public/fonts',
js: './public/js',
npm: './node_modules'
};
elixir(function(mix) {
mix.sass('app.scss');
mix.copy(paths.npm + '/angular/angular.min.js', paths.js);
mix.copy(paths.npm + '/bootstrap/dist/js/bootstrap.min.js', paths.js);
mix.copy(paths.npm + '/jquery/dist/jquery.min.js', paths.js);
mix.copy(paths.npm + '/font-awesome/css/font-awesome.min.css', paths.css);
mix.copy(paths.npm + '/bootstrap/dist/fonts', paths.fonts);
mix.copy(paths.npm + '/font-awesome/fonts', paths.fonts);
});
suites:
main:
namespace: App
psr4_prefix: App
src_path: app
spec_path: tests
extensions:
- PhpSpec\Laravel\Extension\LaravelExtension
laravel_extension:
testing_environment: 'testing'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment