You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-06 09:19:22 +02:00
Generator: Fixed webpack config
This commit is contained in:
@@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) {
|
|||||||
const distFiles = glob.sync(`${sourceDir}/**/*`)
|
const distFiles = glob.sync(`${sourceDir}/**/*`)
|
||||||
.map(f => f.substr(sourceDir.length + 1));
|
.map(f => f.substr(sourceDir.length + 1));
|
||||||
|
|
||||||
|
if (!distFiles.length) {
|
||||||
|
// Usually means there's an error, which is going to be printed by
|
||||||
|
// webpack
|
||||||
|
console.info('Plugin archive was not created because the "dist" directory is empty');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
fs.removeSync(destPath);
|
fs.removeSync(destPath);
|
||||||
|
|
||||||
tar.create(
|
tar.create(
|
||||||
@@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`;
|
|||||||
const manifest = readManifest(manifestPath);
|
const manifest = readManifest(manifestPath);
|
||||||
const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`);
|
const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`);
|
||||||
|
|
||||||
|
fs.removeSync(distDir);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
entry: './src/index.ts',
|
entry: './src/index.ts',
|
||||||
|
|||||||
Reference in New Issue
Block a user