Skip to content

Commit

Permalink
Merge pull request #1194 from DoranYun/fix-rename-packageJson
Browse files Browse the repository at this point in the history
fix: generate package.json
  • Loading branch information
Orange-C authored Aug 2, 2019
2 parents 97c30cb + 075603a commit 7806c85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 0 additions & 5 deletions packages/rax-cli/src/generator/component/.npmignore

This file was deleted.

4 changes: 3 additions & 1 deletion packages/rax-cli/src/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const TemplateProcesser = require('./template-processer');
// Rename files start with '_'
function renameFile(files) {
files.forEach(file => {
if (file.name[0] === '_') {
if (file.name === '_package.json') {
file.name = file.name.replace(/^_/, '');
} else {
file.name = file.name.replace(/^_/, '.');
}
});
Expand Down

0 comments on commit 7806c85

Please sign in to comment.