Skip to content

Commit

Permalink
epub, webを追加。textはtextmakerを利用
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Feb 12, 2019
1 parent eb634e2 commit 573619f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
20 changes: 18 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const reviewPreproc = `${reviewPrefix}review-preproc${reviewPostfix}`;
const reviewCompile = `${reviewPrefix}review-compile${reviewPostfix}`;
const reviewPdfMaker = `${reviewPrefix}review-pdfmaker${reviewPostfix}`;
const reviewEpubMaker = `${reviewPrefix}review-epubmaker${reviewPostfix}`;
const reviewWebMaker = `${reviewPrefix}review-webmaker${reviewPostfix}`;
const reviewTextMaker = `${reviewPrefix}review-textmaker${reviewPostfix}`;

module.exports = grunt => {
grunt.initConfig({
Expand All @@ -25,7 +27,8 @@ module.exports = grunt => {
`${articles}/*.html`,
`${articles}/*.md`,
`${articles}/*.xml`,
`${articles}/*.txt`
`${articles}/*.txt`,
`${articles}/webroot`
]
}
},
Expand All @@ -44,7 +47,7 @@ module.exports = grunt => {
cwd: articles,
}
},
command: `${reviewCompile} --target=text`
command: `${reviewTextMaker} ${reviewConfig}`
},
compile2markdown: {
options: {
Expand Down Expand Up @@ -93,6 +96,14 @@ module.exports = grunt => {
}
},
command: `${reviewEpubMaker} ${reviewConfig}`
},
compile2web: {
options: {
execOptions: {
cwd: articles,
}
},
command: `${reviewWebMaker} ${reviewConfig}`
}
}
});
Expand Down Expand Up @@ -136,5 +147,10 @@ module.exports = grunt => {
"原稿をコンパイルしてepubファイルにする",
generateTask("epub"));

grunt.registerTask(
"web",
"原稿をコンパイルしてWebページファイルにする",
generateTask("web"));

require('load-grunt-tasks')(grunt);
};
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "review-template",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"description": "",
"main": "Gruntfile.js",
Expand All @@ -24,6 +24,9 @@
"pdf": "grunt pdf",
"md": "grunt markdown",
"html": "grunt html",
"text": "grunt text",
"epub": "grunt epub",
"web": "grunt web",
"test": "npm run html"
},
"dependencies": {},
Expand Down

0 comments on commit 573619f

Please sign in to comment.