Skip to content

Commit e968ed9

Browse files
author
Younès EL BIACHE
committed
make adminlte work; replaced grunt by mix (webpack)
1 parent 45372ae commit e968ed9

File tree

104 files changed

+446
-14715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+446
-14715
lines changed

.eslintrc.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// http://eslint.org/docs/rules/
3+
"parserOptions": {
4+
"sourceType": "module",
5+
"ecmaVersion": 6,
6+
"ecmaFeatures": {
7+
"jsx": true
8+
}
9+
},
10+
11+
"rules": {
12+
"no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default)
13+
"quote-props": 0
14+
}
15+
}

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Yoda
22

33
## Intro
4-
Yoda is a Laravel application that curates & classifies trending content from Tweeter.
4+
Yoda is a Laravel application that curates & classifies trending content from Twitter.
55

66
It does the following routine:
77
1. Fetches tweets from a Tweeter user list every X minutes.
@@ -131,3 +131,4 @@ php artisan nlp:test is_law-fr
131131
php artisan nlp:test law-fr
132132
cd ./storage/app/classifiers # generated models
133133
```
134+

bootstrap/app.php

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
realpath(__DIR__.'/../')
1616
);
1717

18+
require_once __DIR__.'/helpers.php';
19+
1820
/*
1921
|--------------------------------------------------------------------------
2022
| Bind Important Interfaces

bootstrap/helpers.php

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
use Illuminate\Support\HtmlString;
4+
5+
if (! function_exists('mix')) {
6+
/**
7+
* Get the path to a versioned Mix file.
8+
*
9+
* @param string $path
10+
* @param string $manifestDirectory
11+
* @return \Illuminate\Support\HtmlString
12+
*
13+
* @throws \Exception
14+
*/
15+
function mix($path, $manifestDirectory = '')
16+
{
17+
static $manifests = [];
18+
19+
if (! starts_with($path, '/')) {
20+
$path = "/{$path}";
21+
}
22+
23+
if ($manifestDirectory && ! starts_with($manifestDirectory, '/')) {
24+
$manifestDirectory = "/{$manifestDirectory}";
25+
}
26+
27+
$manifestKey = $manifestDirectory ? $manifestDirectory : '/';
28+
29+
if (file_exists(public_path($manifestDirectory.'/hot'))) {
30+
return new HtmlString("//localhost:8080{$path}");
31+
}
32+
33+
if (in_array($manifestKey, $manifests)) {
34+
$manifest = $manifests[$manifestKey];
35+
} else {
36+
if (! file_exists($manifestPath = public_path($manifestDirectory.'/mix-manifest.json'))) {
37+
throw new Exception('The Mix manifest does not exist.');
38+
}
39+
40+
$manifests[$manifestKey] = $manifest = json_decode(
41+
file_get_contents($manifestPath), true
42+
);
43+
}
44+
45+
if (! array_key_exists($path, $manifest)) {
46+
throw new Exception(
47+
"Unable to locate Mix file: {$path}. Please check your ".
48+
'webpack.mix.js output paths and try again.'
49+
);
50+
}
51+
52+
return new HtmlString($manifestDirectory.$manifest[$path]);
53+
}
54+
}

config/caffeinated.themes.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
|---------------------------------------------------------------------
88
|
99
*/
10-
'active' => 'pixeladmin',
10+
'active' => 'adminlte',
1111
/*
1212
|---------------------------------------------------------------------
1313
| Default theme
1414
|---------------------------------------------------------------------
1515
|
1616
*/
17-
'default' => 'pixeladmin',
17+
'default' => 'adminlte',
1818
/*
1919
|---------------------------------------------------------------------
2020
| Theme class

gruntfile.js

-207
This file was deleted.

package.json

+16-23
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
11
{
22
"private": true,
3+
"scripts": {
4+
"dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
5+
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6+
"watch-poll": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7+
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
8+
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
9+
},
310
"devDependencies": {
4-
"babelify": "^6.1.2",
5-
"browserify": "^10.2.4",
6-
"globby": "^2.0.0",
7-
"grunt": "^0.4.5",
8-
"grunt-concurrent": "^1.0.1",
9-
"grunt-contrib-concat": "^0.5.1",
10-
"grunt-contrib-less": "~1.0.1",
11-
"grunt-contrib-uglify": "~0.9.1",
12-
"grunt-contrib-watch": "~0.6.1",
13-
"grunt-gulp": "^0.1.0",
14-
"grunt-hash": "^0.5.0",
15-
"grunt-newer": "^1.1.1",
16-
"gulp": "^3.8.8",
17-
"gulp-rename": "^1.2.2",
18-
"install": "~0.1.8",
19-
"jit-grunt": "^0.9.1",
20-
"laravel-elixir": "^2.0.0",
21-
"laravel-elixir-uglify": "^1.1.0",
22-
"npm": "~2.11.2",
23-
"through2": "^2.0.0",
24-
"time-grunt": "^1.2.1",
25-
"vinyl-source-stream": "^1.1.0",
26-
"vinyl-transform": "^1.0.0"
11+
"axios": "^0.17",
12+
"bootstrap-sass": "^3.3.7",
13+
"cross-env": "^5.1",
14+
"jquery": "^3.2",
15+
"laravel-mix": "^1.0",
16+
"less": "^2.7.3",
17+
"less-loader": "^4.0.5",
18+
"lodash": "^4.17.4",
19+
"vue": "^2.1.10"
2720
}
2821
}

public/mix-manifest.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"/js/Routes.js": "/js/Routes.js?id=6b4a0f9f7230c222721f",
3+
"/css/yeb.css": "/css/yeb.css?id=4070b5b069028932086e",
4+
"/css/yoda.css": "/css/yoda.css?id=5c85153ff646b31a1e6f",
5+
"/js/vendor.js": "/js/vendor.js?id=f15a628fc659add15123",
6+
"/js/adminlte.js": "/js/adminlte.js?id=a163c7a76167addff645",
7+
"/css/adminlte.css": "/css/adminlte.css?id=de676570b9053b306c8e",
8+
"/css/vendor.css": "/css/vendor.css?id=d41d8cd98f00b204e980"
9+
}

0 commit comments

Comments
 (0)