Skip to content

Instantly share code, notes, and snippets.

@ikeisuke
Last active October 14, 2016 05:35
Show Gist options
  • Select an option

  • Save ikeisuke/6cf342a6b8cd744b21ecfc6e99294c93 to your computer and use it in GitHub Desktop.

Select an option

Save ikeisuke/6cf342a6b8cd744b21ecfc6e99294c93 to your computer and use it in GitHub Desktop.
serverlessでデプロイパッケージからディレクトリごとをexcludeする ref: http://qiita.com/ikeisuke/items/861b6351b17947cfe358
$ uname -a
Darwin xxxxxx 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
$ node -v
v6.7.0
$ serverless -v
1.0.2
$ cat /usr/local/lib/node_modules/serverless/node_modules/glob/package.json | grep '"version"'
"version": "7.1.0"
[
'.git',
'.gitignore',
'.DS_Store',
'npm-debug.log',
'serverless.yaml',
'serverless.yml',
'.serverless',
]
package:
exclude:
- .git/**
const files = glob.sync('**', {
cwd: servicePath,
ignore: exclude,
dot: true,
silent: true,
});
package:
exclude:
- .git/**
- test
- test/**
- node_modules/.bin
- node_modules/.bin/*
- node_modules/aws-sdk
- node_modules/aws-sdk/**
- event.json
- README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment