Skip to content

Commit

Permalink
Adding create directories function
Browse files Browse the repository at this point in the history
  • Loading branch information
07Gond committed Mar 25, 2019
1 parent 37ca5d1 commit e8e262b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
17 changes: 17 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const Listr = require('listr')
const { workshopsList, install: workshopInstall } = require('../data/workshops')
const makeDir = require('make-dir')

const tasks = new Listr([
{
Expand Down Expand Up @@ -54,6 +55,22 @@ const tasks = new Listr([
}
])
}
},
{
title: 'Creating directories',
task: async () => Promise.all([
makeDir('javascripting'),
makeDir('learnyounode'),
makeDir('howtonpm'),
makeDir('elementaryelectron'),
makeDir('functionaljavascript'),
makeDir('expressworks'),
makeDir('promiseitwonthurt'),
makeDir('asyncyou'),
makeDir('planetproto'),
makeDir('towerofbabel'),
makeDir('scopechainsclosures')
])
}
], {
collapse: false
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"homepage": "https://github.com/globant-ui/nodeschool-create#readme",
"dependencies": {
"execa": "^1.0.0",
"listr": "^0.14.3"
"listr": "^0.14.3",
"make-dir": "^2.1.0"
},
"devDependencies": {
"standard": "^12.0.1"
Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,14 @@ loose-envify@^1.4.0:
dependencies:
js-tokens "^3.0.0 || ^4.0.0"

make-dir@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
dependencies:
pify "^4.0.1"
semver "^5.6.0"

mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
Expand Down Expand Up @@ -1137,6 +1145,11 @@ pify@^3.0.0:
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=

pify@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==

pkg-conf@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.1.0.tgz#2126514ca6f2abfebd168596df18ba57867f0058"
Expand Down Expand Up @@ -1291,7 +1304,7 @@ rxjs@^6.3.3:
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==

"semver@2 || 3 || 4 || 5", semver@^5.5.0:
"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
Expand Down

0 comments on commit e8e262b

Please sign in to comment.