@nzz/q-cli 1.7.0 → 1.8.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.
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@nzz/et-utils-<package-name>",
3
+ "version": "1.0.0",
4
+ "description": "<package-description>",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/nzzdev/ed-tech-utilities.git",
8
+ "directory": "<package-name>"
9
+ },
10
+ "scripts": {
11
+ "prepublishOnly": "npm run test && npm run clean && npm run build && rollup -c",
12
+ "clean": "rimraf dist && rimraf index.js && rimraf index.d.ts",
13
+ "build": "tsc -p .",
14
+ "start": "npm run build -- -w",
15
+ "test": "lab --typescript"
16
+ },
17
+ "files": [
18
+ "index.js",
19
+ "index.d.ts"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "devDependencies": {
25
+ "@hapi/code": "^9.0.0",
26
+ "@hapi/lab": "^25.0.1",
27
+ "rimraf": "^3.0.2",
28
+ "rollup": "^2.75.0",
29
+ "rollup-plugin-dts": "^4.2.2",
30
+ "typescript": "^4.6.4"
31
+ },
32
+ "author": "<author-name>",
33
+ "license": "MIT"
34
+ }
@@ -0,0 +1,17 @@
1
+ import dts from "rollup-plugin-dts";
2
+
3
+ export default [
4
+ {
5
+ input: "dist/index.js",
6
+ output: {
7
+ file: "index.js",
8
+ },
9
+ },
10
+ {
11
+ input: "dist/index.d.ts",
12
+ output: {
13
+ file: "index.d.ts",
14
+ },
15
+ plugins: [dts()],
16
+ },
17
+ ];
@@ -0,0 +1,8 @@
1
+ // Note: This is an example file
2
+ function someFunction() {
3
+ const value = "Up, Up, Down, Down, Left, Right, Left, Right, B, A";
4
+
5
+ return value;
6
+ }
7
+
8
+ export { someFunction };
@@ -0,0 +1,4 @@
1
+ // Note: Export all your code in here, that should be exposed to the consumer
2
+
3
+ // e.g. Exports all exports of the Service.ts file
4
+ export * from "./Service";
@@ -0,0 +1,19 @@
1
+ import * as Lab from "@hapi/lab";
2
+ import { expect } from "@hapi/code";
3
+ import { someFunction } from "../src";
4
+
5
+ // Hapi Lab init code
6
+ const lab = Lab.script();
7
+ const { describe, it, before } = lab;
8
+ export { lab };
9
+
10
+ describe("Service", () => {
11
+ before(() => {});
12
+
13
+ it("should return the konami cheatcode", () => {
14
+ const result = someFunction();
15
+ const expectedResult = "Up, Up, Down, Down, Left, Right, Left, Right, B, A";
16
+
17
+ expect(result).to.equal(expectedResult);
18
+ });
19
+ });
@@ -0,0 +1,9 @@
1
+ {
2
+ "include": ["src/**/*"],
3
+ "exclude": ["test/**/*"],
4
+ "compilerOptions": {
5
+ "target": "es6",
6
+ "outDir": "dist",
7
+ "declaration": true
8
+ }
9
+ }