-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
48 lines (40 loc) · 1.12 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* index.js
*
* @author: Harish Anchu <[email protected]>
* @copyright Copyright (c) 2015-2016, QuorraJS.
* @license See LICENSE.txt
*/
var path = require('path');
var _ = require('lodash');
function elixir() {
require('laravel-elixir');
overrideConfig();
require('./bootstrap/loadExtensions');
overrideTasks();
return Elixir;
}
/**
* Allow for config overrides, via an elixirConfig.js file.
*/
function overrideConfig() {
_.merge(Elixir.config, require(path.join(process.cwd(), 'elixirConfig.js')));
}
/**
* Ovrride some of the tasks provided by the laravel-elixir module
*/
function overrideTasks() {
function noop() {
Elixir.log.heading.error('Quorra don\'t have php tests!')
}
Elixir.extend('phpSpec', noop);
Elixir.extend('phpunit', noop);
Elixir.extend('babel', function () {
new Elixir.Task('babel', function () {
Elixir.log.heading('Alert!').heading("'mix.babel()' is not supported in Quorra Elixir. " +
"You'll want to instead call 'mix.rollup().'");
process.exit(1);
});
});
}
module.exports = elixir();