mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-12 23:14:10 +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",
|
||||
"description": "",
|
||||
"main": "Gruntfile.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "embark test"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
@ -11,6 +11,7 @@ TemplateGenerator.prototype.generate = function(destinationFolder, name) {
|
||||
|
||||
fs.copySync(templatePath, destinationFolder + name);
|
||||
utils.cd(destinationFolder + name);
|
||||
utils.sed('package.json', '%APP_NAME%', name);
|
||||
|
||||
console.log('Installing packages.. this can take a few seconds'.green);
|
||||
utils.runCmd('npm install');
|
||||
|
@ -45,6 +45,10 @@ function cd(folder) {
|
||||
shelljs.cd(folder);
|
||||
}
|
||||
|
||||
function sed(file, pattern, replace) {
|
||||
shelljs.sed('-i', pattern, replace, file);
|
||||
}
|
||||
|
||||
function exit(code) {
|
||||
process.exit(code);
|
||||
}
|
||||
@ -57,6 +61,7 @@ module.exports = {
|
||||
checkIsAvailable: checkIsAvailable,
|
||||
runCmd: runCmd,
|
||||
cd: cd,
|
||||
sed: sed,
|
||||
exit: exit
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user