docs: update reactjs demo for consistant ES6 style

This commit is contained in:
harttle
2019-10-07 22:40:36 +08:00
parent cc8851e56f
commit 4f8fc89c6f
2 changed files with 20 additions and 28 deletions
+12
View File
@@ -0,0 +1,12 @@
import path from 'path';
import { Liquid } from 'liquidjs';
export const engine = new Liquid({
root: path.resolve(__dirname, 'views/'), // dirs to lookup layouts/includes
extname: '.liquid' // the extname used for layouts/includes, defaults
});
engine.registerFilter('image', d => {
let img = `<img src="${d}" class="App-logo" alt="logo"></img>`;
return img
})