Git Product home page Git Product logo

Comments (7)

buggy avatar buggy commented on June 14, 2024 2

I've got a couple of other things I want to add and I'll try to get 0.4.0 released in the next few days.

from aws-sam-webpack-plugin.

buggy avatar buggy commented on June 14, 2024 1

@daveykane I think I have a similar problem. If I understand you correctly then I could solve this by adding projectDirs to the plugin options with a default value ["."]. It would treat each folder in projectDirs as its own SAM project expecting a template.yaml with the config and creating a .aws-sam for the output.

Example:

If I set projectDirs: ["project1", "project2"] then it build project1 using project1/template.yaml with the output going to project1/.aws-build and project2 using project2/template.yaml with the output going to project2/.aws-build. You would still need to run sam package and sam deploy in each of the project folders.

If I don't set projectsDirs then it defaults to ["."] so it looks for template.yaml in the current folder with output going to .aws-sam in the same folder.

Does this sound correct?

from aws-sam-webpack-plugin.

daveykane avatar daveykane commented on June 14, 2024

@buggy yes that sounds like it would work to me, good shout.

I saw you also made an update for the next release to skip functions using inline code, thanks for that and thanks for the great work on the plugin so far.

from aws-sam-webpack-plugin.

vadzim avatar vadzim commented on June 14, 2024

Hi @buggy
Thanks for such plugin, it's saved me really much time.

I just wonder what's the reason that name of template.yaml is hardcoded? As I know sam allows to specify the name of template in command line.

from aws-sam-webpack-plugin.

buggy avatar buggy commented on June 14, 2024

I just wonder what's the reason that name of template.yaml is hardcoded?

It's just the way I built it. I picked template.yaml and template.yml because they're the two defaults that SAM uses. You're the first person to ask for it to support other names.

from aws-sam-webpack-plugin.

vadzim avatar vadzim commented on June 14, 2024

Yes, template.yaml is used widely. I've just noted that compatibility with running sam build is mentioned as one of the project goals, and sam already has an option to specify path to template and that path can be arbitrary file name.
sam is rather often used tool and this plugin is still gaining its popularity, so I believe I'm the first one, but not the last))

from aws-sam-webpack-plugin.

buggy avatar buggy commented on June 14, 2024

I've pushed experimental support for building multiple projects to the develop branch. Once I run some more tests I'll release version 0.5.0 with it.

@vadzim you can use the projects option to have different template names.

from aws-sam-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.