mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-27 07:24:59 +00:00
Merge pull request #224 from DeviateFish/update-package-test
Updates to boilerplate and template creation
This commit is contained in:
commit
3ab41f086a
@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "app_name",
|
"name": "%APP_NAME%",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "Gruntfile.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "embark test"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
@ -11,6 +11,7 @@ TemplateGenerator.prototype.generate = function(destinationFolder, name) {
|
|||||||
|
|
||||||
fs.copySync(templatePath, destinationFolder + name);
|
fs.copySync(templatePath, destinationFolder + name);
|
||||||
utils.cd(destinationFolder + name);
|
utils.cd(destinationFolder + name);
|
||||||
|
utils.sed('package.json', '%APP_NAME%', name);
|
||||||
|
|
||||||
console.log('Installing packages.. this can take a few seconds'.green);
|
console.log('Installing packages.. this can take a few seconds'.green);
|
||||||
utils.runCmd('npm install');
|
utils.runCmd('npm install');
|
||||||
|
@ -45,6 +45,10 @@ function cd(folder) {
|
|||||||
shelljs.cd(folder);
|
shelljs.cd(folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sed(file, pattern, replace) {
|
||||||
|
shelljs.sed('-i', pattern, replace, file);
|
||||||
|
}
|
||||||
|
|
||||||
function exit(code) {
|
function exit(code) {
|
||||||
process.exit(code);
|
process.exit(code);
|
||||||
}
|
}
|
||||||
@ -57,6 +61,7 @@ module.exports = {
|
|||||||
checkIsAvailable: checkIsAvailable,
|
checkIsAvailable: checkIsAvailable,
|
||||||
runCmd: runCmd,
|
runCmd: runCmd,
|
||||||
cd: cd,
|
cd: cd,
|
||||||
|
sed: sed,
|
||||||
exit: exit
|
exit: exit
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user