tickplate 1.0.1 → 1.0.4
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.md +18 -1
- package/LICENSE +1 -1
- package/README.md +6 -0
- package/package.json +13 -8
- package/tickplate.d.ts +3 -0
- package/tickplate.js +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased][unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.0.4][] - 2022-05-12
|
|
6
|
+
|
|
7
|
+
- Package maintenance
|
|
8
|
+
|
|
9
|
+
## [1.0.3][] - 2021-07-17
|
|
10
|
+
|
|
11
|
+
- Fix d.ts typings and include typings to package publishing files
|
|
12
|
+
- Chore: update package files, copyrights, links
|
|
13
|
+
|
|
14
|
+
## [1.0.2][] - 2021-07-15
|
|
15
|
+
|
|
16
|
+
- Add d.ts typings
|
|
17
|
+
- Package maintenance
|
|
18
|
+
|
|
5
19
|
## [1.0.1][] - 2021-06-14
|
|
6
20
|
|
|
7
21
|
- Refresh package (dependencies, ci, badges, code style)
|
|
@@ -12,7 +26,10 @@
|
|
|
12
26
|
|
|
13
27
|
## [0.0.x][] Pre-release versions
|
|
14
28
|
|
|
15
|
-
[unreleased]: https://github.com/metarhia/tickplate/compare/v1.0.
|
|
29
|
+
[unreleased]: https://github.com/metarhia/tickplate/compare/v1.0.4...HEAD
|
|
30
|
+
[1.0.4]: https://github.com/metarhia/tickplate/compare/v1.0.3...v1.0.4
|
|
31
|
+
[1.0.3]: https://github.com/metarhia/tickplate/compare/v1.0.2...v1.0.3
|
|
32
|
+
[1.0.2]: https://github.com/metarhia/tickplate/compare/v1.0.1...v1.0.2
|
|
16
33
|
[1.0.1]: https://github.com/metarhia/tickplate/compare/v1.0.0...v1.0.1
|
|
17
34
|
[1.0.0]: https://github.com/metarhia/tickplate/compare/v0.0.x...v1.0.0
|
|
18
35
|
[0.0.x]: https://github.com/metarhia/tickplate/releases/tag/v0.0.x
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2022 Metarhia contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -33,3 +33,9 @@ const templ = t`${'hello'} ${'myFriend'}, great ${'positions'} of Rome`;
|
|
|
33
33
|
|
|
34
34
|
console.log(templ(data));
|
|
35
35
|
```
|
|
36
|
+
|
|
37
|
+
## License & Contributors
|
|
38
|
+
|
|
39
|
+
Copyright (c) 2017-2022 [Metarhia contributors](https://github.com/metarhia/tickplate/graphs/contributors).
|
|
40
|
+
Tickplate is [MIT licensed](./LICENSE).\
|
|
41
|
+
Tickplate is a part of [Metarhia](https://github.com/metarhia) technology stack.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tickplate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",
|
|
5
5
|
"description": "Back-tick templates for JavaScript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,22 +26,27 @@
|
|
|
26
26
|
"url": "https://www.patreon.com/tshemsedinov"
|
|
27
27
|
},
|
|
28
28
|
"main": "tickplate.js",
|
|
29
|
-
"
|
|
29
|
+
"types": "tickplate.d.ts",
|
|
30
|
+
"files": [
|
|
31
|
+
"tickplate.d.ts"
|
|
32
|
+
],
|
|
30
33
|
"engines": {
|
|
31
|
-
"node": "^12.9 || 14 || 16"
|
|
34
|
+
"node": "^12.9 || 14 || 16 || 17 || 18"
|
|
32
35
|
},
|
|
33
36
|
"readmeFilename": "README.md",
|
|
34
37
|
"scripts": {
|
|
35
|
-
"test": "npm run lint && node ./test.js",
|
|
38
|
+
"test": "npm run lint && npm run types && node ./test.js",
|
|
39
|
+
"types": "tsc -p tsconfig.json",
|
|
36
40
|
"lint": "eslint . && prettier -c \"**/*.js\" \"**/*.json\" \"**/*.md\" \".*rc\" \"**/*.yml\"",
|
|
37
41
|
"fmt": "prettier --write \"**/*.js\" \"**/*.json\" \"**/*.md\" \".*rc\" \"**/*.yml\""
|
|
38
42
|
},
|
|
39
43
|
"devDependencies": {
|
|
40
|
-
"eslint": "^
|
|
44
|
+
"eslint": "^8.15.0",
|
|
41
45
|
"eslint-config-metarhia": "^7.0.1",
|
|
42
|
-
"eslint-config-prettier": "^
|
|
46
|
+
"eslint-config-prettier": "^8.3.0",
|
|
43
47
|
"eslint-plugin-import": "^2.23.4",
|
|
44
|
-
"eslint-plugin-prettier": "^
|
|
45
|
-
"prettier": "^2.2
|
|
48
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
49
|
+
"prettier": "^2.3.2",
|
|
50
|
+
"typescript": "^4.3.4"
|
|
46
51
|
}
|
|
47
52
|
}
|
package/tickplate.d.ts
ADDED
package/tickplate.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const tickplate =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
3
|
+
const tickplate =
|
|
4
|
+
(strings, ...keys) =>
|
|
5
|
+
(values) => {
|
|
6
|
+
const result = [strings[0]];
|
|
7
|
+
for (let i = 0; i < keys.length; i++) {
|
|
8
|
+
const key = keys[i];
|
|
9
|
+
result.push(values[key], strings[i + 1]);
|
|
10
|
+
}
|
|
11
|
+
return result.join('');
|
|
12
|
+
};
|
|
11
13
|
|
|
12
14
|
module.exports = tickplate;
|