Skip to content

Commit

Permalink
fix: generate package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
yundongbot committed Aug 2, 2019
1 parent bd80eda commit 075603a
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 075603a

Please sign in to comment.