diff --git a/packages/server/gulpfile.js b/packages/server/gulpfile.js index e9924b82b..0045e41f3 100644 --- a/packages/server/gulpfile.js +++ b/packages/server/gulpfile.js @@ -3,12 +3,19 @@ const utils = require('@joplin/tools/gulp/utils'); const compilePackageInfo = require('@joplin/tools/compilePackageInfo'); const fs = require('fs-extra'); +const distDir = `${__dirname}/dist`; + const tasks = { compilePackageInfo: { fn: async () => { - const targetDir = `${__dirname}/dist`; - await fs.mkdirp(targetDir); - await compilePackageInfo(`${__dirname}/package.json`, `${targetDir}/packageInfo.js`); + await fs.mkdirp(distDir); + await compilePackageInfo(`${__dirname}/package.json`, `${distDir}/packageInfo.js`); + }, + }, + + clean: { + fn: async () => { + await fs.remove(distDir); }, }, }; diff --git a/packages/server/package.json b/packages/server/package.json index 5a710fcd9..2cb447076 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -16,7 +16,7 @@ "test": "jest --verbose=false", "test-ci": "yarn test", "test-debug": "node --inspect node_modules/.bin/jest -- --verbose=false", - "clean": "rm -rf dist/", + "clean": "gulp clean", "stripeListen": "stripe listen --forward-to http://joplincloud.local:22300/stripe/webhook", "watch": "tsc --watch --project tsconfig.json" },