From bf3948f9c51c3c464e0389127abcafa4343d0a79 Mon Sep 17 00:00:00 2001 From: dragonwocky Date: Sun, 7 Nov 2021 18:48:38 +1100 Subject: [PATCH] env.notionRequire --- api/env.cjs | 8 +++++++- api/fmt.cjs | 2 +- api/fs.cjs | 2 +- api/storage.cjs | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/api/env.cjs b/api/env.cjs index c328f19..27a6a49 100644 --- a/api/env.cjs +++ b/api/env.cjs @@ -5,6 +5,7 @@ */ 'use strict'; +module.exports = {}; /** * environment-specific methods and constants @@ -12,7 +13,6 @@ */ const env = require('../env/env.cjs'); -module.exports = {}; /** * the environment/platform name code is currently being executed in @@ -45,3 +45,9 @@ module.exports.focusNotion = env.focusNotion; * @type {function} */ module.exports.reload = env.reload; + +/** + * require() notion app files + * @param {string} path - path from the root of notion/resources/app/ e.g. main/createWindow.js + */ +module.exports.notionRequire = env.notionRequire; diff --git a/api/fmt.cjs b/api/fmt.cjs index 72b125d..dc1dd12 100644 --- a/api/fmt.cjs +++ b/api/fmt.cjs @@ -5,6 +5,7 @@ */ 'use strict'; +module.exports = {}; /** * helpers for formatting or parsing text @@ -12,7 +13,6 @@ */ const fs = require('notion-enhancer/api/fs.cjs'); -module.exports = {}; /** * transform a heading into a slug (a lowercase alphanumeric string separated by dashes), diff --git a/api/fs.cjs b/api/fs.cjs index 376d6a4..ed352ab 100644 --- a/api/fs.cjs +++ b/api/fs.cjs @@ -5,6 +5,7 @@ */ 'use strict'; +module.exports = {}; /** * environment-specific file reading @@ -12,7 +13,6 @@ */ const fs = require('../env/fs.cjs'); -module.exports = {}; /** * transform a path relative to the enhancer root directory into an absolute path diff --git a/api/storage.cjs b/api/storage.cjs index 4556584..47f01eb 100644 --- a/api/storage.cjs +++ b/api/storage.cjs @@ -5,6 +5,7 @@ */ 'use strict'; +module.exports = {}; /** * environment-specific data persistence @@ -12,7 +13,6 @@ */ const storage = require('../env/storage.cjs'); -module.exports = {}; /** * get persisted data