mirror of https://github.com/laurent22/joplin.git
Tools: Update ignored files when running desktop app in dev mode
parent
f371bb8e59
commit
1bc674a1f9
|
@ -28,7 +28,7 @@ const buildParallel = [
|
|||
'compilePackageInfo',
|
||||
'copyPluginAssets',
|
||||
'copyTinyMceLangs',
|
||||
// 'updateIgnoredTypeScriptBuild',
|
||||
'updateIgnoredTypeScriptBuild',
|
||||
];
|
||||
|
||||
gulp.task('build', gulp.parallel(...buildParallel));
|
||||
|
|
|
@ -2,31 +2,49 @@ const utils = require('../utils');
|
|||
const glob = require('glob');
|
||||
const rootDir = utils.rootDir();
|
||||
|
||||
console.info(rootDir);
|
||||
|
||||
module.exports = {
|
||||
src: '',
|
||||
fn: async function() {
|
||||
// Note that this script is slow so it's best to manually run it after
|
||||
// adding a TypeScript file.
|
||||
// Note that patterns must be `folder/**` in order to make it skip the
|
||||
// directory. If it's `folder/**/*` it will filter the results but still
|
||||
// scan the directory.
|
||||
//
|
||||
// https://github.com/isaacs/node-glob/issues/371
|
||||
|
||||
const tsFiles = glob.sync('{**/*.ts,**/*.tsx}', {
|
||||
cwd: rootDir,
|
||||
ignore: [
|
||||
'**/.git/**',
|
||||
'**/node_modules/**',
|
||||
'Assets/**/*',
|
||||
'packages/app-desktop/dist/**/*',
|
||||
'packages/app-cli/build/**/*',
|
||||
'packages/app-cli/tests-build/**/*',
|
||||
'packages/app-cli/tests/support/plugins/**/*',
|
||||
'packages/app-desktop/dist/**/*',
|
||||
'packages/app-mobile/android/**/*',
|
||||
'packages/app-mobile/ios/**/*',
|
||||
'packages/lib/plugin_types/**/*',
|
||||
'packages/server/**/*',
|
||||
'Assets/**',
|
||||
'docs/**',
|
||||
'packages/app-cli/build/**',
|
||||
'packages/app-cli/tests-build/**',
|
||||
'packages/app-cli/tests/html_to_md/**',
|
||||
'packages/app-cli/tests/md_to_html/**',
|
||||
'packages/app-cli/tests/support/plugins/**',
|
||||
'packages/app-cli/tests/support/syncTargetSnapshots/**',
|
||||
'packages/app-cli/tests/sync/**',
|
||||
'packages/app-cli/tests/test data/**',
|
||||
'packages/app-cli/tests/tmp/**',
|
||||
'packages/app-clipper/popup/build/**',
|
||||
'packages/app-desktop/dist/**',
|
||||
'packages/app-desktop/dist/**',
|
||||
'packages/app-mobile/android/**',
|
||||
'packages/app-mobile/ios/**',
|
||||
// 'packages/fork-htmlparser2/**',
|
||||
'packages/fork-sax/**',
|
||||
'packages/lib/plugin_types/**',
|
||||
'packages/server/**',
|
||||
],
|
||||
}).filter(f => !f.endsWith('.d.ts'));
|
||||
|
||||
// Use this to check what files are being scanned.
|
||||
// Also change glob call to `glob.sync('**/*',`
|
||||
//
|
||||
// const fs = require('fs-extra');
|
||||
// fs.writeFileSync('/Users/laurent/listfile.txt', JSON.stringify(tsFiles, null, '\t'));
|
||||
|
||||
const ignoredJsFiles = tsFiles.map(f => {
|
||||
const s = f.split('.');
|
||||
s.pop();
|
||||
|
|
Loading…
Reference in New Issue