Files
meteor/tools/isobuild/linter-plugin.js
David Glasser 2ccaf6a51e Move some files into isobuild subdirectory
The exact borderline between "Isobuild" and "the tool" is a little hazy,
but the idea is that "Isobuild" is the part that you could imagine being
embedded in a non-command-line build tool. It's not about commands or
UI, but just about building packages and apps.

A next step could be moving things that are strictly "the command-line
tool" into their own subdir, and leaving the top directory mostly just
for shared utilities like buildmessage.  (Which could even go in a utils
subdir?)
2015-07-16 15:12:36 -07:00

38 lines
872 B
JavaScript

var buildPluginModule = require('./build-plugin.js');
var util = require('util');
var _ = require('underscore');
exports.LinterPlugin = function (pluginDefinition, userPlugin) {
var self = this;
self.userPlugin = userPlugin;
self.pluginDefinition = pluginDefinition;
};
var LintingFile = exports.LintingFile = function (source) {
buildPluginModule.InputFile.call(this);
var self = this;
self._source = source;
};
util.inherits(LintingFile, buildPluginModule.InputFile);
_.extend(LintingFile.prototype, {
getContentsAsBuffer: function () {
return this._source.contents;
},
getPathInPackage: function () {
return this._source.relPath;
},
getPackageName: function () {
return this._source['package'];
},
getSourceHash: function () {
return this._source.hash;
},
getArch: function () {
return this._source.arch;
}
});