@jaredwray/fumanchu 1.1.2 → 1.2.0
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/LICENSE +1 -1
- package/README.md +7 -6
- package/package.json +12 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
# fumanchu
|
|
4
5
|
Handlebars + Helpers Together
|
|
@@ -9,7 +10,7 @@ Handlebars + Helpers Together
|
|
|
9
10
|
[](https://github.com/jaredwray/fumanchu/blob/master/LICENSE)
|
|
10
11
|
[](https://npmjs.com/package/@jaredwray/fumanchu)
|
|
11
12
|
|
|
12
|
-
[Handlebars](https://github.com/handlebars-lang/handlebars.js) + [Handlebars-helpers](https://github.com/helpers/handlebars-helpers) (helpers are now maintained in this project) combined into a single package. Easily use in your nodejs
|
|
13
|
+
[Handlebars](https://github.com/handlebars-lang/handlebars.js) + [Handlebars-helpers](https://github.com/helpers/handlebars-helpers) (helpers are now maintained in this project) combined into a single package. Easily use in your nodejs as it is a drop in replacement when using handlebars directly.
|
|
13
14
|
|
|
14
15
|
## Table of Contents
|
|
15
16
|
* [Using in Nodejs](#using-in-nodejs)
|
|
@@ -33,7 +34,7 @@ var html = template({foo: 'bar'});
|
|
|
33
34
|
console.log(html);
|
|
34
35
|
```
|
|
35
36
|
|
|
36
|
-
If using it with es6 you can access
|
|
37
|
+
If using it with es6 you can access `handlebars` via destructuring:
|
|
37
38
|
|
|
38
39
|
```javascript
|
|
39
40
|
import handlebars from '@jaredwray/fumanchu';
|
|
@@ -49,14 +50,14 @@ It's just that easy! No need to add Handlebars to your project, it's already inc
|
|
|
49
50
|
If you only want to use handlebar helpers you can easily do that by doing the following:
|
|
50
51
|
|
|
51
52
|
```javascript
|
|
52
|
-
var helpers = require('@jaredwray/fumanchu').
|
|
53
|
+
var helpers = require('@jaredwray/fumanchu').handlebarHelpers;
|
|
53
54
|
var handlebars = require('handlebars');
|
|
54
55
|
helpers({ handlebars: handlebars });
|
|
55
56
|
var fn = handlebars.compile('{{add value 5}}');
|
|
56
57
|
console.log(fn);
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
If using it with es6 you can access
|
|
60
|
+
If using it with es6 you can access `helpers` via destructuring:
|
|
60
61
|
|
|
61
62
|
```javascript
|
|
62
63
|
import fumanchu from '@jaredwray/fumanchu';
|
|
@@ -3078,4 +3079,4 @@ Now that you've set up your workspace, you're ready to contribute changes to the
|
|
|
3078
3079
|
## License and Copyright
|
|
3079
3080
|
[MIT](LICENSE) and codebase after 2023 will be copyright of Jared Wray.
|
|
3080
3081
|
|
|
3081
|
-
This is a fork of [handlebars-helpers]() which is licensed under MIT. Initial copyright of handlebars-helpers: `2013-2015, 2017, Jon Schlinkert, Brian Woodward`. Thank you so much for your effort and building this! We have also continued to list all contributors in `package.json` to ensure that they are recognized.
|
|
3082
|
+
This is a fork of [handlebars-helpers]() which is licensed under MIT. Initial copyright of handlebars-helpers: `2013-2015, 2017, Jon Schlinkert, Brian Woodward`. Thank you so much for your effort and building this! We have also continued to list all contributors in `package.json` to ensure that they are recognized.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaredwray/fumanchu",
|
|
3
3
|
"description": "Handlebars + Helpers = Fumanchu",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"homepage": "https://github.com/jaredwray/fumanchu",
|
|
6
6
|
"author": "Jared Wray (me@jaredwray.com)",
|
|
7
7
|
"keywords": [
|
|
@@ -97,13 +97,19 @@
|
|
|
97
97
|
"source": "index.js",
|
|
98
98
|
"main": "index.js",
|
|
99
99
|
"types": "index.d.ts",
|
|
100
|
+
"exports": {
|
|
101
|
+
"import": "./index.mjs",
|
|
102
|
+
"require": "./index.js"
|
|
103
|
+
},
|
|
100
104
|
"engines": {
|
|
101
105
|
"node": ">=14"
|
|
102
106
|
},
|
|
103
107
|
"scripts": {
|
|
104
108
|
"test": "c8 mocha --reporter list",
|
|
105
109
|
"test:ci": "c8 --reporter=lcov mocha --reporter list",
|
|
106
|
-
"clean": "
|
|
110
|
+
"clean": "rimraf ./node_modules ./coverage yarn.lock package-lock.json",
|
|
111
|
+
"website:build": "rimraf ./site/readme.md && npx -y writr build -s ./site -o ./dist-site",
|
|
112
|
+
"website:serve": "rimraf ./site/readme.md && npx -y writr serve -s ./site -o ./dist-site"
|
|
107
113
|
},
|
|
108
114
|
"dependencies": {
|
|
109
115
|
"arr-flatten": "^1.1.0",
|
|
@@ -136,9 +142,11 @@
|
|
|
136
142
|
"year": "^0.2.1"
|
|
137
143
|
},
|
|
138
144
|
"devDependencies": {
|
|
139
|
-
"c8": "^
|
|
145
|
+
"c8": "^9.1.0",
|
|
140
146
|
"chai": "^4.3.10",
|
|
141
|
-
"
|
|
147
|
+
"fs-extra": "^11.2.0",
|
|
148
|
+
"mocha": "^10.3.0",
|
|
149
|
+
"rimraf": "^5.0.5",
|
|
142
150
|
"template-helpers": "^1.0.1",
|
|
143
151
|
"templates": "^1.2.9"
|
|
144
152
|
}
|