GithubHelp home page GithubHelp logo

cdk-soca's Introduction

Welcome to awscdk-jsii-template

This repository template helps you generate JSII construct library for AWS CDK and aims to simplify the process to develop, build, test and eventually publish your AWS CDK construct lib to npmjs and pipy.

Directories in this template

  • src - all the typescript source code under this directory
  • test - unit tests and integ tests
  • lib - will be auto-generated from the src when you run yarn build

Confiuguration

  1. customize your .projenrc.js
  2. run npx projen to project generate assets including the LICENSE, version.json, package.json and .github/workflows from .projenrc.js. At this moment, your initial version should be 0.0.0.
  3. yarn install to install all required npm packages

You can run the commands above like this:

$ npx projen && yarn install

From now on, we will refer to this command as pj. Every time you modify .projenrc.js, just run pj.

Put this in your shell profile: alias pj='npx projen && yarn install'

Integration tests

  1. run yarn watch in a seperate terminal
  2. edit test/integ.api.ts
  3. Run cdk diff and cdk deploy to ensure it deploys with no error in your real aws environment.
cdk --app 'test/integ.api.js' diff
cdk --app 'test/integ.api.js' deploy
  1. validate the stack

Unit tests

  1. edit test/*.test.ts
  2. run yarn test

run yarn build to generate the lib directory

If yarn test is doing great with no error. Run yarn build to generate the lib and other assets.

commit your changes to local repository

$ git commit -am "chore(release): initial commit for the first release" 

bump the version and push to your repository

To bump a specific release version number, i.e. v0.1.0

$ yarn bump --release-as v0.1.0

or simply bump the minor version from version.json, in which case the version will bump from 0.0.0 to 0.0.1

$ yarn bump

and git push with the tags

$ git push --follow-tags origin master

Or just:

# this equals to `arn bump && git push --follow-tags origin master`, see package.json
$ yarn release

If you push successfully, go to your the Actions in your github repository, make sure the build and release workflows run successfully.

Projen

This template leverages the eladb/projen by Elad Ben-Israel. Check it out for more detials and usages for the projen command.

Projects using this Template

cdk-soca's People

Contributors

pahud 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.