Created
August 13, 2014 21:47
-
-
Save gerardpaapu/1bfeef4c72689e304ada to your computer and use it in GitHub Desktop.
classes that don't match the names of the files they are provided from
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.data.writer.Json => overrides4.2.js | |
XERO.Application => XERO\app\Application.js | |
Ext.util.Router => XERO\app\Router.js | |
Ext.Router => XERO\app\Router.js | |
XERO.widget.Menu => XERO\base\Menu.js | |
Ext.ButtonManager => XERO\button\Button.js | |
Ext.Buttons => XERO\button\Button.js | |
Ext.button.Button => XERO\button\Button.js | |
XERO.column => XERO\column\DemoColumns.js | |
XERO.combo.settings.AddressFinder => XERO\combo\AddressFinder.js | |
XERO.model.AddressFinder => XERO\combo\AddressFinder.js | |
XERO.container.FilterCheckboxContainer => XERO\container\FilterCheckboxSelectContainer.js | |
XERO.data.demo => XERO\data\Generator.js | |
XERO.data.list.Construct => XERO\data\list\LazyList.js | |
XERO.data.list.MappedList => XERO\data\list\LazyList.js | |
XERO.data.list.ConcatList => XERO\data\list\LazyList.js | |
XERO.data.list.Thunk => XERO\data\list\LazyList.js | |
XERO.data.list.JoinedList => XERO\data\list\LazyList.js | |
XERO.data.list.Empty => XERO\data\list\LazyList.js | |
XERO.data.list.ArrayList => XERO\data\list\LazyList.js | |
XERO.docs.grid.column.Files => XERO\docs\attach\grid\column\Files.js | |
XERO.docs.grid.plugin.AttachedFiles => XERO\docs\attach\grid\plugin\AttachedFiles.js | |
XERO.docs.FilesStore => XERO\docs\store\Files.js | |
XERO.store.RoleStore => XERO\docs\store\RoleStore.js | |
XERO.docs.ux.BoxViewerComponent => XERO\docs\view\files\BoxViewerComponent.js | |
Ext.ux.FilePreviewer => XERO\docs\view\files\FilePreviewer.js | |
XERO.docs.ux.ImageViewerComponent => XERO\docs\view\files\ImageViewerComponent.js | |
XERO.docs.ux.PdfViewerComponent => XERO\docs\view\files\PdfViewerComponent.js | |
XERO.docs.ux.PreviewComponent => XERO\docs\view\files\PreviewComponent.js | |
XERO.feature.SnapshotGrouping => XERO\feature\SnapshotGroupingSummary.js | |
XERO.field.GridColumnCheckboxGroup => XERO\field\ColumnCheckboxGroup.js | |
XERO.field.Skype => XERO\form\Skype.js | |
XERO.field.SocialMedia => XERO\form\SocialMedia.js | |
XERO.data => XERO\help\Session.js | |
XERO.layout.animateComponentLayout => XERO\layout\AnimateComponentLayout.js | |
XERO.ux.BannerMessages => XERO\messages\Message.js | |
XERO.ux.BannerMessage => XERO\messages\Message.js | |
XERO.ux.HoverMessages => XERO\messages\Message.js | |
XERO.toaster => XERO\messages\Message.js | |
XERO.ux.HoverMessage => XERO\messages\Message.js | |
XERO.$ => XERO\mixin\Formatting.js | |
XERO.mixins.GroupedMemoryStore => XERO\mixin\GroupedMemoryStore.js | |
XERO.ux.Message => XERO\panel\Alert.js | |
XERO.ux.BannerMessages => XERO\panel\Message.js | |
XERO.ux.BannerMessage => XERO\panel\Message.js | |
XERO.ux.HoverMessages => XERO\panel\Message.js | |
XERO.toaster => XERO\panel\Message.js | |
XERO.ux.HoverMessage => XERO\panel\Message.js | |
XERO.panel.tabpanel.Deeplink => XERO\panel\tabPanel\Deeplink.js | |
XERO.plugin.field.Formula => XERO\plugin\Formula.js | |
XERO.url => XERO\popup\Login.js | |
XERO.url => XERO\popup\Logout.js | |
XERO.url => XERO\popup\Session.js | |
XERO.popup.Video => XERO\popup\WindowLoad.js | |
XERO.reporting.converters.ConverterInitialize => XERO\reporting\converters\initialize.js | |
XERO.reporting.data.ReportPackProxy => XERO\reporting\data\ReportProxy.js | |
MultiSelectModel => XERO\reporting\field\dataOptions\MultiSelectList.js | |
XERO.reporting.model.ReportPack => XERO\reporting\store\ReportPackListStore.js | |
XERO.reporting.toolbar.HierarchyEditGridToolbar => XERO\reporting\toolbar\EditHierachyToolbar.js | |
XERO.store.FilterCheckboxStore => XERO\store\filter\CheckboxStore.js | |
XERO.ux.Tip => XERO\tip\Tip.js | |
XERO.tip.SimpleTip => XERO\tip\Tip.js | |
XERO.ux.tip.ToolTip => XERO\tip\ToolTip.js | |
XERO.toolbar.FilterCheckboxToolbar => XERO\toolbar\filter\CheckboxToolbar.js | |
XERO.util.Annotations.Annotations => XERO\util\Annotations.js | |
XERO.util.Annotations.Annotation => XERO\util\Annotations.js | |
XERO.util.Annotations.Link => XERO\util\Annotations.js | |
Array => XERO\util\Array.js | |
Date => XERO\util\Date.js | |
Decimal => XERO\util\Decimal.js | |
HTMLString => XERO\util\HTMLString.js | |
XERO.util => XERO\util\Matcher.js | |
XERO.util.WordPrefixMatcher => XERO\util\Matcher.js | |
Number => XERO\util\Number.js | |
XERO.util.parslet.Monad => XERO\util\parslet.js | |
Monad => XERO\util\parslet.js | |
XERO.util.parslet.Cont => XERO\util\parslet.js | |
Cont => XERO\util\parslet.js | |
XERO.util.parslet.Parser => XERO\util\parslet.js | |
Parser => XERO\util\parslet.js | |
XERO.util.parslet.EasyParser => XERO\util\parslet.js | |
EasyParser => XERO\util\parslet.js | |
String => XERO\util\String.js | |
WidgetFocus => XERO\util\WidgetFocus.js | |
XERO.view.InboxBanner => XERO\view\InboxCount.js | |
XERO.widget.Button => XERO\widget\ButtonInput.js | |
XERO.widget.ConvienienceDateRangePicker => XERO\widget\ConvenienceDateRangePicker.js | |
XERO.model.filter.IdName => XERO\widget\filter\FilterCriteriaHelper.js | |
XERO.model.filter.StringIdName => XERO\widget\filter\FilterCriteriaHelper.js | |
XERO.widget.GridSubHeading => XERO\widget\GridSubheading.js | |
XERO.ux.toolbar.PagingToolbar => XERO\widget\PagingToolbar.js | |
XERO.widget.RichText.Editor => XERO\widget\richText\Editor.js | |
XERO.widget.RichText.Toolbar => XERO\widget\richText\Toolbar.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global process */ | |
var data = JSON.parse(require('fs').readFileSync('xero.h.json')); | |
function classes(file) { | |
return file.provides | |
.filter(function (_) { return _.type === 'classname'; }) | |
.map(function (_) { return _.classname; }); | |
} | |
function fnToClass(fn) { | |
return fn.replace(/\.js$/, '').split('\\').join('.'); | |
} | |
function isLegit(file) { | |
var _classes = classes(file); | |
return classes.length === 0 || (_classes.length === 1 && _classes[0] === fnToClass(file.filename)); | |
} | |
var dodgy = data.files.filter(function (file) { | |
return !isLegit(file); | |
}); | |
if (dodgy.length) { | |
dodgy.forEach(function (file) { | |
classes(file).forEach(function (_class) { | |
if (_class !== fnToClass(file.filename)) { | |
process.stdout.write(_class + '\t => ' + file.filename + '\n'); | |
} | |
}); | |
}); | |
process.exit(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment