bingo 0.2.0 โ†’ 0.3.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.md ADDED
@@ -0,0 +1,7 @@
1
+ # MIT License
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,42 +1,35 @@
1
- # bingo
1
+ <h1 align="center">Bingo</h1>
2
2
 
3
- Test function calls.
3
+ <p align="center">Composable, testable, type-safe templates. ๐Ÿ’</p>
4
4
 
5
- ## Getting Started
6
- Install the module with: `npm install bingo`
5
+ <p align="center">
6
+ <a href="https://github.com/JoshuaKGoldberg/create/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="๐Ÿค Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
7
+ <a href="https://codecov.io/gh/JoshuaKGoldberg/create" target="_blank"><img alt="๐Ÿงช Coverage" src="https://img.shields.io/codecov/c/github/JoshuaKGoldberg/create?label=%F0%9F%A7%AA%20coverage" /></a>
8
+ <a href="https://github.com/JoshuaKGoldberg/create/blob/main/LICENSE.md" target="_blank"><img alt="๐Ÿ“ License: MIT" src="https://img.shields.io/badge/%F0%9F%93%9D_license-MIT-21bb42.svg"></a>
9
+ <a href="http://npmjs.com/package/create"><img alt="๐Ÿ“ฆ npm version" src="https://img.shields.io/npm/v/create?color=21bb42&label=%F0%9F%93%A6%20npm" /></a>
10
+ <img alt="๐Ÿ’ช TypeScript: Strict" src="https://img.shields.io/badge/%F0%9F%92%AA_typescript-strict-21bb42.svg" />
11
+ </p>
7
12
 
