hyperbrain / serverless-package-plugin Goto Github PK
View Code? Open in Web Editor NEWFunction packaging for Serverless
Function packaging for Serverless
When using plugins in the project, that are run before function deployment (e.g. serverless-optimizer-plugin) the package plugin does not execute them. This leads to the packaged files not having the optimizations applied.
The package plugin should execute as follows:
-> Runtime build/package
-> post codePackageLambda hooks
-> pre codeDeployLambda hooks
Afterwards the package should be identical to what function deploy creates.
Currently the plugin just runs the runtime builder, so the output can be found in the meta/_tmp
directory.
There may be better options, like having a --dest
switch to copy the packaged output somewhere else and to put it into structured directories.
I am seeing the following when running
sls package create sites -s josh -r us-east-1
/home/jwilson/.nvm/versions/node/v4.3.2/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:61
fn = function () { throw arg; };
^
TypeError: Cannot read property 'project' of undefined
at /home/jwilson/Development/berry/pyramid-api/node_modules/serverless-package-plugin/lib/actions/PackageCreate.js:106:28
at Array.forEach (native)
at PackageCreate._validateAndPrepare (/home/jwilson/Development/berry/pyramid-api/node_modules/serverless-package-plugin/lib/actions/PackageCreate.js:105:32)
When I do not specify a function, it works successfully.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.