@5app/esm-helpers
Advanced tools
+10
-0
@@ -5,2 +5,8 @@ import fs from 'fs'; | ||
| /** | ||
| * requireJSON | ||
| * @param {object} meta - esm import.meta object | ||
| * @param {string} relativePath - file path | ||
| * @returns {*} JSON Content | ||
| */ | ||
| export function requireJSON(meta, relativePath) { | ||
@@ -12,2 +18,6 @@ const __dirname = dirName(meta); | ||
| /** | ||
| * @param {object} meta - esm import.meta object | ||
| * @returns {string} Directory name | ||
| */ | ||
| export function dirName(meta) { | ||
@@ -14,0 +24,0 @@ const __filename = fileURLToPath(meta.url); |
+12
-14
| { | ||
| "name": "@5app/esm-helpers", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "description": "ESM Helper Utility functions", | ||
@@ -15,3 +15,2 @@ "main": "index.js", | ||
| "precommit-msg": "echo 'Running pre-commit checks... (skip using --no-verify)'", | ||
| "semantic-release": "semantic-release", | ||
| "test": "echo 'implement tests'" | ||
@@ -29,14 +28,13 @@ }, | ||
| "devDependencies": { | ||
| "@commitlint/cli": "^12.1.4", | ||
| "@commitlint/config-conventional": "^12.1.4", | ||
| "@semantic-release/changelog": "^5.0.1", | ||
| "@semantic-release/git": "^9.0.0", | ||
| "eslint": "^7.9.0", | ||
| "eslint-config-5app": "^0.15.0", | ||
| "eslint-config-prettier": "^8.3.0", | ||
| "eslint-plugin-prettier": "^3.1.4", | ||
| "husky": "^6.0.0", | ||
| "prettier": "^2.1.2", | ||
| "pretty-quick": "^3.0.2", | ||
| "semantic-release": "^17.1.2" | ||
| "@5app/semantic-release-config": "^1.0.3", | ||
| "@commitlint/cli": "^17.1.2", | ||
| "@commitlint/config-conventional": "^17.1.0", | ||
| "eslint": "^8.23.0", | ||
| "eslint-config-5app": "^0.16.4", | ||
| "eslint-config-prettier": "^8.5.0", | ||
| "eslint-plugin-prettier": "^4.2.1", | ||
| "husky": "^8.0.1", | ||
| "prettier": "^2.7.1", | ||
| "pretty-quick": "^3.1.3", | ||
| "semantic-release": "^19.0.5" | ||
| }, | ||
@@ -43,0 +41,0 @@ "publishConfig": { |
2583
6.69%11
-8.33%21
90.91%