Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.16.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ClassicOldSong committed Nov 16, 2022
2 parents 33f9f8d + b79384e commit fe64210
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ef.js",
"version": "0.16.0",
"version": "0.16.1",
"description": "(maybe) An elegant HTML template engine & basic framework",
"main": "dist/ef.min.js",
"module": "src/ef.js",
Expand Down
10 changes: 8 additions & 2 deletions src/ef.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Import everything
import parse from './lib/parser.js'
import typeOf from 'ef-core/src/lib/utils/type-of.js'
import { mixStr } from 'ef-core/src/lib/utils/literals-mix.js'
import parseEft from 'eft-parser'
// Import core components
import {
Expand Down Expand Up @@ -64,14 +63,21 @@ const setParser = (newParser) => {
parser = newParser
}

const mixStr = (strs, ...vars) => {
const strArr = new Array(strs.length + vars.length)
for (let i in strs) strArr[i * 2] = strs[i]
for (let i in vars) strArr[i * 2 + 1] = vars[i]
return ''.concat(...strArr)
}

// eslint-disable-next-line valid-jsdoc
/**
* Tagged template to quickly create an inline ef component class
* @param {...*} args - String literal
*/
const t = (...args) => create(mixStr(...args))

let coreVersion = '0.16.0'
let coreVersion = '0.16.1'

if (process.env.NODE_ENV !== 'production') {
coreVersion = `${coreVersion}+debug`
Expand Down

0 comments on commit fe64210

Please sign in to comment.