Merge branch 'master' of ssh://git.verdnatura.es:/var/lib/git/salix
This commit is contained in:
commit
4d6ad1a910
|
@ -18,4 +18,4 @@ export const pagos = () => {
|
|||
require.ensure([], () => {
|
||||
require('@salix/pagos')
|
||||
}, "salix.pagos");
|
||||
};
|
||||
};
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"route": "buys",
|
||||
"template": "buys.template"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"route": "sales",
|
||||
"template": "sales.template"
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
var gulp = require ('gulp');
|
||||
var jsoncombine = require ('gulp-jsoncombine');
|
||||
|
||||
function combineFunc (data)
|
||||
{
|
||||
return new Buffer (JSON.stringify (data));
|
||||
}
|
||||
|
||||
gulp.task ('default', function ()
|
||||
{
|
||||
var json = gulp.src ('./@salix/**/routing.json')
|
||||
.pipe (jsoncombine ('salix.routes.json', combineFunc))
|
||||
.pipe (gulp.dest ('./build'));
|
||||
});
|
||||
|
17
index.html
17
index.html
|
@ -4,14 +4,13 @@
|
|||
<title>Salix</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
|
||||
<div ui-view></div>
|
||||
<a ui-sref="index">index</a>
|
||||
<a ui-sref="add">add</a>
|
||||
<a ui-sref="edit">edit</a>
|
||||
<a ui-sref="delete">delete</a>
|
||||
</div>
|
||||
<script type="text/javascript" src="build/salix.app.js" selector="#app"></script>
|
||||
<div id="app">
|
||||
<div ui-view></div>
|
||||
<a ui-sref="index">index</a>
|
||||
<a ui-sref="add">add</a>
|
||||
<a ui-sref="edit">edit</a>
|
||||
<a ui-sref="delete">delete</a>
|
||||
</div>
|
||||
<script type="text/javascript" src="build/salix.app.js" selector="#app"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
17
package.json
17
package.json
|
@ -11,18 +11,21 @@
|
|||
"dependencies": {
|
||||
"angular": "^1.5.8",
|
||||
"angular-ui-router": "^1.0.0-beta.3",
|
||||
"express": "^4.14.0",
|
||||
"material-design-lite": "^1.2.1",
|
||||
"oclazyload": "^0.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "*",
|
||||
"babel-loader": "*",
|
||||
"babel-preset-es2015": "*",
|
||||
"css-loader": "^0.25.0",
|
||||
"raw-loader": "*",
|
||||
"style-loader": "^0.13.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-jsoncombine": "^1.0.3",
|
||||
"webpack": "*",
|
||||
"webpack-dev-server": "*"
|
||||
"webpack-dev-server": "*",
|
||||
"raw-loader": "*",
|
||||
"css-loader": "^0.25.0",
|
||||
"style-loader": "^0.13.1",
|
||||
"babel-loader": "*",
|
||||
"babel-core": "*",
|
||||
"babel-preset-es2015": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack --progress --colors --watch"
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
var express = require ('express');
|
||||
|
||||
function getRoutes (req, res)
|
||||
{
|
||||
var routes = require ('./build/salix.routes.json');
|
||||
res.send (JSON.stringify (routes));
|
||||
}
|
||||
|
||||
function getDefault (res, res)
|
||||
{
|
||||
res.sendStatus (404);
|
||||
}
|
||||
|
||||
function onListen ()
|
||||
{
|
||||
console.log ('HTTP server started.');
|
||||
}
|
||||
|
||||
var app = express ();
|
||||
app.get ('/routes.json', getRoutes);
|
||||
app.all (/.*/, getDefault);
|
||||
app.listen (8080, onListen);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
var webpack = require('webpack');
|
||||
var path = require('path');
|
||||
var webpack = require ('webpack');
|
||||
var path = require ('path');
|
||||
|
||||
module.exports =
|
||||
{
|
||||
|
@ -22,10 +22,13 @@ module.exports =
|
|||
query: {
|
||||
presets: ['es2015']
|
||||
}
|
||||
}, {
|
||||
},{
|
||||
test: /\.html$/,
|
||||
loader: 'raw'
|
||||
}, {
|
||||
},{
|
||||
test: /\.json$/,
|
||||
loader: 'json'
|
||||
},{
|
||||
test: /\.css$/,
|
||||
loader: 'style!css'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue