littoral-templates 0.1.0 → 0.2.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # CHANGELOG
2
+
3
+
4
+ ## 0.2.0
5
+
6
+ * Fix NPM-ignoring.
7
+ * Commit shrinkwrapping.
8
+ * Update deps.
9
+ * (general upkeep)
10
+
package/README.md CHANGED
@@ -43,8 +43,8 @@ still top-level, but on a new line
43
43
 
44
44
  ## TODOs
45
45
 
46
- * Proper test set up, e.g. using `mocha` and `chai`.
47
46
  * Publish to NPM (including proper cleaning and ignoring).
47
+ * Proper test set up, e.g. using `mocha` and `chai`.
48
48
  * Skip `undefined | null`s.
49
49
  * Does an alternative to `npm-run-all` exist (that's better)?
50
50
 
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
- var __spreadArrays = (this && this.__spreadArrays) || function () {
3
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
5
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6
- r[k] = a[j];
7
- return r;
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
8
10
  };
9
11
  Object.defineProperty(exports, "__esModule", { value: true });
10
12
  exports.indentWith = exports.asString = void 0;
@@ -13,7 +15,7 @@ exports.indentWith = exports.asString = void 0;
13
15
  */
14
16
  function flatten(nestedString) {
15
17
  return Array.isArray(nestedString)
16
- ? nestedString.map(flatten).reduce(function (arrL, arrR) { return __spreadArrays(arrL, arrR); })
18
+ ? nestedString.map(flatten).reduce(function (arrL, arrR) { return __spreadArray(__spreadArray([], arrL, true), arrR, true); })
17
19
  : [nestedString];
18
20
  }
19
21
  /**
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAKA;;GAEG;AACH,SAAS,OAAO,CAAC,YAA0B;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;QAC9B,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,IAAI,IAAK,sBAAK,IAAI,EAAK,IAAI,GAAlB,CAAoB,CAAC;QACxE,CAAC,CAAC,CAAE,YAAY,CAAE,CAAA;AAC1B,CAAC;AAGD;;;GAGG;AACH,SAAS,eAAe,CAAI,SAA2B,EAAE,UAA8B;IACnF,OAAO,UAAC,YAA0B;QAC9B,OAAA,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;YACvB,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACnC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC;IAF7B,CAE6B,CAAA;AACrC,CAAC;AAGD,IAAM,kBAAkB,GAAG,UAAC,GAAW,IAAa,OAAA,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,GAAG,GAAG,IAAI,CAAC,EAAzD,CAAyD,CAAA;AAC7G;;GAEG;AACU,QAAA,QAAQ,GAAG,eAAe,CAAC,kBAAkB,EAAE,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAxC,CAAwC,CAAC,CAAA;AAGlH;;GAEG;AACH,IAAM,MAAM,GAAG,UAAC,GAAW,EAAE,CAAS;IAClC,IAAI,MAAM,GAAG,EAAE,CAAA;IACf,OAAO,CAAC,GAAG,CAAC,EAAE;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,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAA;IAChE,IAAM,UAAU,GAAG,UAAC,GAAW,IAAa,OAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,EAAjD,CAAiD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAA3F,CAA2F,CAAA;IACvI,OAAO,eAAe,CAAC,UAAC,MAAc,IAAe,OAAA,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAApB,CAAoB,EAAE,UAAC,OAAiB,IAAK,OAAA,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAvB,CAAuB,CAAC,CAAA;AAC9H,CAAC,EAJwD,CAIxD,CAAA;AAJY,QAAA,UAAU,cAItB"}
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "littoral-templates",
3
- "version": "0.1.0",
3
+ "version": "0.2.0-beta.2",
4
4
  "description": "A small JavaScript/TypeScript framework to do templating comfortably using the template literal syntax in either JavaScript or TypeScript.",
5
5
  "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
6
7
  "scripts": {
7
8
  "build": "tsc",
9
+ "clean": "rm -rf dist",
8
10
  "pretest": "npm-run-all build",
9
11
  "test": "node dist/test/test-in-README.js"
10
12
  },
@@ -23,8 +25,8 @@
23
25
  },
24
26
  "homepage": "https://github.com/dslmeinte/littoral-templates#readme",
25
27
  "devDependencies": {
26
- "@types/node": "^14.14.25",
28
+ "@types/node": "^14.18.33",
27
29
  "npm-run-all": "^4.1.5",
28
- "typescript": "^4.1.3"
30
+ "typescript": "^4.8.4"
29
31
  }
30
32
  }