Skip to content

Commit

Permalink
chore(refactor): models now created at src/models
Browse files Browse the repository at this point in the history
  • Loading branch information
robophil committed Oct 13, 2017
1 parent b932e83 commit 28b0956
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/cmd/types/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = (names, options) => {
copy(names, type, regex).then(() => {
console.log('\n')
names.forEach(name => {
console.info(`New ${type} has been created as src/model/${name}.js`)
console.info(`New ${type} has been created as src/models/${name}.js`)
})
console.log('\n')
}).catch(err => {
Expand Down
3 changes: 1 addition & 2 deletions helper/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ const cwd = process.cwd()

module.exports = (names, type, regex) => {
const src = path.resolve(__dirname, '..', `files/${type}.js`)
const dest = (type === 'model') ? `${cwd}/src/model/` : `${cwd}/src/app/`
const dest = (type === 'model') ? `${cwd}/src/models/` : `${cwd}/src/app/`

console.log(src, dest)
return fs.ensureDir(dest).then(() => {
const copyAction = []
names.forEach((name) => {
Expand Down

0 comments on commit 28b0956

Please sign in to comment.