Giter Site home page Giter Site logo

sdstolworthy / amplify-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-amplify/amplify-backend

0.0 0.0 0.0 10.03 MB

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS

License: Apache License 2.0

Shell 0.01% JavaScript 1.14% TypeScript 98.85%

amplify-backend's Introduction

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Set up your local development environment

# clone project repo
cd <project directory>
npm run install:local
npm run test

npm run install:local will run npm install, then build all packages in the project and run npm link

npm run test will run all the unit tests in the project

You should now be able to run the new amplify CLI.

Other helpful scripts

npm run watch will start the tsc server and watch for changes in all packages

npm run test:coverage:threshold will let you know if your changes are passing test coverage limits

npm run test:dir packages/<package directory> will run only the tests in that directory

npm run vend will start a local npm proxy and publish the local packages to this proxy so they can be installed / used as if they were published on npm

npm run e2e will run the E2E test suite. Note: you must have valid AWS credentials configured locally to run this command successfully.

Creating changesets

This repo uses changesets for versioning and releasing changes.

All changes that affect release artifacts must have a corresponding changeset. To create a changeset run changeset. This will start a walkthrough to author the changeset file. This file should be committed to the repo.

Publishing packages locally

Publishing packages locally allows you to install local package changes as if they were published to NPM. This is useful for testing or demo scenarios.

To set up a local npm proxy and publish the current local state to the proxy, run npm run vend. This will start a local npm proxy using Verdaccio and run changeset version and changeset publish.

This will also point your local npm config to the local npm proxy. At this point you can npm install any packages in the repo and it will pull from the local proxy instead of directly from npm.

To stop the local server and reset your npm registry run npm run stop:npm-proxy.

To clear the proxy package cache run npm run clean:npm-proxy. This will stop the local proxy and remove all packages you have published.

To start the npm proxy without immediately publishing, run npm run start:npm-proxy.

To publish a snapshot to an already running npm proxy run npm run publish:snapshot:local latest

Adding a package

This repo uses a monorepo structure managed by npm workspaces. All the packages in the workspace are under packages/*

There are package templates for some common scenarios in the templates directory. These templates can be copied to a new package directory using npm run new -- --template=<template> --name=<new name> --template specifies which template to use and --name specifies the new package name. Valid templates are the directories in the templates directory

If you are adding a new package that does not have a template, consider adding a template for that package type. You'll probably want to use an existing template as a starting point for the new package.

At a minimum, each package needs:

  1. A package.json file
  2. A tsconfig.json file. This file should extend tsconfig.base.json
  3. An api-extractor.json file. This file should extend api-extractor.base.json
  4. An update:api script in the package.json file
  5. A typedoc.json file
  6. An .npmignore file

amplify-backend's People

Contributors

edwardfoyle avatar sobolk avatar sdstolworthy avatar github-actions[bot] avatar amplifiyer avatar awsluja avatar johnpc avatar hoangnbn avatar 0618 avatar alharris-at avatar rtpascual avatar dependabot[bot] avatar dpilch avatar iartemiev avatar abhi7cr avatar bombguy avatar goldbez avatar josefaidt avatar amazon-auto avatar srquinn21 avatar

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.