mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
[Ivan Diaz] - #8 - Code clean ups [skip ci]
This commit is contained in:
parent
c075451018
commit
ef6e6c90ef
@ -24,8 +24,8 @@ function buildScript(file, watch) {
|
|||||||
entries: [config.sourceDir + 'app/' + file],
|
entries: [config.sourceDir + 'app/' + file],
|
||||||
debug: !global.isProd,
|
debug: !global.isProd,
|
||||||
insertGlobalVars: {
|
insertGlobalVars: {
|
||||||
fixturesEnabled: function() {
|
noFixtures: function() {
|
||||||
return (util.env.api) ? "'enabled'" : "'disabled'";
|
return (util.env['api']) ? "'enabled'" : "'disabled'";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cache: {},
|
cache: {},
|
||||||
|
@ -9,8 +9,7 @@ if ( process.env.NODE_ENV !== 'production' ) {
|
|||||||
window.React = React;
|
window.React = React;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: This should be optional via gulp like: "gulp dev --no-fixtures"
|
if (noFixtures === 'disabled') {
|
||||||
if (fixturesEnabled === 'disabled') {
|
|
||||||
require('lib-app/fixtures-loader');
|
require('lib-app/fixtures-loader');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ let fixtures = (function () {
|
|||||||
fixtures.add(require('data/fixtures/user-fixtures'));
|
fixtures.add(require('data/fixtures/user-fixtures'));
|
||||||
|
|
||||||
_.each(fixtures.getAll(), function (fixture) {
|
_.each(fixtures.getAll(), function (fixture) {
|
||||||
//ADD FIXTURE TO MOCKJAX
|
|
||||||
mockjax({
|
mockjax({
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
url: 'http://localhost:3000/api/' + fixture.path,
|
url: 'http://localhost:3000/api/' + fixture.path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user