Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Fix start command to properly process v2 local directory template #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,19 @@ Start.fetchLocalStarter = function(options) {
return q.promise;
}

log.info('\nCopying files to www from:'.bold, localStarterPath);
// for v2, copy both 'src' and 'www' folder to target path
if (options.v2) {
log.info('\nCopying files to project from:'.bold, localStarterPath);

shelljs.cp('-Rf', path.join(localStarterPath, '*'), options.targetPath);
}
// for v1, only focus on 'www' folder
else {
log.info('\nCopying files to www folder from:'.bold, localStarterPath);

// Move the content of this repo into the www folder
shelljs.cp('-Rf', path.join(localStarterPath, '*'), path.join(options.targetPath, 'www'));
// Move the content of this repo into the www folder
shelljs.cp('-Rf', path.join(localStarterPath, '*'), path.join(options.targetPath, 'www'));
}

q.resolve();
} catch (e) {
Expand Down