mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-28 08:14:25 +02:00
Ivan - Fix gulp deploy [skip ci]
This commit is contained in:
parent
62f5354b6c
commit
57955cc5eb
@ -5,22 +5,17 @@ module.exports = {
|
|||||||
'serverport': 3000,
|
'serverport': 3000,
|
||||||
|
|
||||||
'scripts': {
|
'scripts': {
|
||||||
'src': './src/**/*.js',
|
'src': './src/*.js',
|
||||||
'dest': './build/js/'
|
'dest': './build/js/'
|
||||||
},
|
},
|
||||||
|
|
||||||
'phpserver': {
|
|
||||||
'base': './src/server/',
|
|
||||||
'port': 8000
|
|
||||||
},
|
|
||||||
|
|
||||||
'images': {
|
'images': {
|
||||||
'src': './src/assets/images/**/*.{jpeg,jpg,png}',
|
'src': './src/assets/images/**/*.{jpeg,jpg,png}',
|
||||||
'dest': './build/images/'
|
'dest': './build/images/'
|
||||||
},
|
},
|
||||||
|
|
||||||
'styles': {
|
'styles': {
|
||||||
'src': './src/**/*.scss',
|
'src': './src/*.scss',
|
||||||
'dest': './build/css/'
|
'dest': './build/css/'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
var config = require('../config');
|
|
||||||
var gulp = require('gulp');
|
|
||||||
var connect = require('gulp-connect-php');
|
|
||||||
|
|
||||||
gulp.task('serverphp', function() {
|
|
||||||
//connect.server(config.phpserver);
|
|
||||||
});
|
|
2
client/src/config.js
Normal file
2
client/src/config.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
root = 'http://localhost:3000';
|
||||||
|
apiRoot = 'http://localhost:3000/api';
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
||||||
|
<script src="/js/config.js"></script>
|
||||||
<script src="/js/main.js"></script>
|
<script src="/js/main.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -2,9 +2,6 @@ const _ = require('lodash');
|
|||||||
const APIUtils = require('lib-core/APIUtils');
|
const APIUtils = require('lib-core/APIUtils');
|
||||||
const SessionStore = require('lib-app/session-store');
|
const SessionStore = require('lib-app/session-store');
|
||||||
|
|
||||||
const url = 'http://localhost:3000';
|
|
||||||
const apiUrl = 'http://localhost:3000/api';
|
|
||||||
|
|
||||||
function processData (data, dataAsForm = false) {
|
function processData (data, dataAsForm = false) {
|
||||||
let newData;
|
let newData;
|
||||||
|
|
||||||
@ -31,7 +28,7 @@ module.exports = {
|
|||||||
call: function ({path, data, plain, dataAsForm}) {
|
call: function ({path, data, plain, dataAsForm}) {
|
||||||
console.log('request ' + path, data);
|
console.log('request ' + path, data);
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
APIUtils.post(apiUrl + path, processData(data, dataAsForm), dataAsForm)
|
APIUtils.post(apiRoot + path, processData(data, dataAsForm), dataAsForm)
|
||||||
.then(function (result) {
|
.then(function (result) {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
|
|
||||||
@ -53,14 +50,14 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getFileLink(filePath) {
|
getFileLink(filePath) {
|
||||||
return apiUrl + '/system/download?file=' + filePath;
|
return apiRoot + '/system/download?file=' + filePath;
|
||||||
},
|
},
|
||||||
|
|
||||||
getAPIUrl() {
|
getAPIUrl() {
|
||||||
return apiUrl;
|
return apiRoot;
|
||||||
},
|
},
|
||||||
|
|
||||||
getURL() {
|
getURL() {
|
||||||
return url;
|
return root;
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user