mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
25 lines
444 B
JavaScript
25 lines
444 B
JavaScript
const {entries, imported} = require('../dependency-graph')
|
|
|
|
module.exports = {
|
|
meta: {
|
|
docs: {}
|
|
},
|
|
|
|
create(context) {
|
|
const filename = context.getFilename()
|
|
|
|
if (entries.has(filename)) {
|
|
return {}
|
|
}
|
|
|
|
return {
|
|
Program(node) {
|
|
const {filenames} = imported()
|
|
if (!filenames.has(filename)) {
|
|
context.report(node, 'Module was not imported by any files.')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|