Skip to content

Commit

Permalink
artisan generator for new config
Browse files Browse the repository at this point in the history
  • Loading branch information
Jad Joubran committed Aug 13, 2015
1 parent 514544d commit d9a5e0b
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## Changelog
artisan ## Changelog

### v2.6.2
+ fixed elixir watcher for less
+ artisan generator for creating a new service **artisan ng:service name**
+ artisan generator for creating a new filter **artisan ng:filter name**
+ artisan generator for creating a new config **artisan ng:config name**

### v2.6.1
+ updated bower dependencies (angular material released 0.10.1)
Expand Down
4 changes: 2 additions & 2 deletions angular/config/theme.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(function(){
"use strict";

angular.module('app.config').config( function($mdThemingProvider) {
angular.module('app.config').config(function($mdThemingProvider) {
/* For more info, visit https://material.angularjs.org/#/Theming/01_introduction */
$mdThemingProvider.theme('default')
.primaryPalette('indigo')
.accentPalette('grey')
.warnPalette('red');
});

})();
})();
48 changes: 48 additions & 0 deletions app/Console/Commands/AngularConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use File;

class AngularConfig extends Command
{
/**
* The name and signature of the console command.
* @var string
*/
protected $signature = 'ng:config {name}';

/**
* The console command description.
* @var string
*/
protected $description = 'Create a new config inside the angular/config folder.';

/**
* Create a new command instance.
* @return void
*/
public function __construct()
{
parent::__construct();
}

/**
* Execute the console command.
* @return mixed
*/
public function handle()
{
$name = $this->argument('name');

$js = file_get_contents(__DIR__.'/Stubs/AngularConfig/config.js.stub');

$folder = __DIR__.'/../../../angular/config/';

//create config (.js)
File::put($folder.'/'.$name.'.js', $js);

$this->info('Config created successfully.');
}
}
8 changes: 8 additions & 0 deletions app/Console/Commands/Stubs/AngularConfig/config.js.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(function(){
"use strict";

angular.module('app.config').config(function(){
//
});

})();
1 change: 1 addition & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Kernel extends ConsoleKernel
'App\Console\Commands\AngularDialog',
'App\Console\Commands\AngularService',
'App\Console\Commands\AngularFilter',
'App\Console\Commands\AngularConfig',
];

/**
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Here are the goodies that you'll get:
* Angular
* Angular Material
* Elixir 3.0
* artisan generatores for angular (artisan ng:feature name, artisan ng:dialog name, etc..)
* [JWT auth](https://scotch.io/tutorials/token-based-authentication-for-angularjs-and-laravel-apps)
* Laravel [DebugBar](https://github.com/barryvdh/laravel-debugbar)
* Angular [UI router](https://github.com/angular-ui/ui-router)
Expand Down Expand Up @@ -54,11 +55,10 @@ Open a new issue, I'd love to help.
## Planned features


- artisan generators for config + update overview
- simplify gulpfile using elixir.json
- custom elixir task: make jshint optional
- Migrate to open source hosting
- New demo pages: Toasts, Dialogs, Unsupported Browser, generators, Elixir, Rest API, loading bar, debugbar, filters, JWT
- New demo pages: Toasts, Dialogs, Unsupported Browser, artisan angular generators, Elixir, Rest API, loading bar, debugbar, filters, JWT
- make gulp --production part of the automated release
- make readme more appealing
- jwt auth example (with seed) + route authentication
Expand Down

0 comments on commit d9a5e0b

Please sign in to comment.