total5 0.0.14-5 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.txt CHANGED
@@ -15,6 +15,8 @@
15
15
  - added support for handling specific file extensions in the form `ROUTE('FILE *.php', ...)`
16
16
  - improved parsing `<links>` in the markdown parser
17
17
  - fixed a check of the file body for JPEG files during the upload process
18
+ - added `/version` file that can contain a version
19
+ - fixed language in the `TEMPLATE`
18
20
 
19
21
  ========================
20
22
  0.0.13
package/debug.js CHANGED
@@ -71,7 +71,7 @@ function runwatching() {
71
71
 
72
72
  const FILENAME = F.TUtils.getName(process.argv[1] || 'index.js');
73
73
  const VERSION = F.version_header;
74
- const REG_FILES = /(config|bundles\.debug|\.js|\.ts|\.flow|\.py|\.resource)+$/i;
74
+ const REG_FILES = /(config|version|bundles\.debug|\.js|\.ts|\.flow|\.py|\.resource)+$/i;
75
75
  const REG_PUBLIC = /\/public\//i;
76
76
  const REG_INDEX = new RegExp(FILENAME.replace(/\.js$/, '') + '_.*?\\.js$');
77
77
  const REG_EXTENSION = /\.(js|ts|py|resource|package|bundle|build|flow|url|html)$/i;
package/index.js CHANGED
@@ -792,6 +792,16 @@ F.load = async function(types, callback, clear = true) {
792
792
  config && F.loadconfig(config);
793
793
  }
794
794
 
795
+ if (!types.length || types.includes('version')) {
796
+ // It loads only the first line and converts it to a number.
797
+ let version = await read(F.path.root('version'));
798
+ if (version) {
799
+ version = version.split('\n')[0];
800
+ if (version)
801
+ F.config.version = MAIN.version = version.parseFloat();
802
+ }
803
+ }
804
+
795
805
  if (!types.length || types.includes('resources')) {
796
806
  let resources = await list(F.path.root('resources'), 'resource');
797
807
  for (let resource of resources)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "total5",
3
- "version": "0.0.14-5",
3
+ "version": "0.0.14",
4
4
  "description": "Total.js framework v5",
5
5
  "main": "index.js",
6
6
  "directories": {
package/templates.js CHANGED
@@ -117,7 +117,7 @@ exports.render = function(body, model, $) {
117
117
 
118
118
  function parse(body, $) {
119
119
 
120
- if ($ && $.language)
120
+ if ($ && $.language != null)
121
121
  body = F.translate($.language, body);
122
122
 
123
123
  var helpers = {};