├── .editorconfig ├── .gitattributes ├── .gitignore ├── .jshintrc ├── .travis.yml ├── .yo-rc.json ├── LICENSE ├── README.md ├── app ├── index.js └── templates │ ├── angular │ ├── _bower.json │ ├── _gitignore │ ├── _gulpfile.js │ ├── _jshintrc │ ├── _package.json │ └── angular │ │ ├── app │ │ ├── landing │ │ │ ├── landing.html │ │ │ ├── landing.js │ │ │ └── landing.less │ │ ├── login │ │ │ ├── login.html │ │ │ ├── login.js │ │ │ └── login.less │ │ ├── main.js │ │ └── routes.js │ │ ├── config │ │ └── http.js │ │ ├── directives │ │ └── modal │ │ │ ├── modal.html │ │ │ ├── modal.js │ │ │ └── modal.less │ │ ├── filters │ │ ├── trust_html.js │ │ └── ucfirst.js │ │ └── services │ │ └── user.js │ ├── generic │ ├── _editorconfig │ ├── _jscs.json │ └── _readme.md │ └── plain │ ├── _bower.json │ ├── _gulpfile.js │ ├── _jshintrc │ └── _package.json ├── package.json └── test └── test-app.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = tabs 6 | indent_size = 4 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "bitwise": true, 5 | "camelcase": true, 6 | "curly": true, 7 | "eqeqeq": true, 8 | "immed": true, 9 | "indent": 2, 10 | "latedef": true, 11 | "newcap": true, 12 | "noarg": true, 13 | "undef": true, 14 | "strict": true 15 | } 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 'iojs' 5 | - '0.12' 6 | - '0.10' 7 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-generator": {} 3 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jad Joubran 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # generator-laravel5 2 | 3 | > [Yeoman](http://yeoman.io) generator 4 | 5 | 6 | ## Getting Started 7 | 8 | ### Setup 9 | 10 | ```bash 11 | npm install -g yo generator-laravel5 bower 12 | ``` 13 | 14 | When ready, initiate the generator: 15 | 16 | ```bash 17 | yo laravel5 18 | ``` 19 | 20 | Answer a few questions and you're ready to start working on your Favorite laravel 5 application. 21 | You can also setup your laravel application to use Angular JS. 22 | 23 | 24 | ## Contributing 25 | 26 | I am hoping to get feature suggestions from people like you. Just create a new issue. 27 | 28 | 29 | ## Changelog 30 | 31 | ### 0.1.1 32 | 33 | + Updated description on yeoman website 34 | 35 | ### 0.1.0 36 | 37 | + Added suppot for Javascript Framework: Angular 38 | + Defaulting `private` to `true` in both bower.json and package.json 39 | + Eliminated manual conflict resolution because the laravel installation is fresh and is not altered by the user yet 40 | + Speed up generation process by installing bower globally when downloading the generator instead of during runtime 41 | 42 | ### 0.0.8 43 | 44 | + Add laravel elixir bower functionality to elixir 45 | + request to star the repository and submit feature requests at the end 46 | 47 | 48 | ### 0.0.7 49 | 50 | + copy bower, copy package.json, editorconfig, jshint and jscs 51 | + ask user for editorconfig, jshint and jscs 52 | 53 | 54 | 55 | ### 0.0.6 56 | 57 | + fixed repository link 58 | 59 | 60 | ### 0.0.5 61 | 62 | + updated to new base generator-generator 63 | + fixed async race conditions 64 | + code cleanup 65 | + installing node and bower dependencies 66 | 67 | 68 | 69 | ## License 70 | 71 | MIT 72 | -------------------------------------------------------------------------------- /app/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var yeoman = require('yeoman-generator'); 3 | var chalk = require('chalk'); 4 | var yosay = require('yosay'); 5 | 6 | module.exports = yeoman.generators.Base.extend({ 7 | initializing: function () { 8 | this.pkg = require('../package.json'); 9 | 10 | //eliminated manual conflict resolution because the laravel installation is fresh and is not altered by the user yet 11 | this.conflicter.force = true; 12 | }, 13 | 14 | prompting: function () { 15 | var done = this.async(); 16 | 17 | this.log(yosay( 18 | 'Welcome to the first-class ' + chalk.red('Laravel5') + ' generator!' 19 | )); 20 | 21 | 22 | var prompts = [{ 23 | type: 'confirm', 24 | name: 'angularjs', 25 | message: 'Would you like to use Angular as a javascript framework?', 26 | default: false 27 | }, { 28 | type: 'confirm', 29 | name: 'jshint', 30 | message: 'Would you like to use jshint?', 31 | default: true 32 | }, { 33 | type: 'confirm', 34 | name: 'jscs', 35 | message: 'Would you like to use javascript code style (jscs)?', 36 | default: true 37 | }, { 38 | type: 'confirm', 39 | name: 'editorconfig', 40 | message: 'Would you like to use Editor Config?', 41 | default: true 42 | } 43 | ]; 44 | this.prompt(prompts, function (props) { 45 | this.props = props; 46 | done(); 47 | }.bind(this)); 48 | }, 49 | 50 | configuring: { 51 | composer: function(){ 52 | var done = this.async(); 53 | this.log(chalk.cyan('Checking if composer is installed')); 54 | 55 | this.spawnCommand('composer', ['--version']) 56 | .on('error', function(){ 57 | this.log(chalk.red('Composer not found. Make sure it is available in your path or download it from getcomposer.org')); 58 | return false; 59 | }.bind(this)) 60 | .on('exit', function(){ 61 | this.log(chalk.green('Composer found')); 62 | }.bind(this)); 63 | done(); 64 | }, 65 | bower: function(){ 66 | var done = this.async(); 67 | this.log(chalk.cyan('Checking if bower is installed globally')); 68 | 69 | this.spawnCommand('bower', ['-v']) 70 | .on('error', function(){ 71 | this.log(chalk.red('Bower not found. Please download it globally using npm install -g bower')); 72 | return false; 73 | }.bind(this)) 74 | .on('exit', function(){ 75 | this.log(chalk.green('Bower found')); 76 | }.bind(this)); 77 | done(); 78 | } 79 | }, 80 | 81 | writing: { 82 | laravel5: function(){ 83 | var done = this.async(); 84 | this.spawnCommand('composer', ['create-project', 'laravel/laravel', 'laravel', '--prefer-dist']) 85 | .on('error', function(){ 86 | this.log(chalk.error('Error installing Laravel')); 87 | return false; 88 | }.bind(this)) 89 | .on('exit', function(){ 90 | this.log(chalk.green('Laravel5 installed')); 91 | done(); 92 | }.bind(this)); 93 | }, 94 | projectfiles: function () { 95 | this.destinationRoot('laravel'); 96 | 97 | /*generic installs*/ 98 | this.fs.copy( 99 | this.templatePath('generic/_readme.md'), 100 | this.destinationPath('readme.md') 101 | ); 102 | if ( this.props.jscs ){ 103 | this.fs.copy( 104 | this.templatePath('generic/_jscs.json'), 105 | this.destinationPath('.jscs.json') 106 | ); 107 | } 108 | if ( this.props.editorconfig ){ 109 | this.fs.copy( 110 | this.templatePath('generic/_editorconfig'), 111 | this.destinationPath('.editorconfig') 112 | ); 113 | } 114 | 115 | /*angularjs specific*/ 116 | if ( this.props.angularjs ){ 117 | this.fs.copy( 118 | this.templatePath('angular/_package.json'), 119 | this.destinationPath('package.json') 120 | ); 121 | this.fs.copy( 122 | this.templatePath('angular/_bower.json'), 123 | this.destinationPath('bower.json') 124 | ); 125 | this.fs.copy( 126 | this.templatePath('angular/_gulpfile.js'), 127 | this.destinationPath('gulpfile.js') 128 | ); 129 | this.fs.copy( 130 | this.templatePath('angular/_gitignore'), 131 | this.destinationPath('.gitignore') 132 | ); 133 | if ( this.props.jshint ){ 134 | this.fs.copy( 135 | this.templatePath('angular/_jshintrc'), 136 | this.destinationPath('.jshintrc') 137 | ); 138 | } 139 | /*copy angular sample directory*/ 140 | this.fs.copy( 141 | this.templatePath('angular/angular/**/*'), 142 | this.destinationRoot('angular/') 143 | ); 144 | }else{ 145 | this.fs.copy( 146 | this.templatePath('plain/_package.json'), 147 | this.destinationPath('package.json') 148 | ); 149 | this.fs.copy( 150 | this.templatePath('plain/_bower.json'), 151 | this.destinationPath('bower.json') 152 | ); 153 | this.fs.copy( 154 | this.templatePath('plain/_gulpfile.js'), 155 | this.destinationPath('gulpfile.js') 156 | ); 157 | if ( this.props.jshint ){ 158 | this.fs.copy( 159 | this.templatePath('plain/_jshintrc'), 160 | this.destinationPath('.jshintrc') 161 | ); 162 | } 163 | } 164 | } 165 | }, 166 | 167 | install: function () { 168 | var done = this.async(); 169 | this.destinationRoot('../'); 170 | this.installDependencies(); 171 | done(); 172 | }, 173 | end: function(){ 174 | this.log('You need to manually uncomment .bower() in your gulpfile.js after adding the first bower component' + "\n"); 175 | 176 | this.log("\nAll done!\nThank you for using generator-laravel5. Kindly " + chalk.yellow('star') + 177 | ' the repository on github and/or submit feature requests!'); 178 | } 179 | 180 | }); 181 | -------------------------------------------------------------------------------- /app/templates/angular/_bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package", 3 | "version": "0.0.0", 4 | "private": true, 5 | "dependencies": { 6 | "angular": "~1.3.15" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /app/templates/angular/_gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /node_modules 3 | .env 4 | /bower_components 5 | npm-debug.log 6 | resources/.tmp 7 | -------------------------------------------------------------------------------- /app/templates/angular/_gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | 3 | require('laravel-elixir-bower'); 4 | require('laravel-elixir-angular'); 5 | 6 | /* 7 | |-------------------------------------------------------------------------- 8 | | Elixir Asset Management 9 | |-------------------------------------------------------------------------- 10 | | 11 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 12 | | for your Laravel application. By default, we are compiling the Less 13 | | file for our application, as well as publishing vendor resources. 14 | | 15 | */ 16 | 17 | elixir.config.sourcemaps = false; 18 | elixir.config.registerWatcher("default", "angular/**"); 19 | 20 | elixir(function(mix) { 21 | mix 22 | .bower() 23 | .angular('angular/') 24 | .less('../../../angular/**/*.less', 'resources/.tmp/') 25 | .copy('angular/app/**/*.html', 'public/views/app/') 26 | .copy('angular/directives/**/*.html', 'public/views/directives/') 27 | .stylesIn('resources/.tmp', 'public/css/'); 28 | 29 | }); 30 | -------------------------------------------------------------------------------- /app/templates/angular/_jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "bitwise": true, 5 | "camelcase": true, 6 | "curly": true, 7 | "eqeqeq": true, 8 | "immed": true, 9 | "indent": 2, 10 | "latedef": true, 11 | "newcap": true, 12 | "noarg": true, 13 | "undef": true, 14 | "strict": true, 15 | "globals": { 16 | "angular": false, 17 | "describe": false, 18 | "it": false, 19 | "expect": false, 20 | "beforeEach": false, 21 | "afterEach": false, 22 | "module": false, 23 | "inject": false 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/templates/angular/_package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package", 3 | "version": "0.0.0", 4 | "private": true, 5 | "devDependencies": { 6 | "gulp": "^3.8.8", 7 | "laravel-elixir": "*", 8 | "laravel-elixir-angular": "^0.1.1", 9 | "laravel-elixir-bower": "^0.1.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/templates/angular/angular/app/landing/landing.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/app/landing/landing.html -------------------------------------------------------------------------------- /app/templates/angular/angular/app/landing/landing.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/app/landing/landing.js -------------------------------------------------------------------------------- /app/templates/angular/angular/app/landing/landing.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/app/landing/landing.less -------------------------------------------------------------------------------- /app/templates/angular/angular/app/login/login.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/app/login/login.html -------------------------------------------------------------------------------- /app/templates/angular/angular/app/login/login.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/app/login/login.js -------------------------------------------------------------------------------- /app/templates/angular/angular/app/login/login.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/app/login/login.less -------------------------------------------------------------------------------- /app/templates/angular/angular/app/main.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | "use strict"; 3 | var app = angular.module('app', 4 | [ 5 | 'app.controllers', 6 | 'app.filters', 7 | 'app.services', 8 | 'app.directives', 9 | 'app.routes', 10 | 'app.config', 11 | ]); 12 | 13 | angular.module('app.routes', ['ui.router']); 14 | angular.module('app.controllers', ['ui.router']); 15 | angular.module('app.filters', []); 16 | angular.module('app.services', ['ui.router']); 17 | angular.module('app.directives', []); 18 | angular.module('app.config', []); 19 | 20 | })(); -------------------------------------------------------------------------------- /app/templates/angular/angular/app/routes.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/app/routes.js -------------------------------------------------------------------------------- /app/templates/angular/angular/config/http.js: -------------------------------------------------------------------------------- 1 | // (function(){ 2 | // "use strict"; 3 | 4 | // angular.module('app.config').config( function($httpProvider) { 5 | // $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8'; 6 | // }); 7 | 8 | // })(); 9 | -------------------------------------------------------------------------------- /app/templates/angular/angular/directives/modal/modal.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/directives/modal/modal.html -------------------------------------------------------------------------------- /app/templates/angular/angular/directives/modal/modal.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/directives/modal/modal.js -------------------------------------------------------------------------------- /app/templates/angular/angular/directives/modal/modal.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/directives/modal/modal.less -------------------------------------------------------------------------------- /app/templates/angular/angular/filters/trust_html.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | "use strict"; 3 | 4 | angular.module('app.filters').filter( 'trustHtml', function( $sce ){ 5 | return function( html ){ 6 | return $sce.trustAsHtml(html); 7 | }; 8 | }); 9 | })(); -------------------------------------------------------------------------------- /app/templates/angular/angular/filters/ucfirst.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | "use strict"; 3 | 4 | angular.module('app.filters').filter('ucfirst', function() { 5 | return function( input ) { 6 | if ( !input ){ 7 | return null; 8 | } 9 | return input.substring(0, 1).toUpperCase() + input.substring(1); 10 | }; 11 | }); 12 | 13 | })(); 14 | -------------------------------------------------------------------------------- /app/templates/angular/angular/services/user.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jadjoubran/laravel5-generator/284729ade184608aa9e833d91b430221f000f5c4/app/templates/angular/angular/services/user.js -------------------------------------------------------------------------------- /app/templates/generic/_editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | end_of_line = lf 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /app/templates/generic/_jscs.json: -------------------------------------------------------------------------------- 1 | { 2 | "requireCurlyBraces": [ 3 | "if", 4 | "else", 5 | "for", 6 | "while", 7 | "do" 8 | ], 9 | "requireSpaceAfterKeywords": [ 10 | "if", 11 | "for", 12 | "while", 13 | "do", 14 | "switch", 15 | "return" 16 | ], 17 | "disallowSpacesInFunctionExpression": { 18 | "beforeOpeningRoundBrace": true 19 | }, 20 | "disallowTrailingWhitespace": true, 21 | "disallowMixedSpacesAndTabs": true, 22 | "requireMultipleVarDecl": true, 23 | "requireSpacesInsideObjectBrackets": "all", 24 | "requireSpaceBeforeBinaryOperators": [ 25 | "+", 26 | "-", 27 | "/", 28 | "*", 29 | "=", 30 | "==", 31 | "===", 32 | "!=", 33 | "!==" 34 | ], 35 | "disallowSpaceAfterPrefixUnaryOperators": [ 36 | "++", 37 | "--", 38 | "+", 39 | "-" 40 | ], 41 | "disallowSpaceBeforePostfixUnaryOperators": [ 42 | "++", 43 | "--" 44 | ], 45 | "disallowKeywords": [ 46 | "with" 47 | ], 48 | "disallowMultipleLineBreaks": true, 49 | "disallowKeywordsOnNewLine": [ 50 | "else" 51 | ], 52 | "disallowSpaceAfterObjectKeys": true, 53 | "excludeFiles": ["node_modules/**", "js/vendor/**"] 54 | } -------------------------------------------------------------------------------- /app/templates/generic/_readme.md: -------------------------------------------------------------------------------- 1 | ## Laravel PHP Framework 2 | 3 | [![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) 4 | [![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework) 5 | [![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework) 6 | [![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework) 7 | [![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework) 8 | 9 | Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching. 10 | 11 | Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked. 12 | 13 | ## Laravel 5 generator 14 | 15 | Project setup using [Laravel 5 generator](https://github.com/jadjoubran/laravel5-generator) 16 | Answer a few questions and you're ready to start working on your Favorite laravel 5 application. 17 | You can also setup your laravel application to use Angular JS. 18 | 19 | 20 | ## Official Documentation 21 | 22 | Documentation for the framework can be found on the [Laravel website](http://laravel.com/docs). 23 | 24 | ## Contributing 25 | 26 | Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). 27 | 28 | ### License 29 | 30 | The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) 31 | -------------------------------------------------------------------------------- /app/templates/plain/_bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package", 3 | "version": "0.0.0", 4 | "private": true, 5 | "dependencies": {} 6 | } 7 | -------------------------------------------------------------------------------- /app/templates/plain/_gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | require('laravel-elixir-bower'); 3 | 4 | /* 5 | |-------------------------------------------------------------------------- 6 | | Elixir Asset Management 7 | |-------------------------------------------------------------------------- 8 | | 9 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 10 | | for your Laravel application. By default, we are compiling the Less 11 | | file for our application, as well as publishing vendor resources. 12 | | 13 | */ 14 | 15 | elixir(function(mix) { 16 | mix 17 | /* 18 | uncomment `.bower()` when you add your first bower component, 19 | or else gulp bower will blow up complaining that you don't have any bower components 20 | */ 21 | // .bower() 22 | .less('app.less'); 23 | }); 24 | -------------------------------------------------------------------------------- /app/templates/plain/_jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "bitwise": true, 5 | "camelcase": true, 6 | "curly": true, 7 | "eqeqeq": true, 8 | "immed": true, 9 | "indent": 2, 10 | "latedef": true, 11 | "newcap": true, 12 | "noarg": true, 13 | "undef": true, 14 | "strict": true 15 | } 16 | -------------------------------------------------------------------------------- /app/templates/plain/_package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package", 3 | "version": "0.0.0", 4 | "private": true, 5 | "devDependencies": { 6 | "gulp": "^3.8.8", 7 | "laravel-elixir": "*", 8 | "laravel-elixir-bower": "^0.1.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator-laravel5", 3 | "version": "0.1.1", 4 | "description": "Yeoman generator for Laravel5 with optional AngulatJS support", 5 | "license": "MIT", 6 | "main": "app/index.js", 7 | "repository": "jadjoubran/laravel5-generator", 8 | "author": { 9 | "name": "Jad Joubran", 10 | "email": "jad@jadjoubran.com", 11 | "url": "https://github.com/jadjoubran" 12 | }, 13 | "scripts": { 14 | "test": "mocha" 15 | }, 16 | "files": [ 17 | "app" 18 | ], 19 | "keywords": [ 20 | "yeoman-generator" 21 | ], 22 | "dependencies": { 23 | "yeoman-generator": "^0.19.0", 24 | "chalk": "^1.0.0", 25 | "yosay": "^1.0.2" 26 | }, 27 | "devDependencies": { 28 | "mocha": "*" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/test-app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var path = require('path'); 4 | var assert = require('yeoman-generator').assert; 5 | var helpers = require('yeoman-generator').test; 6 | var os = require('os'); 7 | 8 | describe('laravel5:app', function () { 9 | before(function (done) { 10 | helpers.run(path.join(__dirname, '../app')) 11 | .withOptions({ skipInstall: true }) 12 | .withPrompts({ someOption: true }) 13 | .on('end', done); 14 | }); 15 | 16 | it('creates files', function () { 17 | assert.file([ 18 | 'bower.json', 19 | 'package.json', 20 | '.editorconfig', 21 | '.jshintrc' 22 | ]); 23 | }); 24 | }); 25 | --------------------------------------------------------------------------------