Skip to content

sketch out idea for ignoreGenerators, ignoreActions, ignoreFile#120

Closed
anithri wants to merge 6 commits intojondot:masterfrom
anithri:ignoreDirs
Closed

sketch out idea for ignoreGenerators, ignoreActions, ignoreFile#120
anithri wants to merge 6 commits intojondot:masterfrom
anithri:ignoreDirs

Conversation

@anithri
Copy link
Contributor

@anithri anithri commented May 31, 2019

My biggest pain point has been trying to find the best ways to include static files, and have places to store code to be used in an actions index.js.

All I want is to be able to mark a directory as 'not an action', and a file as skipped.

The problem with this idea is having to figure out how to ignore the right things during the, um, interesting code that crawls the templates dir.

/* wow,
this would need to be refactored into a different form
for ignoring generator actions files
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anithri Seems like you don't need to refactor completely. I think adding another filter before the internal prompt/index filter. Maybe adding a glob to regex library like globrex.

Then you wouldn't need ignore configuration for each type of thing, just ignore based on path.

Something like:

// user config
const config = {
	userIgnores: [
		'wip/**',
		'utils.js'
	]
}

// ...
const globrex = require('globrex');
const userIgnores = config.userIgnores.map(g => globrex(g))


// ...
.then(filter(f => !userIgnores.find(ig => ig.regex.test(f))))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make more sense to just forget the glob syntax and support plain regex

@anithri anithri mentioned this pull request Sep 20, 2019
@anithri
Copy link
Contributor Author

anithri commented Sep 20, 2019

closing in favor of #149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants