@baadal-sdk/dapi 0.12.0 → 0.16.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/README.md CHANGED
@@ -1,8 +1,2 @@
1
1
  # dapi
2
2
  Dead-simple API wrappers
3
-
4
- # References:
5
- * https://www.typescriptlang.org/docs/handbook/babel-with-typescript.html
6
- * https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm
7
- * https://marcobotto.com/blog/compiling-and-bundling-typescript-libraries-with-webpack/
8
- * https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html
Binary file
@@ -2,3 +2,4 @@ declare const _default: {
2
2
  log: () => void;
3
3
  };
4
4
  export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fs/index.ts"],"names":[],"mappings":";;;AAIA,wBAAuB"}
@@ -3,3 +3,4 @@ declare const foo: () => string;
3
3
  export { fs, foo };
4
4
  export declare const num = 5;
5
5
  export default fs;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AAEtB,QAAA,MAAM,GAAG,cAER,CAAC;AAEF,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;AACnB,eAAO,MAAM,GAAG,IAAI,CAAC;AACrB,eAAe,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baadal-sdk/dapi",
3
- "version": "0.12.0",
3
+ "version": "0.16.0",
4
4
  "description": "Dead-simple API wrappers",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -13,24 +13,51 @@
13
13
  }
14
14
  },
15
15
  "files": [
16
- "dist"
16
+ "dist",
17
+ "src"
17
18
  ],
18
19
  "author": "Abhishek Raj <abhi@raj.me>",
19
20
  "license": "MIT",
20
21
  "scripts": {
21
- "build": "bash tasks/build.sh",
22
+ "build": "npm run verify && bash tasks/build.sh",
22
23
  "clean": "shx rm -rf dist",
23
- "prepublishOnly": "run-s --silent clean build",
24
- "pub": "npm publish",
25
- "pub:test": "npm publish --dry-run"
24
+ "lint": "eslint '**/*.{js,jsx,ts,tsx}'",
25
+ "lint:fix": "npm run lint -- --fix",
26
+ "prepub": "run-s --silent clean build",
27
+ "pub": "npm run prepub && npm publish",
28
+ "pub:test": "npm run prepub && npm publish --dry-run",
29
+ "verify": "jsonlint -q tsconfig.json",
30
+ "blame": "git log -S",
31
+ "hist": "git log --oneline | grep -i",
32
+ "follow": "git log --follow --oneline",
33
+ "ncu": "ncu",
34
+ "ncuu": "ncu -u"
26
35
  },
27
36
  "devDependencies": {
28
37
  "@babel/core": "7.15.5",
29
38
  "@babel/preset-env": "7.15.6",
39
+ "@babel/preset-react": "^7.14.5",
30
40
  "@babel/preset-typescript": "7.15.0",
31
41
  "@types/node": "16.9.6",
42
+ "@types/react": "^16.0.0",
43
+ "@types/react-dom": "^16.0.0",
44
+ "@typescript-eslint/eslint-plugin": "4.31.2",
45
+ "@typescript-eslint/parser": "4.31.2",
32
46
  "babel-loader": "8.2.2",
47
+ "eslint": "7.32.0",
48
+ "eslint-config-airbnb": "18.2.1",
49
+ "eslint-config-airbnb-typescript": "14.0.0",
50
+ "eslint-config-prettier": "8.3.0",
51
+ "eslint-plugin-import": "2.24.2",
52
+ "eslint-plugin-jsx-a11y": "6.4.1",
53
+ "eslint-plugin-prettier": "4.0.0",
54
+ "eslint-plugin-react": "7.26.0",
55
+ "eslint-plugin-react-hooks": "4.2.0",
56
+ "husky": "4.3.8",
57
+ "jsonlint": "1.6.3",
58
+ "lint-staged": "11.1.2",
33
59
  "npm-run-all": "4.1.5",
60
+ "prettier": "2.4.1",
34
61
  "shx": "0.3.3",
35
62
  "typescript": "4.4.3",
36
63
  "webpack": "5.53.0",
@@ -39,9 +66,29 @@
39
66
  "dependencies": {
40
67
  "core-js": "3.18.0"
41
68
  },
69
+ "peerDependencies": {
70
+ "react": ">=16.8.6",
71
+ "react-dom": ">=16.8.6"
72
+ },
73
+ "peerDependenciesMeta": {
74
+ "react": {
75
+ "optional": true
76
+ },
77
+ "react-dom": {
78
+ "optional": true
79
+ }
80
+ },
42
81
  "browserslist": [
43
82
  "chrome >= 23"
44
83
  ],
84
+ "lint-staged": {
85
+ "*.{js,jsx,ts,tsx}": "eslint --fix"
86
+ },
87
+ "husky": {
88
+ "hooks": {
89
+ "pre-commit": "lint-staged"
90
+ }
91
+ },
45
92
  "repository": {
46
93
  "type": "git",
47
94
  "url": "git+https://github.com/baadal/dapi.git"
@@ -0,0 +1,5 @@
1
+ const log = () => {
2
+ console.log('fs/log');
3
+ };
4
+
5
+ export default { log };
package/src/index.ts ADDED
@@ -0,0 +1,9 @@
1
+ import fs from './fs';
2
+
3
+ const foo = () => {
4
+ return 'bar';
5
+ };
6
+
7
+ export { fs, foo };
8
+ export const num = 5;
9
+ export default fs;
File without changes