Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Developer Support - Warn when libs are not specified in config #171

Closed
wants to merge 1 commit into from
Closed

Developer Support - Warn when libs are not specified in config #171

wants to merge 1 commit into from

Conversation

NeverOddOrEven
Copy link
Contributor

There are numerous forum topics where developers are forgetting to update all.js. This is a diagnostic that runs when not in production, to assist developers.

For purposes of dev support and sanity checking:
- Added configurationChecks method to config object
- Added a call to this method in server.js

This could possibly be refactored out of config.js and into
a module devoted to developer support methods.
@NeverOddOrEven NeverOddOrEven changed the title Unreferenced lib include warning Developer Support - Warn when libs are not reference in config Sep 5, 2014
@NeverOddOrEven NeverOddOrEven changed the title Developer Support - Warn when libs are not reference in config Developer Support - Warn when libs are not specified in config Sep 5, 2014
@ilanbiala
Copy link
Member

@NeverOddOrEven you should switch this to Chalk.

// Get all the assets that have been loaded from NPM
var assetPathPresentInProject = this.getGlobbedFiles('./public/lib/*', './public/');

console.info('\x1b[30m\x1b[47m');
Copy link
Member

Choose a reason for hiding this comment

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

Use chalk to make the code cleaner.

@lirantal
Copy link
Member

lirantal commented Jan 6, 2015

@NeverOddOrEven I'm not sure I understand what are the configuration checks for exactly. What libs are supposed to be specified in all.js?

@NeverOddOrEven
Copy link
Contributor Author

This may not necessarily be relevant anymore. The support forum was seeing a lot of issues where people would add a dependency to their project, but not add it to all.js. I haven't seen that issue as much lately.

This pull request would parse the all.js external files against those in the lib folder. Any top level library not in the all.js would be flagged and displayed with a warning.

@ilanbiala
Copy link
Member

@NeverOddOrEven I think people are understanding the build and deployment process now, and I think it is less common. We can always revisit this later, but I think to keep the code simple and applicable to most people, we should leave it out unless the issues come up again.

@NeverOddOrEven
Copy link
Contributor Author

I don't disagree. Dev support can come into play later, as needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants