11 Commits

8 changed files with 35 additions and 17 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "@ijl/ltemplates", "name": "@ijl/ltemplates",
"version": "1.1.0", "version": "1.2.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ijl/templates", "name": "@ijl/templates",
"version": "1.1.0", "version": "1.2.2",
"description": "Templates library for @ijl projects", "description": "Templates library for @ijl projects",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {

View File

@@ -1,5 +1,5 @@
const path = require('path'); const path = require('path');
const hbs = require(path.resolve('node_modules', 'hbs')); const hbs = require('hbs');
const registerPartialsWithExtensions = require('./utils/registerPartialsWithExtensions'); const registerPartialsWithExtensions = require('./utils/registerPartialsWithExtensions');

15
src/templates/dev.hbs Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
{{>"partials/header.hbs"}}
<title>{{ pageTitle }}</title>
</head>
<body>
<script src="{{baseUrl}}/fire.app/{{fireappVersion}}/dist/index.js"></script>
{{>"partials/scripts.hbs"}}
<div id="app"></div>
</body>
</html>

View File

@@ -2,23 +2,13 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> {{>"partials/header.hbs"}}
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,600,700,900&amp;subset=cyrillic,cyrillic-ext"
rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ pageTitle }}</title> <title>{{ pageTitle }}</title>
</head> </head>
<body> <body>
<script src="{{baseUrl}}/bootstrap/{{versionBootstrap}}/index.js"></script> <script src="{{baseUrl}}/fire.app/{{fireappVersion}}/index.js"></script>
<script> {{>"partials/scripts.hbs"}}
bootstrap({
apps: {{{ toJSON apps }}},
navigations: {{{ toJSON navigations }}},
config: {{{ toJSON config }}}
})
</script>
<div id="app"></div> <div id="app"></div>
</body> </body>

View File

@@ -0,0 +1,6 @@
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,600,700,900&amp;subset=cyrillic,cyrillic-ext"
rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style>body {margin: 0; padding: 0;}</style>

View File

@@ -0,0 +1,7 @@
<script>
fireapp({
apps: {{{ toJSON apps }}},
navigations: {{{ toJSON navigations }}},
config: {{{ toJSON config }}}
})
</script>

View File

@@ -1,7 +1,7 @@
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const glob = require(path.resolve('node_modules', 'glob')); const glob = require('glob');
module.exports = (hbs, rootDir) => { module.exports = (hbs, rootDir) => {
glob glob