mirror of https://github.com/laurent22/joplin.git
All: Simplify Welcome notes and folders to avoid sync problems. Duplicate items will have to be manually deleted.
parent
c56d8153e8
commit
b5dff09c28
File diff suppressed because it is too large
Load Diff
|
@ -12,88 +12,51 @@ const { pregQuote } = require('lib/string-utils');
|
||||||
class WelcomeUtils {
|
class WelcomeUtils {
|
||||||
|
|
||||||
static async createWelcomeItems() {
|
static async createWelcomeItems() {
|
||||||
const overwriteExisting = Setting.value('env') === 'dev';
|
|
||||||
|
|
||||||
const output = {
|
const output = {
|
||||||
defaultFolderId: null,
|
defaultFolderId: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const noteAssets = welcomeAssets.notes;
|
const appType = Setting.value('appType');
|
||||||
|
|
||||||
const folderAssets = welcomeAssets.folders;
|
const folderAssets = welcomeAssets.folders;
|
||||||
const tempDir = Setting.value('resourceDir');
|
const tempDir = Setting.value('resourceDir');
|
||||||
|
const timestamp = welcomeAssets.timestamp;
|
||||||
|
|
||||||
for (let i = 0; i < folderAssets.length; i++) {
|
for (let i = 0; i < folderAssets.length; i++) {
|
||||||
const folderAsset = folderAssets[i];
|
const folderAsset = folderAssets[i];
|
||||||
const folderId = folderAsset.id;
|
const folder = await Folder.save({ title: folderAsset.title + ' (' + appType + ')'});
|
||||||
|
if (!output.defaultFolderId) output.defaultFolderId = folder.id;
|
||||||
if (!output.defaultFolderId) output.defaultFolderId = folderId;
|
|
||||||
|
|
||||||
let existingFolder = await Folder.load(folderId);
|
|
||||||
|
|
||||||
if (existingFolder && overwriteExisting) {
|
|
||||||
await Folder.delete(existingFolder.id);
|
|
||||||
existingFolder = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (existingFolder) continue;
|
|
||||||
|
|
||||||
await Folder.save({
|
|
||||||
id: folderId,
|
|
||||||
title: folderAsset.title,
|
|
||||||
}, { isNew: true });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const noteAssets = welcomeAssets.notes;
|
||||||
|
|
||||||
for (let i = noteAssets.length - 1; i >= 0; i--) {
|
for (let i = noteAssets.length - 1; i >= 0; i--) {
|
||||||
const noteAsset = noteAssets[i];
|
const noteAsset = noteAssets[i];
|
||||||
|
|
||||||
const noteId = noteAsset.id;
|
|
||||||
|
|
||||||
let existingNote = await Note.load(noteId);
|
|
||||||
|
|
||||||
if (existingNote && overwriteExisting) {
|
|
||||||
await Note.delete(existingNote.id);
|
|
||||||
existingNote = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (existingNote) continue;
|
|
||||||
|
|
||||||
let noteBody = noteAsset.body;
|
let noteBody = noteAsset.body;
|
||||||
|
|
||||||
for (let resourceUrl in noteAsset.resources) {
|
for (let resourceUrl in noteAsset.resources) {
|
||||||
if (!noteAsset.resources.hasOwnProperty(resourceUrl)) continue;
|
if (!noteAsset.resources.hasOwnProperty(resourceUrl)) continue;
|
||||||
const resourceAsset = noteAsset.resources[resourceUrl];
|
const resourceAsset = noteAsset.resources[resourceUrl];
|
||||||
const resourceId = resourceAsset.id;
|
const ext = fileExtension(resourceUrl);
|
||||||
|
const tempFilePath = tempDir + '/' + uuid.create() + '.tmp.' + ext;
|
||||||
let existingResource = await Resource.load(resourceId);
|
await shim.fsDriver().writeFile(tempFilePath, resourceAsset.body, 'base64');
|
||||||
|
const resource = await shim.createResourceFromPath(tempFilePath, {
|
||||||
if (existingResource && overwriteExisting) {
|
title: basename(resourceUrl),
|
||||||
await Resource.delete(resourceId);
|
});
|
||||||
existingResource = null;
|
await shim.fsDriver().remove(tempFilePath);
|
||||||
}
|
|
||||||
|
|
||||||
if (!existingResource) {
|
|
||||||
const ext = fileExtension(resourceUrl);
|
|
||||||
const tempFilePath = tempDir + '/' + uuid.create() + '.tmp.' + ext;
|
|
||||||
await shim.fsDriver().writeFile(tempFilePath, resourceAsset.body, 'base64');
|
|
||||||
await shim.createResourceFromPath(tempFilePath, {
|
|
||||||
id: resourceId,
|
|
||||||
title: basename(resourceUrl),
|
|
||||||
});
|
|
||||||
await shim.fsDriver().remove(tempFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
const regex = new RegExp(pregQuote('(' + resourceUrl + ')'), 'g');
|
const regex = new RegExp(pregQuote('(' + resourceUrl + ')'), 'g');
|
||||||
noteBody = noteBody.replace(regex, '(:/' + resourceId + ')');
|
noteBody = noteBody.replace(regex, '(:/' + resource.id + ')');
|
||||||
}
|
}
|
||||||
|
|
||||||
await Note.save({
|
const note = await Note.save({
|
||||||
id: noteId,
|
parent_id: output.defaultFolderId,
|
||||||
parent_id: noteAsset.parent_id,
|
|
||||||
title: noteAsset.title,
|
title: noteAsset.title,
|
||||||
body: noteBody,
|
body: noteBody,
|
||||||
}, { isNew: true });
|
});
|
||||||
|
|
||||||
if (noteAsset.tags) await Tag.setNoteTagsByTitles(noteId, noteAsset.tags);
|
if (noteAsset.tags) await Tag.setNoteTagsByTitles(note.id, noteAsset.tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
|
|
@ -6,7 +6,7 @@ module.exports = {
|
||||||
"body": "# Welcome to Joplin! 🗒️\n\nJoplin is a free, open source note taking and to-do application, which helps you write and organise your notes, and synchronise them between your devices. The notes are searchable, can be copied, tagged and modified either from the applications directly or from your own text editor. The notes are in [Markdown format](https://joplin.cozic.net/#markdown). Joplin is available as a **💻 desktop**, **📱 mobile** and **🔡 terminal** application.\n\nThe notes in this notebook give an overview of what Joplin can do and how to use it. In general, the three applications share roughly the same functionalities; any differences will be clearly indicated.\n\n![](./AllClients.png)\n\n## Joplin is divided into three parts\n\nJoplin has three main columns:\n\n- **Sidebar** contains the list of your notebooks and tags, as well as the synchronisation status.\n- **Note List** contains the current list of notes - either the notes in the currently selected notebook, the notes in the currently selected tag, or search results.\n- **Note Editor** is the place where you write your notes in Markdown, with a viewer showing what the note will look like. You may also use an [external editor](https://joplin.cozic.net/#external-text-editor) to edit notes. For example, if you like WYSIWYG editors, you can use something like Typora as an external editor and it will display the note as well as any embedded images.\n\n## Writing notes in Markdown\n\nMarkdown is a lightweight markup language with plain text formatting syntax. Joplin supports a [Github-flavoured Markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) with a few variations and additions.\n\nIn general, while Markdown is a markup language, it is meant to be human readable, even without being rendered. This is a simple example (you can see how it looks in the viewer panel):\n\n* * *\n\n# Heading\n\n## Sub-heading\n\nParagraphs are separated by a blank line. Text attributes _italic_, **bold** and `monospace` are supported. You can create bullet lists:\n\n* apples\n* oranges\n* pears\n\nOr numbered lists:\n\n1. wash\n2. rinse\n3. repeat\n\nThis is a [link](https://joplin.cozic.net) and, finally, below is a horizontal rule:\n\n* * *\n\nA lot more is possible including adding code samples, math formulae or checkbox lists - see the [Markdown documentation](https://joplin.cozic.net/#markdown) for more information.\n\n## Organising your notes\n\n### With notebooks 📔\n\nJoplin notes are organised into a tree of notebooks and sub-notebooks.\n\n- On **desktop**, you can create a notebook by clicking on New Notebook, then you can drag and drop them into other notebooks to organise them as you wish.\n- On **mobile**, press the \"+\" icon and select \"New notebook\".\n- On **terminal**, press `:mn`\n\n![](./SubNotebooks.png)\n\n### With tags 🏷️\n\nThe second way to organise your notes is using tags:\n\n- On **desktop**, right-click on any note in the Note List, and select \"Edit tags\". You can then add the tags, separating them by commas.\n- On **mobile**, open the note and press the \"⋮\" button and select \"Tags\".\n- On **terminal**, type `:help tag` for the available commands.\n\n* * *\n\n**Next:** [How to import notes from other applications](:/b863cbc514cb4cafbae8dd6a4fcad919).\n",
|
"body": "# Welcome to Joplin! 🗒️\n\nJoplin is a free, open source note taking and to-do application, which helps you write and organise your notes, and synchronise them between your devices. The notes are searchable, can be copied, tagged and modified either from the applications directly or from your own text editor. The notes are in [Markdown format](https://joplin.cozic.net/#markdown). Joplin is available as a **💻 desktop**, **📱 mobile** and **🔡 terminal** application.\n\nThe notes in this notebook give an overview of what Joplin can do and how to use it. In general, the three applications share roughly the same functionalities; any differences will be clearly indicated.\n\n![](./AllClients.png)\n\n## Joplin is divided into three parts\n\nJoplin has three main columns:\n\n- **Sidebar** contains the list of your notebooks and tags, as well as the synchronisation status.\n- **Note List** contains the current list of notes - either the notes in the currently selected notebook, the notes in the currently selected tag, or search results.\n- **Note Editor** is the place where you write your notes in Markdown, with a viewer showing what the note will look like. You may also use an [external editor](https://joplin.cozic.net/#external-text-editor) to edit notes. For example, if you like WYSIWYG editors, you can use something like Typora as an external editor and it will display the note as well as any embedded images.\n\n## Writing notes in Markdown\n\nMarkdown is a lightweight markup language with plain text formatting syntax. Joplin supports a [Github-flavoured Markdown syntax](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) with a few variations and additions.\n\nIn general, while Markdown is a markup language, it is meant to be human readable, even without being rendered. This is a simple example (you can see how it looks in the viewer panel):\n\n* * *\n\n# Heading\n\n## Sub-heading\n\nParagraphs are separated by a blank line. Text attributes _italic_, **bold** and `monospace` are supported. You can create bullet lists:\n\n* apples\n* oranges\n* pears\n\nOr numbered lists:\n\n1. wash\n2. rinse\n3. repeat\n\nThis is a [link](https://joplin.cozic.net) and, finally, below is a horizontal rule:\n\n* * *\n\nA lot more is possible including adding code samples, math formulae or checkbox lists - see the [Markdown documentation](https://joplin.cozic.net/#markdown) for more information.\n\n## Organising your notes\n\n### With notebooks 📔\n\nJoplin notes are organised into a tree of notebooks and sub-notebooks.\n\n- On **desktop**, you can create a notebook by clicking on New Notebook, then you can drag and drop them into other notebooks to organise them as you wish.\n- On **mobile**, press the \"+\" icon and select \"New notebook\".\n- On **terminal**, press `:mn`\n\n![](./SubNotebooks.png)\n\n### With tags 🏷️\n\nThe second way to organise your notes is using tags:\n\n- On **desktop**, right-click on any note in the Note List, and select \"Edit tags\". You can then add the tags, separating them by commas.\n- On **mobile**, open the note and press the \"⋮\" button and select \"Tags\".\n- On **terminal**, type `:help tag` for the available commands.\n\n* * *\n\n**Next:** [How to import notes from other applications](:/b863cbc514cb4cafbae8dd6a4fcad919).\n",
|
||||||
"tags": [
|
"tags": [
|
||||||
"markdown",
|
"markdown",
|
||||||
"organizing"
|
"organising"
|
||||||
],
|
],
|
||||||
"resources": {
|
"resources": {
|
||||||
"./AllClients.png": {
|
"./AllClients.png": {
|
||||||
|
@ -36,7 +36,7 @@ module.exports = {
|
||||||
"title": "3. Synchronising your notes 🔄",
|
"title": "3. Synchronising your notes 🔄",
|
||||||
"body": "# Synchronising your notes 🔄\n\nOne of the goals of Joplin was to avoid being tied to any particular company or service, whether it is Evernote, Google or Microsoft. As such the synchronisation is designed without any hard dependency to any particular service. You basically choose the service you prefer among those supported, setup the configuration, and the app will be able to sync between your computers or mobile devices.\n\nThe supported cloud services are the following:\n\n## Setting up Dropbox synchronisation\n\nSelect \"Dropbox\" as the synchronisation target in the config screen (it is selected by default). Then, to initiate the synchronisation process, click on the \"Synchronise\" button in the sidebar and follow the instructions.\n\n## Setting up Nextcloud synchronisation\n\nNextcloud is a self-hosted, private cloud solution. It can store documents, images and videos but also calendars, passwords and countless other things and can sync them to your laptop or phone. As you can host your own Nextcloud server, you own both the data on your device and infrastructure used for synchronisation. As such it is a good fit for Joplin.\n\nTo set it up, go to the config screen and select Nextcloud as the synchronisation target. Then input the WebDAV URL (to get it, go to your Nextcloud page, click on Settings in the bottom left corner of the page and copy the URL). Note that it has to be the **full URL**, so for example if you want the notes to be under `/Joplin`, the URL would be something like `https://example.com/remote.php/webdav/Joplin` (note that \"/Joplin\" part). And **make sure to create the \"/Joplin\" directory in Nextcloud**. Finally set the username and password. If it does not work, please [see this explanation](https://github.com/laurent22/joplin/issues/61#issuecomment-373282608) for more details.\n\n## Setting up OneDrive or WebDAV synchronisation\n\nOneDrive and WebDAV are also supported as synchronisation services. Please see [the export documentation](https://github.com/laurent22/joplin#exporting) for more information.\n\n## Using End-To-End Encryption\n\nJoplin supports end-to-end encryption (E2EE) on all the applications. E2EE is a system where only the owner of the data can read it. It prevents potential eavesdroppers - including telecom providers, internet providers, and even the developers of Joplin from being able to access the data. Please see the [End-To-End Encryption Tutorial](https://joplin.cozic.net/e2ee/) for more information about this feature and how to enable it.\n\n* * *\n\n**Next:** [Some other tips on how to use Joplin](:/2ee48f80889447429a3cccb04a466072)",
|
"body": "# Synchronising your notes 🔄\n\nOne of the goals of Joplin was to avoid being tied to any particular company or service, whether it is Evernote, Google or Microsoft. As such the synchronisation is designed without any hard dependency to any particular service. You basically choose the service you prefer among those supported, setup the configuration, and the app will be able to sync between your computers or mobile devices.\n\nThe supported cloud services are the following:\n\n## Setting up Dropbox synchronisation\n\nSelect \"Dropbox\" as the synchronisation target in the config screen (it is selected by default). Then, to initiate the synchronisation process, click on the \"Synchronise\" button in the sidebar and follow the instructions.\n\n## Setting up Nextcloud synchronisation\n\nNextcloud is a self-hosted, private cloud solution. It can store documents, images and videos but also calendars, passwords and countless other things and can sync them to your laptop or phone. As you can host your own Nextcloud server, you own both the data on your device and infrastructure used for synchronisation. As such it is a good fit for Joplin.\n\nTo set it up, go to the config screen and select Nextcloud as the synchronisation target. Then input the WebDAV URL (to get it, go to your Nextcloud page, click on Settings in the bottom left corner of the page and copy the URL). Note that it has to be the **full URL**, so for example if you want the notes to be under `/Joplin`, the URL would be something like `https://example.com/remote.php/webdav/Joplin` (note that \"/Joplin\" part). And **make sure to create the \"/Joplin\" directory in Nextcloud**. Finally set the username and password. If it does not work, please [see this explanation](https://github.com/laurent22/joplin/issues/61#issuecomment-373282608) for more details.\n\n## Setting up OneDrive or WebDAV synchronisation\n\nOneDrive and WebDAV are also supported as synchronisation services. Please see [the export documentation](https://github.com/laurent22/joplin#exporting) for more information.\n\n## Using End-To-End Encryption\n\nJoplin supports end-to-end encryption (E2EE) on all the applications. E2EE is a system where only the owner of the data can read it. It prevents potential eavesdroppers - including telecom providers, internet providers, and even the developers of Joplin from being able to access the data. Please see the [End-To-End Encryption Tutorial](https://joplin.cozic.net/e2ee/) for more information about this feature and how to enable it.\n\n* * *\n\n**Next:** [Some other tips on how to use Joplin](:/2ee48f80889447429a3cccb04a466072)",
|
||||||
"tags": [
|
"tags": [
|
||||||
"synchronizing"
|
"synchronising"
|
||||||
],
|
],
|
||||||
"resources": {},
|
"resources": {},
|
||||||
"parent_id": "9bb5d498aba74cc6a047cfdc841e82a1"
|
"parent_id": "9bb5d498aba74cc6a047cfdc841e82a1"
|
||||||
|
@ -63,5 +63,36 @@ module.exports = {
|
||||||
"id": "9bb5d498aba74cc6a047cfdc841e82a1",
|
"id": "9bb5d498aba74cc6a047cfdc841e82a1",
|
||||||
"title": "Welcome!"
|
"title": "Welcome!"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"id": "79cc5ef0f6c24f138033ce48928c2cba",
|
||||||
|
"title": "markdown"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "c83be0495b5d4f1ab655c5c6dfed6804",
|
||||||
|
"title": "organising"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "b5adb734bb0044f2a572a729266b610d",
|
||||||
|
"title": "importing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "bed34e2e3ab74b45af8ba473a05f56f9",
|
||||||
|
"title": "exporting"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "c442fa3b2b2b4389b160c15eb73f35c9",
|
||||||
|
"title": "synchronising"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "22c94167b6e94a92b560ffc31a7f4b1d",
|
||||||
|
"title": "attachment"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "83eae47427df4805905103d4a91727b7",
|
||||||
|
"title": "search"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1529668800000
|
||||||
}
|
}
|
|
@ -8,10 +8,12 @@ const markdownUtils = require('lib/markdownUtils.js');
|
||||||
const rootDir = dirname(__dirname);
|
const rootDir = dirname(__dirname);
|
||||||
const welcomeDir = rootDir + '/readme/welcome';
|
const welcomeDir = rootDir + '/readme/welcome';
|
||||||
|
|
||||||
|
const createdDate = new Date('2018-06-22T12:00:00Z')
|
||||||
|
|
||||||
const itemMetadata_ = {
|
const itemMetadata_ = {
|
||||||
'1_welcome_to_joplin.md': {
|
'1_welcome_to_joplin.md': {
|
||||||
id: '8a1556e382704160808e9a7bef7135d3',
|
id: '8a1556e382704160808e9a7bef7135d3',
|
||||||
tags: 'markdown,organizing',
|
tags: 'markdown,organising',
|
||||||
},
|
},
|
||||||
'2_importing_and_exporting_notes.md': {
|
'2_importing_and_exporting_notes.md': {
|
||||||
id: 'b863cbc514cb4cafbae8dd6a4fcad919',
|
id: 'b863cbc514cb4cafbae8dd6a4fcad919',
|
||||||
|
@ -19,7 +21,7 @@ const itemMetadata_ = {
|
||||||
},
|
},
|
||||||
'3_synchronising_your_notes.md': {
|
'3_synchronising_your_notes.md': {
|
||||||
id: '25b656aac0564d1a91ab98295aa3cc58',
|
id: '25b656aac0564d1a91ab98295aa3cc58',
|
||||||
tags: 'synchronizing',
|
tags: 'synchronising',
|
||||||
},
|
},
|
||||||
'4_tips.md': {
|
'4_tips.md': {
|
||||||
id: '2ee48f80889447429a3cccb04a466072',
|
id: '2ee48f80889447429a3cccb04a466072',
|
||||||
|
@ -29,6 +31,14 @@ const itemMetadata_ = {
|
||||||
'SubNotebooks.png': { id: '3a851ab0c0e849b7bc9e8cd5c4feb34a' },
|
'SubNotebooks.png': { id: '3a851ab0c0e849b7bc9e8cd5c4feb34a' },
|
||||||
'folder_Welcome': { id: '9bb5d498aba74cc6a047cfdc841e82a1' },
|
'folder_Welcome': { id: '9bb5d498aba74cc6a047cfdc841e82a1' },
|
||||||
'WebClipper.png': { id: '30cf9214f5054c4da3b23eed7211a6e0' },
|
'WebClipper.png': { id: '30cf9214f5054c4da3b23eed7211a6e0' },
|
||||||
|
|
||||||
|
'markdown': { id: '79cc5ef0f6c24f138033ce48928c2cba' },
|
||||||
|
'organising': { id: 'c83be0495b5d4f1ab655c5c6dfed6804' },
|
||||||
|
'importing': { id: 'b5adb734bb0044f2a572a729266b610d' },
|
||||||
|
'exporting': { id: 'bed34e2e3ab74b45af8ba473a05f56f9' },
|
||||||
|
'synchronising': { id: 'c442fa3b2b2b4389b160c15eb73f35c9' },
|
||||||
|
'attachment': { id: '22c94167b6e94a92b560ffc31a7f4b1d' },
|
||||||
|
'search': { id: '83eae47427df4805905103d4a91727b7' },
|
||||||
};
|
};
|
||||||
|
|
||||||
function itemMetadata(path) {
|
function itemMetadata(path) {
|
||||||
|
@ -86,6 +96,7 @@ async function parseNoteFile(filePath) {
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const notes = [];
|
const notes = [];
|
||||||
|
const tagIdsToTag = {};
|
||||||
const filenames = fs.readdirSync(welcomeDir);
|
const filenames = fs.readdirSync(welcomeDir);
|
||||||
|
|
||||||
const rootFolder = {
|
const rootFolder = {
|
||||||
|
@ -100,14 +111,30 @@ async function main() {
|
||||||
if (ext === 'md') {
|
if (ext === 'md') {
|
||||||
const note = await parseNoteFile(welcomeDir + '/' + f);
|
const note = await parseNoteFile(welcomeDir + '/' + f);
|
||||||
note.parent_id = rootFolder.id;
|
note.parent_id = rootFolder.id;
|
||||||
|
|
||||||
|
for (let j = 0; j < note.tags.length; j++) {
|
||||||
|
const tagTitle = note.tags[j];
|
||||||
|
const tagId = itemIdFromPath(tagTitle);
|
||||||
|
if (!tagIdsToTag[tagId]) tagIdsToTag[tagId] = {
|
||||||
|
id: tagId,
|
||||||
|
title: tagTitle,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
notes.push(note);
|
notes.push(note);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tags = [];
|
||||||
|
for (let n in tagIdsToTag) {
|
||||||
|
if (!tagIdsToTag.hasOwnProperty(n)) continue;
|
||||||
|
tags.push(tagIdsToTag[n]);
|
||||||
|
}
|
||||||
|
|
||||||
const folders = [];
|
const folders = [];
|
||||||
folders.push(rootFolder);
|
folders.push(rootFolder);
|
||||||
|
|
||||||
const content = { notes: notes, folders: folders }
|
const content = { notes: notes, folders: folders, tags: tags, timestamp: createdDate.getTime() }
|
||||||
const jsonContent = JSON.stringify(content, null, 4);
|
const jsonContent = JSON.stringify(content, null, 4);
|
||||||
const jsContent = 'module.exports = ' + jsonContent;
|
const jsContent = 'module.exports = ' + jsonContent;
|
||||||
fs.writeFileSync(rootDir + '/ReactNativeClient/lib/welcomeAssets.js', jsContent, { encoding: 'utf8' });
|
fs.writeFileSync(rootDir + '/ReactNativeClient/lib/welcomeAssets.js', jsContent, { encoding: 'utf8' });
|
||||||
|
|
Loading…
Reference in New Issue