From 4cadd8e02c87e1090600c7d05b58e6463878e29a Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Wed, 9 Jan 2019 11:53:08 +0800 Subject: [PATCH] feat: add dcloudio/uni-template-news --- generator.js | 11 ++++++++++- prompts.js | 4 ++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/generator.js b/generator.js index fbd89b1..576a94b 100644 --- a/generator.js +++ b/generator.js @@ -44,7 +44,16 @@ module.exports = (api, options, rootOptions) => { } } }) - } + } else if (options.template === 'dcloudio/uni-template-news') { + api.extendPackage(pkg => { + return { + devDependencies: { + 'node-sass': '^4.11.0', + 'sass-loader': '^7.1.0' + } + } + }) + } api.render(async function (files) { Object.keys(files).forEach(name => { diff --git a/prompts.js b/prompts.js index 7b75d90..7aa610d 100644 --- a/prompts.js +++ b/prompts.js @@ -21,6 +21,10 @@ module.exports = [{ { name: '看图模板', value: 'dcloudio/uni-template-picture' + }, + { + name: '新闻/资讯类模板', + value: 'dcloudio/uni-template-news' }, { name: '自定义模板',