mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Update namespaces
This commit is contained in:
parent
debbfffae9
commit
b33dcfd8c6
38 changed files with 308 additions and 70 deletions
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Traits\SlugTrait;
|
||||
use App\Traits\SlugTrait;
|
||||
|
||||
class Album extends Model
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Traits\SlugTrait;
|
||||
use App\Traits\SlugTrait;
|
||||
|
||||
class Genre extends Model
|
||||
{
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use View;
|
||||
|
||||
class AccountController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use AlbumDownloader;
|
||||
use App;
|
||||
use App\Album;
|
||||
use App\ResourceLogItem;
|
||||
use App\Track;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use View;
|
||||
|
||||
class AlbumsController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Mobile;
|
||||
namespace App\Http\Controllers\Api\Mobile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Track;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Api\V1;
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Image;
|
||||
use App\Track;
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\Commands\SaveAccountSettingsCommand;
|
||||
use Cover;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class AccountController extends \ApiControllerBase
|
||||
class AccountController extends ApiControllerBase
|
||||
{
|
||||
public function getSettings()
|
||||
{
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Album;
|
||||
use App\Commands\CreateAlbumCommand;
|
||||
use App\Commands\DeleteAlbumCommand;
|
||||
use App\Commands\EditAlbumCommand;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\Image;
|
||||
use App\ResourceLogItem;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class AlbumsController extends \ApiControllerBase
|
||||
class AlbumsController extends ApiControllerBase
|
||||
{
|
||||
public function postCreate()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Album;
|
||||
use App\Comment;
|
||||
use App\Favourite;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\Image;
|
||||
use App\Track;
|
||||
use App\User;
|
||||
|
@ -13,7 +14,7 @@ use Illuminate\Support\Facades\App;
|
|||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class ArtistsController extends \ApiControllerBase
|
||||
class ArtistsController extends ApiControllerBase
|
||||
{
|
||||
public function getFavourites($slug)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App;
|
||||
use App\Commands\CreateCommentCommand;
|
||||
use App\Comment;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class CommentsController extends \ApiControllerBase
|
||||
class CommentsController extends ApiControllerBase
|
||||
{
|
||||
public function postCreate($type, $id)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\News;
|
||||
use App\Track;
|
||||
use Cover;
|
||||
|
@ -9,7 +10,7 @@ use Illuminate\Support\Facades\Auth;
|
|||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class DashboardController extends \ApiControllerBase
|
||||
class DashboardController extends ApiControllerBase
|
||||
{
|
||||
public function getIndex()
|
||||
{
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Album;
|
||||
use App\Commands\ToggleFavouriteCommand;
|
||||
use App\Favourite;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\Playlist;
|
||||
use App\Track;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class FavouritesController extends \ApiControllerBase
|
||||
class FavouritesController extends ApiControllerBase
|
||||
{
|
||||
public function postToggle()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Commands\ToggleFollowingCommand;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
|
||||
class FollowController extends \ApiControllerBase
|
||||
class FollowController extends ApiControllerBase
|
||||
{
|
||||
public function postToggle()
|
||||
{
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\Image;
|
||||
use Cover;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class ImagesController extends \ApiControllerBase
|
||||
class ImagesController extends ApiControllerBase
|
||||
{
|
||||
public function getOwned()
|
||||
{
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Commands\AddTrackToPlaylistCommand;
|
||||
use App\Commands\CreatePlaylistCommand;
|
||||
use App\Commands\DeletePlaylistCommand;
|
||||
use App\Commands\EditPlaylistCommand;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\Image;
|
||||
use App\Playlist;
|
||||
use App\ResourceLogItem;
|
||||
|
@ -13,7 +14,7 @@ use Illuminate\Support\Facades\Auth;
|
|||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class PlaylistsController extends \ApiControllerBase
|
||||
class PlaylistsController extends ApiControllerBase
|
||||
{
|
||||
public function postCreate()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\ProfileRequest;
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Genre;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\License;
|
||||
use App\ShowSong;
|
||||
use App\TrackType;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class TaxonomiesController extends \ApiControllerBase
|
||||
class TaxonomiesController extends ApiControllerBase
|
||||
{
|
||||
public function getAll()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Api\Web;
|
||||
namespace App\Http\Controllers\Api\Web;
|
||||
|
||||
use App\Commands\DeleteTrackCommand;
|
||||
use App\Commands\EditTrackCommand;
|
||||
use App\Commands\UploadTrackCommand;
|
||||
use App\Http\Controllers\ApiControllerBase;
|
||||
use App\ResourceLogItem;
|
||||
use App\Track;
|
||||
use Cover;
|
||||
|
@ -12,7 +13,7 @@ use Illuminate\Support\Facades\Auth;
|
|||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Response;
|
||||
|
||||
class TracksController extends \ApiControllerBase
|
||||
class TracksController extends ApiControllerBase
|
||||
{
|
||||
public function postUpload()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Response;
|
||||
|
||||
abstract class ApiControllerBase extends Controller
|
||||
{
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App;
|
||||
use App\User;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
class ArtistsController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Config;
|
||||
use DB;
|
||||
use Input;
|
||||
use Poniverse;
|
||||
use Redirect;
|
||||
use URL;
|
||||
|
||||
class AuthController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use View;
|
||||
|
||||
class ContentController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use View;
|
||||
|
||||
class FavouritesController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use View;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Image;
|
||||
use Config;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use Response;
|
||||
use URL;
|
||||
|
||||
class ImagesController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App;
|
||||
use App\Playlist;
|
||||
use App\ResourceLogItem;
|
||||
use App\Track;
|
||||
use Auth;
|
||||
use Illuminate\Support\Facades\Redirect;
|
||||
use View;
|
||||
|
||||
class PlaylistsController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\ResourceLogItem;
|
||||
use App\Track;
|
||||
use App\TrackFile;
|
||||
use Auth;
|
||||
use Config;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use Redirect;
|
||||
use Response;
|
||||
use View;
|
||||
|
||||
class TracksController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use View;
|
||||
|
||||
class UploaderController extends Controller
|
||||
{
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\User;
|
||||
use File;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class UsersController extends Controller
|
||||
|
|
|
@ -52,16 +52,15 @@ class Assets
|
|||
$files = [];
|
||||
$filesFound = [];
|
||||
foreach ($globs as $glob) {
|
||||
foreach (glob("../app/" . $glob, GLOB_BRACE) as $file) {
|
||||
foreach (glob("../resources/assets/" . $glob, GLOB_BRACE) as $file) {
|
||||
if (isset($filesFound[$file])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$filesFound[$file] = true;
|
||||
$files[] = substr($file, 7); // chop off ../app/
|
||||
$files[] = substr($file, 20); // chop off ../app/
|
||||
}
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Traits\SlugTrait;
|
||||
use App\Traits\SlugTrait;
|
||||
|
||||
class Playlist extends Model
|
||||
{
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"database"
|
||||
"database",
|
||||
"app/Library"
|
||||
],
|
||||
"psr-4": {
|
||||
"App\\": "app/"
|
||||
|
|
|
@ -95,7 +95,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'log' => 'single',
|
||||
'log' => 'daily',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
188
gulpfile.js
188
gulpfile.js
|
@ -1,16 +1,178 @@
|
|||
var elixir = require('laravel-elixir');
|
||||
var gulp = require("gulp"),
|
||||
plug = require("gulp-load-plugins")(),
|
||||
argv = require("yargs").argv;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Elixir Asset Management
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
|
||||
| for your Laravel application. By default, we are compiling the Sass
|
||||
| file for our application, as well as publishing vendor resources.
|
||||
|
|
||||
*/
|
||||
var plumberOptions = {
|
||||
errorHandler: plug.notify.onError("Error: <%= error.message %>")
|
||||
};
|
||||
|
||||
elixir(function(mix) {
|
||||
mix.sass('app.scss');
|
||||
gulp.task("scripts-app", function() {
|
||||
var paths = [
|
||||
"resources/assets/scripts/app/**/*.{coffee,js}",
|
||||
"resources/assets/scripts/base/**/*.{coffee,js}",
|
||||
"resources/assets/scripts/shared/**/*.{coffee,js}"
|
||||
];
|
||||
|
||||
if (!argv.production) {
|
||||
paths.push("resources/assets/scripts/debug/**/*.{coffee,js}");
|
||||
|
||||
// we also want to add the embed stuff, since we're in development mode
|
||||
// we want to watch embed files and re-compile them. However, we want
|
||||
// to leave this path out in production so that embed files are not bloating
|
||||
// the js file
|
||||
paths.push("resources/assets/scripts/embed/**/*.{coffee,js}");
|
||||
}
|
||||
|
||||
return argv.production
|
||||
// Production pipeline
|
||||
? gulp.src(paths, {base: "resources/assets/scripts"})
|
||||
.pipe(plug.plumber(plumberOptions))
|
||||
.pipe(plug.order([
|
||||
"resources/assets/scripts/base/jquery-2.0.2.js",
|
||||
"resources/assets/scripts/base/angular.js",
|
||||
"resources/assets/scripts/base/*.{coffee,js}",
|
||||
"resources/assets/scripts/shared/*.{coffee,js}",
|
||||
"resources/assets/scripts/app/*.{coffee,js}",
|
||||
"resources/assets/scripts/app/services/*.{coffee,js}",
|
||||
"resources/assets/scripts/app/filters/*.{coffee,js}",
|
||||
"resources/assets/scripts/app/directives/*.{coffee,js}",
|
||||
"resources/assets/scripts/app/controllers/*.{coffee,js}",
|
||||
"resources/assets/scripts/**/*.{coffee,js}"
|
||||
], {base: "."}))
|
||||
.pipe(plug.if(/\.coffee/, plug.coffee()))
|
||||
.pipe(plug.concat("app.js"))
|
||||
.pipe(plug.uglify())
|
||||
.pipe(gulp.dest("public/build/scripts"))
|
||||
// Development/watch pipeline
|
||||
: gulp.src(paths, {base: "resources/assets/scripts"})
|
||||
.pipe(plug.plumber(plumberOptions))
|
||||
.pipe(plug.cached('scripts'))
|
||||
.pipe(plug.sourcemaps.init())
|
||||
.pipe(plug.if(/\.coffee/, plug.coffee()))
|
||||
.pipe(plug.sourcemaps.write({
|
||||
includeContent: false,
|
||||
sourceRoot: "/dev-scripts/"
|
||||
}))
|
||||
.pipe(gulp.dest("public/build/scripts"));
|
||||
});
|
||||
|
||||
gulp.task("scripts-embed", function() {
|
||||
// note that this task should really only ever be invoked for production
|
||||
// since development-mode watches and builds include the embed scripts
|
||||
// already
|
||||
|
||||
var includedScripts = [
|
||||
"resources/assets/scripts/base/jquery-2.0.2.js",
|
||||
"resources/assets/scripts/base/jquery.viewport.js",
|
||||
"resources/assets/scripts/base/underscore.js",
|
||||
"resources/assets/scripts/base/moment.js",
|
||||
"resources/assets/scripts/base/jquery.timeago.js",
|
||||
"resources/assets/scripts/base/soundmanager2-nodebug.js",
|
||||
"resources/assets/scripts/embed/*.coffee"
|
||||
];
|
||||
|
||||
return gulp.src(includedScripts, {base: "resources/assets/scripts"})
|
||||
.pipe(plug.plumber(plumberOptions))
|
||||
.pipe(plug.if(/\.coffee/, plug.coffee()))
|
||||
.pipe(plug.order(includedScripts, {base: "."}))
|
||||
.pipe(plug.concat("embed.js"))
|
||||
.pipe(plug.uglify())
|
||||
.pipe(gulp.dest("public/build/scripts"));
|
||||
});
|
||||
|
||||
gulp.task("styles-app", function() {
|
||||
var includedStyles = [
|
||||
"resources/assets/styles/base/jquery-ui.css",
|
||||
"resources/assets/styles/base/colorbox.css",
|
||||
"resources/assets/styles/app.less"
|
||||
];
|
||||
|
||||
if (!argv.production) {
|
||||
includedStyles.push("resources/assets/styles/profiler.less");
|
||||
includedStyles.push("resources/assets/styles/prettify.css");
|
||||
|
||||
// we also want to add the embed stuff, since we're in development mode
|
||||
// we want to watch embed files and re-compile them. However, we want
|
||||
// to leave this path out in production so that embed files are not bloating
|
||||
// the css file
|
||||
includedStyles.push("resources/assets/styles/embed.css");
|
||||
|
||||
// Remove app.less from the cache so that it gets recompiled
|
||||
var styleCache = plug.cached.caches.styles;
|
||||
for (var file in styleCache) {
|
||||
if (!styleCache.hasOwnProperty(file))
|
||||
continue;
|
||||
|
||||
if (!endsWith(file, "app.less"))
|
||||
continue;
|
||||
|
||||
delete styleCache[file];
|
||||
}
|
||||
}
|
||||
|
||||
// note that we're not doing autoprefixer on dev builds for now to shave off roughly 600-700 milliseconds per
|
||||
// build. It's already taking forever to recompile the less
|
||||
|
||||
return argv.production
|
||||
// Production pipeline
|
||||
? gulp.src(includedStyles, {base: "resources/assets/styles"})
|
||||
.pipe(plug.plumber(plumberOptions))
|
||||
.pipe(plug.if(/\.less/, plug.less()))
|
||||
.pipe(plug.autoprefixer({browsers: ["last 2 versions"], cascade: false}))
|
||||
.pipe(plug.concat("app.css"))
|
||||
.pipe(plug.minifyCss())
|
||||
.pipe(gulp.dest("public/build/styles"))
|
||||
// Development pipeline
|
||||
: gulp.src(includedStyles, {base: "resources/assets/styles"})
|
||||
.pipe(plug.plumber(plumberOptions))
|
||||
.pipe(plug.cached("styles"))
|
||||
.pipe(plug.sourcemaps.init())
|
||||
.pipe(plug.if(/\.less/, plug.less()))
|
||||
.pipe(plug.sourcemaps.write({
|
||||
includeContent: false,
|
||||
sourceRoot: "/dev-styles/"
|
||||
}))
|
||||
.pipe(gulp.dest("public/build/styles"))
|
||||
.pipe(plug.livereload());
|
||||
});
|
||||
|
||||
gulp.task("styles-embed", function() {
|
||||
// note that this task should really only ever be invoked for production
|
||||
// since development-mode watches and builds include the embed styles
|
||||
// already
|
||||
|
||||
return gulp.src(["resources/assets/styles/embed.less"], {base: "resources/assets/styles"})
|
||||
.pipe(plug.less())
|
||||
.pipe(plug.autoprefixer({browsers: ["last 2 versions"], cascade: false}))
|
||||
.pipe(plug.concat("embed.css"))
|
||||
.pipe(plug.minifyCss())
|
||||
.pipe(gulp.dest("public/build/styles"));
|
||||
});
|
||||
|
||||
gulp.task('copy:templates', function() {
|
||||
gulp.src([
|
||||
'public/templates/**/*.html'
|
||||
])
|
||||
.pipe(plug.angularTemplatecache({
|
||||
module: "ponyfm",
|
||||
root: "/templates"
|
||||
}))
|
||||
.pipe(gulp.dest('public/build/scripts'));
|
||||
});
|
||||
|
||||
gulp.task('build', [
|
||||
'scripts-app',
|
||||
'styles-app',
|
||||
'scripts-embed',
|
||||
'styles-embed',
|
||||
]);
|
||||
|
||||
gulp.task("watch", function() {
|
||||
plug.livereload.listen();
|
||||
gulp.watch("resources/assets/scripts/**/*.{coffee,js}", ["scripts-app"]);
|
||||
gulp.watch("resources/assets/styles/**/*.{css,less}", ["styles-app"]);
|
||||
});
|
||||
|
||||
function endsWith(str, suffix) {
|
||||
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
||||
}
|
32
package.json
32
package.json
|
@ -1,10 +1,30 @@
|
|||
{
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.8"
|
||||
"name": "pony.fm",
|
||||
"version": "1.0.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@phabricator.poniverse.net/diffusion/PF/pony-fm.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"laravel-elixir": "^2.0.0",
|
||||
"bootstrap-sass": "^3.0.0"
|
||||
"packages": {},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.11",
|
||||
"gulp-angular-templatecache": "^1.6.0",
|
||||
"gulp-autoprefixer": "^2.2.0",
|
||||
"gulp-cached": "^1.0.4",
|
||||
"gulp-coffee": "^2.3.1",
|
||||
"gulp-concat": "^2.5.2",
|
||||
"gulp-if": "^1.2.5",
|
||||
"gulp-less": "^3.0.3",
|
||||
"gulp-livereload": "^3.8.0",
|
||||
"gulp-load-plugins": "^0.10.0",
|
||||
"gulp-minify-css": "^1.1.0",
|
||||
"gulp-notify": "^2.2.0",
|
||||
"gulp-order": "^1.1.1",
|
||||
"gulp-plumber": "^1.0.0",
|
||||
"gulp-sourcemaps": "^1.5.1",
|
||||
"gulp-uglify": "^1.2.0",
|
||||
"gulp-util": "^3.0.4",
|
||||
"yargs": "^3.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
@section('styles')
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Josefin+Sans" />
|
||||
<link rel="stylesheet" href="/styles/loader.css" />
|
||||
{{ Assets::styleIncludes() }}
|
||||
{!! Assets::styleIncludes() !!}
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
|
@ -123,7 +123,7 @@
|
|||
})();
|
||||
</script>
|
||||
|
||||
{{ Assets::scriptIncludes() }}
|
||||
{!! Assets::scriptIncludes() !!}
|
||||
|
||||
@if (!Config::get("app.debug"))
|
||||
<script src="/build/scripts/templates.js"></script>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<meta property="fb:admins" content="1165335382" />
|
||||
<base href="/" />
|
||||
|
||||
{{ Assets::styleIncludes('embed') }}
|
||||
{!! Assets::styleIncludes('embed') !!}
|
||||
</head>
|
||||
<body>
|
||||
@if($track->explicit && !(Auth::check() && Auth::user()->can_see_explicit_content))
|
||||
|
@ -50,7 +50,7 @@
|
|||
var pfm = {token: '{{ Session::token() }}'}
|
||||
</script>
|
||||
|
||||
{{ Assets::scriptIncludes('embed') }}
|
||||
{!! Assets::scriptIncludes('embed') !!}
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
|
|
Loading…
Reference in a new issue