Commit 77fc98ff by Иван Кубота

Routing smallfix

parent e2a01b58
const maps = true
var env = process.env;
const compression = require('compression')
......@@ -74,7 +76,7 @@ var transformJSX = function(code, fileName, cb) {
//[simpleTransformToAMD]
['@babel/plugin-transform-modules-amd']
],
sourceMaps: 'both',
sourceMaps: maps,
sourceFileName: fileName,
moduleId: fileName
}, function( c, d, e ){
......@@ -154,7 +156,7 @@ var transformServe = function(dir, anything) {
sass.render( {
data: data+'',
file: path.join( __dirname, dir, req.url ),
sourceMap: true,
sourceMap: maps,
importer: function( url, prev, done ){
if(url[0] === '/'){
url = path.join( __dirname, dir, url.substr(1));
......@@ -265,7 +267,7 @@ var transformServe = function(dir, anything) {
} ],
['@babel/plugin-transform-modules-amd']
],
sourceMaps: 'both',
sourceMaps: maps,
sourceFileName: req.url,
moduleId: req.url
}, function( err, result ){
......
......@@ -16,6 +16,7 @@ const ACTION = {
});
if(!silent){
Model.history.push( { current: where, data: data || {} } );
//debugger
history.pushState( { place: where, data: data || {} }, '', Page[ where ].route.generate( data || {} ) );
}
}),
......@@ -43,7 +44,7 @@ const ACTION = {
ACTION.NAVIGATE.execute('WelcomeDemoFinalLastNotification');
}),
GOTO_FINAL_TEST: new Action(()=>{
ACTION.NAVIGATE.execute('WelcomeDemoFinalLastNotification');
ACTION.NAVIGATE.execute('DemoTesting');
}),
LIMITLESS: new Action(()=>{
......
......@@ -28,9 +28,9 @@ Route.prototype = {
splitted = this.splitted,
out = [];
for( var i = 0, _i = list.length; i < _i; i++ ){
for( var i = 0, _i = splitted.length; i < _i; i++ ){
out.push(splitted[i]);
out.push(data[list[i]] || '');
i<_i-1 && out.push(data[list[i]] || '');
}
return out.join('');
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment