Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.project
examples/basic.json
18 changes: 13 additions & 5 deletions lambda-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,18 @@ if (!program.skipUpload) {
process.exit(1);
}

//run an npm update to get the latest dependencies
console.log(`Updating package dependencies...`);
//remove the yarn.lock file
try {
execSync('npm update -S && npm update -D');
execSync(`rm -f yarn.lock`);
} catch (err) {
console.error(`Error removing yarn.lock: ${err.message}`);
process.exit(1);
}

//run a yarn install to get the latest dependencies
console.log(`Installing package dependencies...`);
try {
execSync('yarn install');
} catch (err) {
console.error(`Error updating dependencies: ${err.message}`);
process.exit(1);
Expand All @@ -58,7 +66,7 @@ if (!program.skipUpload) {
//compile the package
console.log(`Compiling package...`);
try {
execSync('npm run compile');
execSync('yarn run compile');
} catch (err) {
console.error(`Error compiling package: ${err.message}`);
process.exit(1);
Expand All @@ -67,7 +75,7 @@ if (!program.skipUpload) {
//remove dev dependencies from output to streamline output
console.log(`Removing dev dependencies...`);
try {
execSync('npm prune --production');
execSync('rm -rf node_modules/ && yarn install --production');
} catch (err) {
console.error(`Error removing dev dependencies: ${err.message}`);
process.exit(1);
Expand Down
20 changes: 14 additions & 6 deletions lambda-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,18 @@ if (!program.skipUpload) {
process.exit(1);
}

//run an npm update to get the latest dependencies
console.log(`Updating package dependencies...`);
//remove the yarn.lock file
try {
execSync('npm update -S && npm update -D');
execSync(`rm -f yarn.lock`);
} catch (err) {
console.error(`Error removing yarn.lock: ${err.message}`);
process.exit(1);
}

//run a yarn install to get the latest dependencies
console.log(`Installing package dependencies...`);
try {
execSync('yarn install');
} catch (err) {
console.error(`Error updating dependencies: ${err.message}`);
process.exit(1);
Expand All @@ -60,7 +68,7 @@ if (!program.skipUpload) {
//compile the package
console.log(`Compiling package...`);
try {
execSync('npm run compile');
execSync('yarn run compile');
} catch (err) {
console.error(`Error compiling package: ${err.message}`);
process.exit(1);
Expand All @@ -69,11 +77,11 @@ if (!program.skipUpload) {
//remove dev dependencies from output to streamline output
console.log(`Removing dev dependencies...`);
try {
execSync('npm prune --production');
execSync('rm -rf node_modules/ && yarn install --production');
} catch (err) {
console.error(`Error removing dev dependencies: ${err.message}`);
process.exit(1);
}
}

//zip up the distribution files
console.log(`Creating distribution package '${zipfile}' from [${files.join()}]...`);
Expand Down
Empty file modified lambda.js
100644 → 100755
Empty file.