8
- ## Examples
13
+ ๐Ÿ‘‰ See **[create.bingo](https://create.bingo)**.
9
14
 
10
- ```javascript
11
- // Require the module.
12
- var bingo = require('bingo');
15
+ Bingo is a new scaffolding engine for describing repository templates.
16
+ It's like a modern version of [Yeoman](https://yeoman.io), but:
13
17
 
14
- // Bingo that object.
15
- var someObject = bingo(someObject);
18
+ - **Composable**: Individual blocks in your templates can be mix-and-matched together
19
+ - **Testable**: Each layer of your templates can be individually unit or end-to-end tested
20
+ - **Type-Safe**: Fully typed from the ground up, including [Zod](https://zod.dev)-based options schemas
16
21
 
17
- // Get info about the function.
18
- console.log(someObject.someFunction.didExecute() === false); // true
19
- console.log(someObject.someFunction.timesExecuted()); // 0
22
+ Bingo also provides scaffolding to turn templates into a repository generator akin to a `create-next-app` or `create-typescript-app`.
20
23
 
21
- // Call some function.
22
- someObject.someFunction();
24
+ ๐Ÿ‘‰ See **[create.bingo](https://create.bingo)**.
23
25
 
24
- // Get info about the execution of the function.
25
- console.log(someObject.someFunction.didExecute() === true); // true
26
- console.log(someObject.someFunction.timesExecuted()); // 1
27
- ```
26
+ ## Status
28
27
 
29
- ## Contributing
30
- Yes yes, please, contribute. What else do you want to know about an execution of a function ?
28
+ Bingo is early stage.
29
+ It runs well but its APIs are still in flux.
30
+ Please try it out and report any issues on GitHub!
31
+ ๐Ÿ™
31
32
 
32
- Lint and test your code using [grunt](https://github.com/cowboy/grunt).
33
+ > ๐Ÿ’™ This package was templated with [`create-typescript-app`](https://github.com/JoshuaKGoldberg/create-typescript-app).
33
34
 
34
- ## Release History
35
- - 0.2.0 (2012-06-14) Make bingo work in the browser
36
- - 0.1.0 (2012-06-14) First version
37
-
38
- ## License
39
-
40
- Copyright (c) 2012 Djorje Lukic
41
-
42
- Licensed under the [MIT license](http://rumpl.mit-license.org/).
35
+ > Special thanks to [@rumpl](https://github.com/rumpl) for granting use of the `bingo` package name. ๐Ÿ™
package/package.json CHANGED
@@ -1,36 +1,6 @@
1
1
  {
2
2
  "name": "bingo",
3
- "description": "Test function calls.",
4
- "version": "0.2.0",
5
- "keywords": ["test", "unit test", "tdd"],
6
- "homepage": "https://github.com/rumpl/bingo",
7
- "author": {
8
- "name": "Djorje Lukic",
9
- "email": "lukic.djordje@gmail.com"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "git://github.com/rumpl/bingo.git"
14
- },
15
- "bugs": {
16
- "url": "https://github.com/rumpl/bingo/issues"
17
- },
18
- "licenses": [
19
- {
20
- "type": "MIT",
21
- "url": "https://github.com/rumpl/bingo/blob/master/LICENSE-MIT"
22
- }
23
- ],
24
- "main": "lib/bingo",
25
- "engines": {
26
- "node": "~0.6.15"
27
- },
28
- "scripts": {
29
- "test": "grunt test"
30
- },
31
- "dependencies": {},
32
- "devDependencies": {
33
- "grunt": "~0.3.9"
34
- },
35
- "keywords": []
36
- }
3
+ "version": "0.3.0",
4
+ "description": "Composable, testable, type-safe templates. ๐Ÿ’",
5
+ "license": "MIT"
6
+ }
package/.npmignore DELETED
@@ -1 +0,0 @@
1
- /node_modules/
package/LICENSE-MIT DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2012 Djorje Lukic
2
-
3
- Permission is hereby granted, free of charge, to any person
4
- obtaining a copy of this software and associated documentation
5
- files (the "Software"), to deal in the Software without
6
- restriction, including without limitation the rights to use,
7
- copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the
9
- Software is furnished to do so, subject to the following
10
- conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
package/grunt.js DELETED
@@ -1,39 +0,0 @@
1
- module.exports = function(grunt) {
2
-
3
- // Project configuration.
4
- grunt.initConfig({
5
- pkg: '<json:package.json>',
6
- test: {
7
- files: ['test/**/*.js']
8
- },
9
- lint: {
10
- files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
11
- },
12
- watch: {
13
- files: '<config:lint.files>',
14
- tasks: 'default'
15
- },
16
- jshint: {
17
- options: {
18
- curly: true,
19
- eqeqeq: true,
20
- immed: true,
21
- latedef: true,
22
- newcap: true,
23
- noarg: true,
24
- sub: true,
25
- undef: true,
26
- boss: true,
27
- eqnull: true,
28
- node: true
29
- },
30
- globals: {
31
- exports: true
32
- }
33
- }
34
- });
35
-
36
- // Default task.
37
- grunt.registerTask('default', 'lint test');
38
-
39
- };
package/lib/bingo.js DELETED
@@ -1,57 +0,0 @@
1
- /*
2
- * bingo
3
- * https://github.com/rumpl/bingo
4
- *
5
- * Copyright (c) 2012 Djorje Lukic
6
- * Licensed under the MIT license.
7
- */
8
-
9
- (function () {
10
- "use strict";
11
-
12
- var root = this;
13
-
14
- function _bingo(func, obj) {
15
- var newF = function() {
16
- newF._didExecute = true;
17
- newF._timesExecuted++;
18
-
19
- func.apply(obj, arguments);
20
- };
21
-
22
- newF._didExecute = false;
23
- newF._timesExecuted = 0;
24
-
25
- newF.didExecute = function () {
26
- return newF._didExecute;
27
- };
28
-
29
- newF.timesExecuted = function() {
30
- return newF._timesExecuted;
31
- };
32
-
33
- return newF;
34
- }
35
-
36
- var bingo = function(obj) {
37
- for (var o in obj) {
38
- if (typeof obj[o] !== 'function') {
39
- continue;
40
- }
41
-
42
- obj[o] = _bingo(obj[o], obj);
43
- }
44
-
45
- return obj;
46
- };
47
-
48
- if (typeof exports !== 'undefined') {
49
- if (typeof module !== 'undefined' && module.exports) {
50
- exports = module.exports = bingo;
51
- }
52
-
53
- exports.bingo = bingo;
54
- } else {
55
- root['bingo'] = bingo;
56
- }
57
- }.call(this));
@@ -1,65 +0,0 @@
1
- /*
2
- * bingo
3
- * https://github.com/rumpl/bingo
4
- *
5
- * Copyright (c) 2012 Djorje Lukic
6
- * Licensed under the MIT license.
7
- */
8
-
9
- var bingo = require('../lib/bingo.js');
10
-
11
- exports.bingo = {
12
- setUp: function(done) {
13
- done();
14
- },
15
- 'Works with objects created with new': function(test) {
16
- "use strict";
17
-
18
- var Test = function() {};
19
- Test.prototype.test = function() {};
20
- Test.prototype.test2 = function() {};
21
-
22
- var t = new Test();
23
-
24
- t = bingo(t);
25
-
26
- test.equal(t.test.didExecute(), false);
27
- test.equal(t.test.timesExecuted(), 0);
28
-
29
- t.test();
30
-
31
- test.equal(t.test.didExecute(), true);
32
- test.equal(t.test.timesExecuted(), 1);
33
- test.equal(t.test2.didExecute(), false);
34
-
35
- test.done();
36
- },
37
- 'Works with other objects': function(test) {
38
- "use strict";
39
-
40
- var t = {
41
- a: function() {
42
- console.log('a');
43
- },
44
- b: function() {
45
- }
46
- };
47
-
48
- t = bingo(t);
49
-
50
- test.equal(t.b.didExecute(), false);
51
- t.b();
52
- test.equal(t.b.didExecute(), true);
53
- test.equal(t.b.timesExecuted(), 1);
54
-
55
- for (var i = 0; i < 10; i++) {
56
- t.b();
57
- }
58
-
59
- test.equal(t.b.timesExecuted(), 11);
60
-
61
- test.equal(t.a.didExecute(), false);
62
-
63
- test.done();
64
- }
65
- };