Skip to content

Commit 7ee6f6f

Browse files
committed
sequester all turds not being added to puck in .sls dir
1 parent 1a26bad commit 7ee6f6f

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

lib/link.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ const fse = require('fs-extra');
22
const path = require('path');
33

44
/**
5-
* link all the files in .requirements to the service directory root
6-
* @return {undefined}
7-
*/
5+
* link all the files in .serverless/requirements to the service directory root
6+
* @return {undefined}
7+
*/
88
function linkRequirements() {
9-
const requirementsDir = path.join(this.servicePath, '.requirements');
9+
const requirementsDir = path.join(this.servicePath, '.serverless/requirements');
1010
if (!this.options.zip && fse.existsSync(requirementsDir)) {
1111
this.serverless.cli.log('Linking required Python packages...');
1212
const noDeploy = new Set(this.options.noDeploy || []);
@@ -34,11 +34,11 @@ function linkRequirements() {
3434
}
3535

3636
/**
37-
* unlink all the files in .requirements from the service directory root
38-
* @return {undefined}
39-
*/
37+
* unlink all the files in .serverless/requirements from the service directory root
38+
* @return {undefined}
39+
*/
4040
function unlinkRequirements() {
41-
const requirementsDir = path.join(this.servicePath, '.requirements');
41+
const requirementsDir = path.join(this.servicePath, '.serverless/requirements');
4242
if (!this.options.zip && fse.existsSync(requirementsDir)) {
4343
this.serverless.cli.log('Unlinking required Python packages...');
4444
const noDeploy = new Set(this.options.noDeploy || []);

lib/pip.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ const path = require('path');
33
const {spawnSync} = require('child_process');
44

55
/**
6-
* pip install the requirements to the .requirements directory
7-
* @return {Promise}
8-
*/
6+
* pip install the requirements to the .serverless/requirements directory
7+
* @return {Promise}
8+
*/
99
function installRequirements() {
1010
let fileName = this.options.fileName;
1111
if (fse.existsSync(path.join(this.servicePath, 'Pipfile'))) {
@@ -21,7 +21,7 @@ function installRequirements() {
2121
let options;
2222
const pipCmd = [
2323
this.options.pythonBin, '-m', 'pip', '--isolated', 'install',
24-
'-t', '.requirements', '-r', fileName,
24+
'-t', '.serverless/requirements', '-r', fileName,
2525
...this.options.pipCmdExtraArgs,
2626
];
2727
if (!this.options.dockerizePip) {

lib/zip.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ function removeVendorHelper() {
3333
};
3434

3535
/**
36-
* zip up .requirements
36+
* zip up .serverless/requirements
3737
* @return {Promise}
3838
*/
3939
function packRequirements() {
4040
if (this.options.zip) {
4141
this.serverless.cli.log('Zipping required Python packages...');
4242
this.serverless.service.package.include.push('.requirements.zip');
4343
return zipDirectory(
44-
path.join(this.servicePath, '.requirements'),
44+
path.join(this.servicePath, '.serverless/requirements'),
4545
path.join(this.servicePath, '.requirements.zip'));
4646
}
4747
}

0 commit comments

Comments
 (0)