@notifiles/sdk 1.1.8 → 1.1.10
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/package.json
CHANGED
|
@@ -4,10 +4,11 @@ import fsPath from 'path'
|
|
|
4
4
|
import _ from 'underscore'
|
|
5
5
|
import isPathEntry from './isPathEntry.js'
|
|
6
6
|
import importJSONAsync from "../fs/importJSONAsync.js"
|
|
7
|
-
import slug from 'slug'
|
|
7
|
+
// import slug from 'slug'
|
|
8
8
|
import createActivityIfNeeded from '../../template/lib/activity/createFileIfNeeded.js'
|
|
9
9
|
import createManifestIfNeeded from '../../template/lib/manifest/createFileIfNeeded.js'
|
|
10
10
|
import createi18nIfNeeded from '../../template/lib/i18n/createFileIfNeeded.js'
|
|
11
|
+
import slugify from '../../template/new/lib/slugify.js'
|
|
11
12
|
|
|
12
13
|
const perform = async (props) => {
|
|
13
14
|
const {
|
|
@@ -82,7 +83,8 @@ const perform = async (props) => {
|
|
|
82
83
|
|
|
83
84
|
return [{
|
|
84
85
|
name: item,
|
|
85
|
-
slug: slug(item),
|
|
86
|
+
// slug: slug(item),
|
|
87
|
+
slug: slugify(item),
|
|
86
88
|
path: folderPath,
|
|
87
89
|
// email: module,
|
|
88
90
|
textMessage,
|
|
@@ -22,7 +22,7 @@ export default async (props) => {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const postPath = fsPath.join(path, 'email.js')
|
|
25
|
-
const postPath2 = fsPath.join(path, 'email.tsx')
|
|
25
|
+
const postPath2 = fsPath.join(path, 'email.react-email.tsx')
|
|
26
26
|
|
|
27
27
|
return ((await checkFileExists(postPath))
|
|
28
28
|
|| (await checkFileExists(postPath2)))
|
|
@@ -12,8 +12,8 @@ export default async (props) => {
|
|
|
12
12
|
language } = entry
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
// const a = await fs.promises.readFile(`${path}/email.tsx`, 'utf8')
|
|
16
|
-
// // const a = (await import(`${path}/email.tsx`))
|
|
15
|
+
// const a = await fs.promises.readFile(`${path}/email.react-email.tsx`, 'utf8')
|
|
16
|
+
// // const a = (await import(`${path}/email.react-email.tsx`))
|
|
17
17
|
// const component = React.createElement()
|
|
18
18
|
// const html_ = await renderAsync(a, {
|
|
19
19
|
// pretty: true,
|
|
@@ -4,7 +4,7 @@ import checkFileExists from '../../lib/fs/checkFileExists.js'
|
|
|
4
4
|
import createActivityIfNeeded from '../lib/activity/createFileIfNeeded.js'
|
|
5
5
|
import createManifestIfNeeded from '../lib/manifest/createFileIfNeeded.js'
|
|
6
6
|
import createi18nIfNeeded from '../lib/i18n/createFileIfNeeded.js'
|
|
7
|
-
import emailTemplate from './templates/email.tsx.js'
|
|
7
|
+
import emailTemplate from './templates/email.react-email.tsx.js'
|
|
8
8
|
import emailTemplateMaster from './templates/email.mastered.js'
|
|
9
9
|
import textmessageTemplate from './templates/textmessage.js'
|
|
10
10
|
import pushnotificationTemplate from './templates/pushnotification.js'
|
|
@@ -51,7 +51,7 @@ export default async ({
|
|
|
51
51
|
data: i18n
|
|
52
52
|
})
|
|
53
53
|
|
|
54
|
-
const emailPath = fsPath.join(folderPath, "email.tsx")
|
|
54
|
+
const emailPath = fsPath.join(folderPath, "email.react-email.tsx")
|
|
55
55
|
const email = (emailType === 'mastered') ? await emailTemplateMaster({}) : await emailTemplate({})
|
|
56
56
|
await fs.promises.writeFile(emailPath, email, 'utf8')
|
|
57
57
|
await fs.promises.writeFile(fsPath.join(folderPath, "email.subject.txt"), "", 'utf8')
|