Skip to content

Commit

Permalink
Add editorconfig, changed colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ade Yahya committed Oct 2, 2017
1 parent 7635796 commit 6e1bca0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.{js,html}]
indent_style = space
indent_size = 2
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,24 @@ var createFile = function(path,css) {
var filename = path.match(/[^\\|\/]*$/)[0]
var dir = path.substring((path.match(/[^\\|\/]*$/).index), -1)

console.log(`\n=====================\n== React Generator ==\n=====================`)

console.log(`::React Generator::`)
filendir.writeFile(dir + filename + "/" + filename + ".js", templates.getReact(filename, css, true) , function(err) {
if (err) return console.log(err)

console.log("Created " + `${dir}${filename}/` + colors.yellow.underline(`${filename}.js`))
console.log(colors.yellow.underline(`${dir}${filename}/${filename}.js`))
return true;
})

filendir.writeFile(`${dir}${filename}/${filename}.${css}`, templates.getStyle(filename, css) , function(err) {
if (err) return console.log(err)
console.log('Created ' + `${dir}${filename}/` + colors.blue.underline(`${filename}.${css}`))
console.log(colors.blue.underline(`${dir}${filename}/${filename}.${css}`))
return true;
})

filendir.writeFile(dir + filename + "/" + "package.json", templates.getIndex(filename, true) , function(err) {
if (err) return console.log(err)

console.log("Created " + `${dir}${filename}/` + colors.magenta.underline(`index.js`))
console.log(colors.magenta.underline(`${dir}${filename}/index.js`))
return true;
})
}
Expand Down

0 comments on commit 6e1bca0

Please sign in to comment.