-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat]: fix bug with shipwright not defined (#9)
* fix(plugin-sails-content): refactor call to generateContent * feat(sails-hook-content): set shipwright methods as locals * chore(plugin-sails-content): reinstall ejs * feat(plugin-sails-content): remove unneeded check for inputDir * feat(plugin-sails-content): revert to using ejs to render
- Loading branch information
1 parent
32e9d51
commit af69ec3
Showing
6 changed files
with
28 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
const generateContent = require('./generate-content') | ||
module.exports = function pluginSailsContent(sails) { | ||
module.exports = function pluginSailsContent(config) { | ||
return { | ||
name: 'sails:content', | ||
setup(api) { | ||
api.onDevCompileDone(async function () { | ||
await generateContent(sails) | ||
}) | ||
api.onAfterBuild(async function () { | ||
await generateContent(sails) | ||
}) | ||
const runGenerateContent = async () => await generateContent(config) | ||
|
||
api.onDevCompileDone(runGenerateContent) | ||
api.onAfterBuild(runGenerateContent) | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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