reorganizacion de directorios
This commit is contained in:
parent
5bb13af69d
commit
0840f59a64
|
@ -0,0 +1,18 @@
|
||||||
|
/*module.exports = function(app) {
|
||||||
|
|
||||||
|
var uid = require('uid2');
|
||||||
|
// Install a "/ping" route that returns "pong"
|
||||||
|
app.get('/login', function(req, res) {
|
||||||
|
var uid(64,function(){
|
||||||
|
|
||||||
|
});
|
||||||
|
var token = req.query.access_token;
|
||||||
|
if (token) {
|
||||||
|
return res.redirect('/');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return res.redirect('/login');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
*/
|
|
@ -1,5 +1,5 @@
|
||||||
import {ng} from '@salix/vendor';
|
import {ng} from 'vendor';
|
||||||
import {NAME} from '@salix/core';
|
import {NAME} from 'core';
|
||||||
|
|
||||||
export const bootstrap = () => {
|
export const bootstrap = () => {
|
||||||
const selector = 'selector'
|
const selector = 'selector'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as core from '@salix/core';
|
import * as core from 'core';
|
||||||
import * as spliting from './spliting';
|
import * as spliting from './spliting';
|
||||||
import * as deps from './spliting/deps.json';
|
import * as deps from './spliting/deps.json';
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
import * as core from '@salix/core';
|
import * as core from 'core';
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
export const $module = () => {
|
export const $module = () => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
require.ensure([], () => {
|
require.ensure([], () => {
|
||||||
require('@salix/$module');
|
require('$module');
|
||||||
resolve('$module');
|
resolve('$module');
|
||||||
}, "salix.$module");
|
}, "salix.$module");
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import {module as _module} from './module';
|
import {module as _module} from './module';
|
||||||
import * as util from './util';
|
import * as util from './util';
|
||||||
import {ng} from '@salix/vendor'
|
import {ng} from 'vendor'
|
||||||
|
|
||||||
export const NAME = util.getProviderName('interpolate');
|
export const NAME = util.getProviderName('interpolate');
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as vendors from '@salix/vendor';
|
import * as vendors from 'vendor';
|
||||||
import {getModuleName,getVendorDependencies} from './util';
|
import {getModuleName,getVendorDependencies} from './util';
|
||||||
|
|
||||||
const DEPENDENCIES = getVendorDependencies(vendors)
|
const DEPENDENCIES = getVendorDependencies(vendors)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import * as vendors from '@salix/vendor';
|
import * as vendors from 'vendor';
|
||||||
import * as core from '@salix/core';
|
import * as core from 'core';
|
||||||
|
|
||||||
export const NAME = 'crud';
|
export const NAME = 'crud';
|
||||||
export const module = vendors.ng.module(NAME,[]);
|
export const module = vendors.ng.module(NAME,[]);
|
||||||
|
|
|
@ -12,7 +12,7 @@ var globalTpl = 'var routes = {<%=contents%>\n}';
|
||||||
|
|
||||||
gulp.task ('routes', function ()
|
gulp.task ('routes', function ()
|
||||||
{
|
{
|
||||||
return gulp.src ('./@salix/**/routes.js')
|
return gulp.src ('./**/routes.js')
|
||||||
.pipe (wrap (fileTpl))
|
.pipe (wrap (fileTpl))
|
||||||
.pipe (concat ('salix.routes.js', {newLine: ','}))
|
.pipe (concat ('salix.routes.js', {newLine: ','}))
|
||||||
.pipe (wrap (globalTpl))
|
.pipe (wrap (globalTpl))
|
||||||
|
@ -22,7 +22,7 @@ gulp.task ('routes', function ()
|
||||||
|
|
||||||
// Spliting
|
// Spliting
|
||||||
|
|
||||||
var baseDir = './@salix/app/src/spliting';
|
var baseDir = './app/src/spliting';
|
||||||
var depsFile = baseDir +'/deps.json';
|
var depsFile = baseDir +'/deps.json';
|
||||||
|
|
||||||
function splitingFunc ()
|
function splitingFunc ()
|
||||||
|
@ -43,7 +43,7 @@ function splitingFunc ()
|
||||||
for (var modName in modules)
|
for (var modName in modules)
|
||||||
{
|
{
|
||||||
var deps = modules[modName];
|
var deps = modules[modName];
|
||||||
var splitFile = './@salix/'+ modName +'/src/spliting.js';
|
var splitFile = './'+ modName +'/src/spliting.js';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
fs.unlinkSync (splitFile);
|
fs.unlinkSync (splitFile);
|
|
@ -1,5 +1,5 @@
|
||||||
import * as vendors from '@salix/vendor';
|
import * as vendors from 'vendor';
|
||||||
import * as core from '@salix/core';
|
import * as core from 'core';
|
||||||
|
|
||||||
export const NAME = 'login';
|
export const NAME = 'login';
|
||||||
export const module = vendors.ng.module(NAME,[core.NAME]);
|
export const module = vendors.ng.module(NAME,[core.NAME]);
|
||||||
|
|
|
@ -5,8 +5,8 @@ var path = require('path');
|
||||||
module.exports =
|
module.exports =
|
||||||
{
|
{
|
||||||
entry: {
|
entry: {
|
||||||
'salix.app': ['@salix/app'],
|
'salix.app': ['app'],
|
||||||
'salix.login': ['@salix/login']
|
'salix.login': ['login']
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'build', 'public'),
|
path: path.join(__dirname, 'build', 'public'),
|
Loading…
Reference in New Issue