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,
|
||||
|
||||
'scripts': {
|
||||
'src': './src/**/*.js',
|
||||
'src': './src/*.js',
|
||||
'dest': './build/js/'
|
||||
},
|
||||
|
||||
'phpserver': {
|
||||
'base': './src/server/',
|
||||
'port': 8000
|
||||
},
|
||||
|
||||
'images': {
|
||||
'src': './src/assets/images/**/*.{jpeg,jpg,png}',
|
||||
'dest': './build/images/'
|
||||
},
|
||||
|
||||
'styles': {
|
||||
'src': './src/**/*.scss',
|
||||
'src': './src/*.scss',
|
||||
'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>
|
||||
|
||||
<script src="/js/config.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
</body>
|
||||
|
@ -2,9 +2,6 @@ const _ = require('lodash');
|
||||
const APIUtils = require('lib-core/APIUtils');
|
||||
const SessionStore = require('lib-app/session-store');
|
||||
|
||||
const url = 'http://localhost:3000';
|
||||
const apiUrl = 'http://localhost:3000/api';
|
||||
|
||||
function processData (data, dataAsForm = false) {
|
||||
let newData;
|
||||
|
||||
@ -31,7 +28,7 @@ module.exports = {
|
||||
call: function ({path, data, plain, dataAsForm}) {
|
||||
console.log('request ' + path, data);
|
||||
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) {
|
||||
console.log(result);
|
||||
|
||||
@ -53,14 +50,14 @@ module.exports = {
|
||||
},
|
||||
|
||||
getFileLink(filePath) {
|
||||
return apiUrl + '/system/download?file=' + filePath;
|
||||
return apiRoot + '/system/download?file=' + filePath;
|
||||
},
|
||||
|
||||
getAPIUrl() {
|
||||
return apiUrl;
|
||||
return apiRoot;
|
||||
},
|
||||
|
||||
getURL() {
|
||||
return url;
|
||||
return root;
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user