This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

eh i dont think ill use laravel's elixir

  • Loading branch information...
jung35 committed Oct 16, 2015
1 parent dea8357 commit 4ff1e2547c6e0ab95a7e6de0282bc15b0a7538cc
View
@@ -6,4 +6,6 @@ Thumbs.db
.phpintel
/public/css
/public/js
/public/js
/.idea
@@ -263,20 +263,7 @@ private function getMyListsDetailed($userId)
DB::raw('count(DISTINCT subscription.id) as sub_count'),
]);
foreach($myLists as $myList)
{
$return[] = [
'id' => $myList->id,
'title' => $myList->title,
'privacy' => $myList->privacy,
'created_at' => $myList->created_at->format("M j Y"),
'users_in_list' => $myList->users_in_list,
'sub_count' => $myList->sub_count,
];
}
return $return;
return $myLists;
}
private function findValidProfiles($search)
View
@@ -1,4 +1,7 @@
var elixir = require('laravel-elixir');
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
var scripts = [
'Notify.js',
@@ -12,8 +15,21 @@ var scripts = [
'Router.js',
]
elixir(function(mix) {
mix.less('app.less')
.babel(scripts)
.browserify('all.js', null, 'public/js');
});
gulp.task('scripts', function() {
browserify('resources/assets/js/main.js')
.transform(babelify.configure({ optional: ['es7.decorators', 'es7.classProperties'] }))
.bundle()
.pipe(source('all.js'))
.pipe(gulp.dest('public/js'))
});
gulp.task('watch', function() {
gulp.watch('resources/assets/js/**/*.js', ['scripts']);
});
gulp.task('default', ['watch', 'scripts']);
// elixir(function(mix) {
// mix.less('app.less');
// mix.babel(scripts).browserify('all.js', null, 'public/js');
// });
View
@@ -1,11 +1,14 @@
{
"private": true,
"dependencies": {
"bootstrap-sass": "^3.0.0",
"autobind-decorator": "^1.3.2",
"babelify": "^6.3.0",
"browserify": "^11.2.0",
"es6-shim": "^0.33.6",
"gulp": "^3.8.8",
"history": "^1.9.1",
"laravel-elixir": "^3.0.0",
"react": "^0.13.3",
"react-router": "1.0.0-rc1"
"react-router": "1.0.0-rc1",
"vinyl-source-stream": "^1.1.0"
}
}
View
@@ -1,37 +1,14 @@
'use strict';
import React from 'react';
import { Router, Route, Link, IndexRoute } from 'react-router'
import ListHandler from './ListHandler';
import autobind from 'autobind-decorator';
import { Header, Footer } from './Partials';
import createBrowserHistory from 'history/lib/createBrowserHistory'
var authCheck = $('meta[name="auth"]').attr('content');
var _token = $('meta[name="_token"]').attr('content');
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': _token } });
class App extends React.Component {
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.updateMyList = this.updateMyList.bind(this);
this.markCurrentList = this.markCurrentList.bind(this);
this.updateCurrentList = this.updateCurrentList.bind(this);
}
updateMyList(myList) {
this.setState($.extend({}, this.state, { my_list: myList }));
}
markCurrentList(listInfo) {
this.setState($.extend({}, this.state, { listInfo: listInfo }));
}
updateCurrentList(currentList) {
this.state.listInfo = $.extend({}, this.state.listInfo, currentList)
this.setState(this.state);
}
render() {
@@ -49,4 +26,20 @@ class App extends React.Component {
</div>
);
}
@autobind
updateMyList(myList) {
this.setState($.extend({}, this.state, { my_list: myList }));
}
@autobind
markCurrentList(listInfo) {
this.setState($.extend({}, this.state, { listInfo: listInfo }));
}
@autobind
updateCurrentList(currentList) {
this.state.listInfo = $.extend({}, this.state.listInfo, currentList)
this.setState(this.state);
}
}
@@ -1,13 +1,21 @@
'use strict';
class BasicComp extends React.Component {
import React from 'react';
import Notify from './Notify';
export default class BasicComp extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.request = {};
this.notify = new Notify;
this.authCheck = $('meta[name="auth"]').attr('content');
this._token = $('meta[name="_token"]').attr('content');
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': this._token } });
}
componentWillUnmount() {
Oops, something went wrong.

0 comments on commit 4ff1e25

Please sign in to comment.