From 0840f59a64d2a7b1ea3fa047ca5f676c8484881d Mon Sep 17 00:00:00 2001 From: Javi Gallego Date: Fri, 4 Nov 2016 11:32:27 +0100 Subject: [PATCH] reorganizacion de directorios --- @salix-services/app/server/boot/routes.js | 18 ++++++++++++++++++ .eslintrc.js => @salix/.eslintrc.js | 0 .gitignore => @salix/.gitignore | 0 @salix/app/src/bootstrap.js | 4 ++-- @salix/app/src/configroutes.js | 2 +- @salix/app/src/spliting/import.tpl.js | 2 +- @salix/app/src/spliting/require.tpl.js | 2 +- @salix/core/src/interpolate.js | 2 +- @salix/core/src/module.js | 2 +- @salix/crud/src/module.js | 4 ++-- gulpfile.js => @salix/gulpfile.js | 6 +++--- index.html => @salix/index.html | 0 login.html => @salix/login.html | 0 @salix/login/src/module.js | 4 ++-- package.json => @salix/package.json | 0 server.js => @salix/server.js | 0 webpack.config.js => @salix/webpack.config.js | 4 ++-- 17 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 @salix-services/app/server/boot/routes.js rename .eslintrc.js => @salix/.eslintrc.js (100%) rename .gitignore => @salix/.gitignore (100%) rename gulpfile.js => @salix/gulpfile.js (90%) rename index.html => @salix/index.html (100%) rename login.html => @salix/login.html (100%) rename package.json => @salix/package.json (100%) rename server.js => @salix/server.js (100%) rename webpack.config.js => @salix/webpack.config.js (93%) diff --git a/@salix-services/app/server/boot/routes.js b/@salix-services/app/server/boot/routes.js new file mode 100644 index 000000000..ce898ee38 --- /dev/null +++ b/@salix-services/app/server/boot/routes.js @@ -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'); + } + }); +}; +*/ \ No newline at end of file diff --git a/.eslintrc.js b/@salix/.eslintrc.js similarity index 100% rename from .eslintrc.js rename to @salix/.eslintrc.js diff --git a/.gitignore b/@salix/.gitignore similarity index 100% rename from .gitignore rename to @salix/.gitignore diff --git a/@salix/app/src/bootstrap.js b/@salix/app/src/bootstrap.js index 0c9980703..1b3ff0293 100644 --- a/@salix/app/src/bootstrap.js +++ b/@salix/app/src/bootstrap.js @@ -1,5 +1,5 @@ -import {ng} from '@salix/vendor'; -import {NAME} from '@salix/core'; +import {ng} from 'vendor'; +import {NAME} from 'core'; export const bootstrap = () => { const selector = 'selector' diff --git a/@salix/app/src/configroutes.js b/@salix/app/src/configroutes.js index 9f132c40b..bc1f47b54 100644 --- a/@salix/app/src/configroutes.js +++ b/@salix/app/src/configroutes.js @@ -1,4 +1,4 @@ -import * as core from '@salix/core'; +import * as core from 'core'; import * as spliting from './spliting'; import * as deps from './spliting/deps.json'; diff --git a/@salix/app/src/spliting/import.tpl.js b/@salix/app/src/spliting/import.tpl.js index 9c17e355d..86ad3e68b 100644 --- a/@salix/app/src/spliting/import.tpl.js +++ b/@salix/app/src/spliting/import.tpl.js @@ -1 +1 @@ -import * as core from '@salix/core'; +import * as core from 'core'; diff --git a/@salix/app/src/spliting/require.tpl.js b/@salix/app/src/spliting/require.tpl.js index 345fc1685..7459a8e94 100644 --- a/@salix/app/src/spliting/require.tpl.js +++ b/@salix/app/src/spliting/require.tpl.js @@ -2,7 +2,7 @@ export const $module = () => { return new Promise(resolve => { require.ensure([], () => { - require('@salix/$module'); + require('$module'); resolve('$module'); }, "salix.$module"); }); diff --git a/@salix/core/src/interpolate.js b/@salix/core/src/interpolate.js index cdcc387ff..f2e7448c4 100644 --- a/@salix/core/src/interpolate.js +++ b/@salix/core/src/interpolate.js @@ -1,6 +1,6 @@ import {module as _module} from './module'; import * as util from './util'; -import {ng} from '@salix/vendor' +import {ng} from 'vendor' export const NAME = util.getProviderName('interpolate'); diff --git a/@salix/core/src/module.js b/@salix/core/src/module.js index a3391528c..f2333140c 100644 --- a/@salix/core/src/module.js +++ b/@salix/core/src/module.js @@ -1,4 +1,4 @@ -import * as vendors from '@salix/vendor'; +import * as vendors from 'vendor'; import {getModuleName,getVendorDependencies} from './util'; const DEPENDENCIES = getVendorDependencies(vendors) diff --git a/@salix/crud/src/module.js b/@salix/crud/src/module.js index 144aaf252..5db9a9344 100644 --- a/@salix/crud/src/module.js +++ b/@salix/crud/src/module.js @@ -1,5 +1,5 @@ -import * as vendors from '@salix/vendor'; -import * as core from '@salix/core'; +import * as vendors from 'vendor'; +import * as core from 'core'; export const NAME = 'crud'; export const module = vendors.ng.module(NAME,[]); diff --git a/gulpfile.js b/@salix/gulpfile.js similarity index 90% rename from gulpfile.js rename to @salix/gulpfile.js index bcd4d2443..6a9b8a83e 100644 --- a/gulpfile.js +++ b/@salix/gulpfile.js @@ -12,7 +12,7 @@ var globalTpl = 'var routes = {<%=contents%>\n}'; gulp.task ('routes', function () { - return gulp.src ('./@salix/**/routes.js') + return gulp.src ('./**/routes.js') .pipe (wrap (fileTpl)) .pipe (concat ('salix.routes.js', {newLine: ','})) .pipe (wrap (globalTpl)) @@ -22,7 +22,7 @@ gulp.task ('routes', function () // Spliting -var baseDir = './@salix/app/src/spliting'; +var baseDir = './app/src/spliting'; var depsFile = baseDir +'/deps.json'; function splitingFunc () @@ -43,7 +43,7 @@ function splitingFunc () for (var modName in modules) { var deps = modules[modName]; - var splitFile = './@salix/'+ modName +'/src/spliting.js'; + var splitFile = './'+ modName +'/src/spliting.js'; try { fs.unlinkSync (splitFile); diff --git a/index.html b/@salix/index.html similarity index 100% rename from index.html rename to @salix/index.html diff --git a/login.html b/@salix/login.html similarity index 100% rename from login.html rename to @salix/login.html diff --git a/@salix/login/src/module.js b/@salix/login/src/module.js index 74a20e7af..d286f7701 100644 --- a/@salix/login/src/module.js +++ b/@salix/login/src/module.js @@ -1,5 +1,5 @@ -import * as vendors from '@salix/vendor'; -import * as core from '@salix/core'; +import * as vendors from 'vendor'; +import * as core from 'core'; export const NAME = 'login'; export const module = vendors.ng.module(NAME,[core.NAME]); diff --git a/package.json b/@salix/package.json similarity index 100% rename from package.json rename to @salix/package.json diff --git a/server.js b/@salix/server.js similarity index 100% rename from server.js rename to @salix/server.js diff --git a/webpack.config.js b/@salix/webpack.config.js similarity index 93% rename from webpack.config.js rename to @salix/webpack.config.js index e288e78ec..315af12b6 100644 --- a/webpack.config.js +++ b/@salix/webpack.config.js @@ -5,8 +5,8 @@ var path = require('path'); module.exports = { entry: { - 'salix.app': ['@salix/app'], - 'salix.login': ['@salix/login'] + 'salix.app': ['app'], + 'salix.login': ['login'] }, output: { path: path.join(__dirname, 'build', 'public'),