Skip to content

Commit

Permalink
changed back into package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Ade Yahya committed Oct 2, 2017
1 parent 9918cd3 commit 93d6bb4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Ade Yahya Prasetyo
Copyright (c) 2017 Ade Yahya Prasetyo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ var createFile = function(path,css) {
return true;
})

filendir.writeFile(dir + filename + "/" + "index.js", templates.getIndex(filename, true) , function(err) {
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`))
return true;
})
Expand All @@ -43,4 +43,4 @@ program
createFile(file)
}
})
.parse(process.argv)
.parse(process.argv)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "regenr",
"version": "1.1.1",
"version": "1.1.2",
"description": "ReactJs Generator",
"repository": "adeyahya/regenr",
"author": "Ade Yahya <[email protected]> (http://ihavemind.com/)",
"author": "Ade Yahya <[email protected]> (http://paradork.com/)",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
10 changes: 7 additions & 3 deletions template.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ var template = (() => {

var getIndex = (componentName, privateRep) => {
privateRep = privateRep || options.privateRep

return `module.exports = require("./${componentName}.js")`
return `{
"name": "${componentName}",
"version": "0.0.0",
"private": ${privateRep},
"main": "./${componentName}.js"
}`
}

var getReact = (componentName, style, cssModules) => {
Expand Down Expand Up @@ -53,4 +57,4 @@ export default ${componentName}`
}
})()

module.exports = template;
module.exports = template;

0 comments on commit 93d6bb4

Please sign in to comment.