Skip to content

Commit

Permalink
fix(cli): redux模版里typescript与@tarojs/plugin-typescript依赖缺失, fix #233
Browse files Browse the repository at this point in the history
  • Loading branch information
AsukaSong committed Jul 15, 2018
1 parent 340df41 commit ec31db5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/taro-cli/templates/default/pkg
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"@tarojs/cli": "^<%= version %>",
"@tarojs/plugin-babel": "^<%= version %>",
"@tarojs/plugin-csso": "^<%= version %>",<% if (css !== 'none') {%>
"@tarojs/plugin-<%= css %>": "^<%= version %>",<%}%>
"@tarojs/plugin-uglifyjs": "^<%= version %>",
"@tarojs/webpack-runner": "^<%= version %>",<% if (typescript) {%>
"@tarojs/plugin-<%= css %>": "^<%= version %>",<%}%><% if (typescript) {%>
"@tarojs/plugin-typescript": "^<%= version %>",<%}%>
"@tarojs/plugin-uglifyjs": "^<%= version %>",
"@tarojs/webpack-runner": "^<%= version %>",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
Expand All @@ -38,7 +38,7 @@
"eslint-config-taro": "^<%= version %>",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-taro": "^<%= version %>",<% if (typescript) {%>
"eslint-plugin-taro": "^<%= version %>"<% if (typescript) {%>,
"typescript": "^2.9.2"<%}%>
}
}
3 changes: 2 additions & 1 deletion packages/taro-cli/templates/redux/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ module.exports = function (creater, params, helper, cb) {
description,
projectName,
version,
css
css,
typescript
})
creater.template(template, 'project', path.join(projectPath, 'project.config.json'), {
description,
Expand Down
6 changes: 4 additions & 2 deletions packages/taro-cli/templates/redux/pkg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"@tarojs/cli": "^<%= version %>",
"@tarojs/plugin-babel": "^<%= version %>",
"@tarojs/plugin-csso": "^<%= version %>",<% if (css !== 'none') {%>
"@tarojs/plugin-<%= css %>": "^<%= version %>",<%}%>
"@tarojs/plugin-<%= css %>": "^<%= version %>",<%}%><% if (typescript) {%>
"@tarojs/plugin-typescript": "^<%= version %>",<%}%>
"@tarojs/plugin-uglifyjs": "^<%= version %>",
"@tarojs/webpack-runner": "^<%= version %>",
"babel-plugin-transform-class-properties": "^6.24.1",
Expand All @@ -43,6 +44,7 @@
"eslint-config-taro": "^<%= version %>",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-taro": "^<%= version %>"
"eslint-plugin-taro": "^<%= version %>"<% if (typescript) {%>,
"typescript": "^2.9.2"<%}%>
}
}

0 comments on commit ec31db5

Please sign in to comment.