Skip to content

Commit

Permalink
feat: add new alps-unified-ts lib
Browse files Browse the repository at this point in the history
  • Loading branch information
martin.mueller committed Dec 11, 2020
1 parent 3ecb61a commit 3e9fa0d
Show file tree
Hide file tree
Showing 11 changed files with 687 additions and 589 deletions.
14 changes: 13 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
},
"ignorePatterns": [
"*.js",
"!.projenrc.js",
"*.d.ts",
"node_modules/",
"*.generated.ts",
Expand Down Expand Up @@ -214,5 +215,16 @@
]
}
]
}
},
"overrides": [
{
"files": [
".projenrc.js"
],
"rules": {
"@typescript-eslint/no-require-imports": "off",
"import/no-extraneous-dependencies": "off"
}
}
]
}
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
CI: "true"
steps:
- uses: actions/checkout@v2
- run: yarn install --frozen-lockfile
- run: yarn projen
- name: Anti-tamper check
run: git diff --exit-code
- run: yarn install --check-files --frozen-lockfile
- run: npx projen
- run: git diff --exit-code
name: Anti-tamper check
- name: Set git identity
run: |-
git config user.name "Auto-bump"
git config user.email "github-actions@github.com"
- run: yarn run build
- run: npx projen build
- name: Anti-tamper check
run: git diff --exit-code
container:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
CI: "true"
steps:
- uses: actions/checkout@v2
- run: yarn install --frozen-lockfile
- run: yarn projen
- name: Anti-tamper check
run: git diff --exit-code
- run: yarn install --check-files --frozen-lockfile
- run: npx projen
- run: git diff --exit-code
name: Anti-tamper check
- name: Set git identity
run: |-
git config user.name "Auto-bump"
git config user.email "github-actions@github.com"
- run: yarn run bump
- run: yarn run build
- run: npx projen bump
- run: npx projen build
- name: Anti-tamper check
run: git diff --exit-code
- run: git push --follow-tags origin $GITHUB_REF
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cdk.context.json
images
yarn-error.log
tmp
!/.projen/tasks.json
!/package.json
!/.npmignore
!/LICENSE
Expand Down
178 changes: 178 additions & 0 deletions .projen/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
{
"tasks": {
"compile": {
"name": "compile",
"category": "00.build",
"description": "Only compile",
"steps": [
{
"exec": "jsii --silence-warnings=reserved-word --no-fix-peer-dependencies"
},
{
"spawn": "docgen"
}
]
},
"test": {
"name": "test",
"category": "10.test",
"description": "Run tests",
"steps": [
{
"exec": "rm -fr lib/"
},
{
"exec": "jest --passWithNoTests --all --updateSnapshot"
},
{
"spawn": "eslint"
}
]
},
"build": {
"name": "build",
"category": "00.build",
"description": "Full release build (test+compile)",
"steps": [
{
"spawn": "test"
},
{
"spawn": "compile"
},
{
"spawn": "package"
}
]
},
"bump": {
"name": "bump",
"category": "20.release",
"description": "Commits a bump to the package version based on conventional commits",
"steps": [
{
"exec": "standard-version"
}
],
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
},
"release": {
"name": "release",
"category": "20.release",
"description": "Bumps version & push to main",
"steps": [
{
"spawn": "bump"
},
{
"exec": "git push --follow-tags origin main"
}
],
"condition": "! git log --oneline -1 | grep -q \"chore(release):\""
},
"bootstrap": {
"name": "bootstrap",
"category": "00.build",
"description": "initializes the project",
"steps": [
{
"exec": "yarn install --check-files --frozen-lockfile"
},
{
"exec": "npx projen"
},
{
"exec": "git diff --exit-code",
"name": "Anti-tamper check"
}
]
},
"test:watch": {
"name": "test:watch",
"category": "10.test",
"description": "Run jest in watch mode",
"steps": [
{
"exec": "jest --watch"
}
]
},
"test:update": {
"name": "test:update",
"category": "10.test",
"description": "Update jest snapshots",
"steps": [
{
"exec": "jest --updateSnapshot"
}
]
},
"projen:upgrade": {
"name": "projen:upgrade",
"category": "30.maintain",
"description": "upgrades projen to the latest version",
"steps": [
{
"exec": "yarn upgrade -L projen"
},
{
"exec": "CI=\"\" yarn projen"
}
]
},
"watch": {
"name": "watch",
"category": "00.build",
"description": "Watch & compile in the background",
"steps": [
{
"exec": "jsii -w --silence-warnings=reserved-word --no-fix-peer-dependencies"
}
]
},
"package": {
"name": "package",
"category": "20.release",
"description": "Create an npm tarball",
"steps": [
{
"exec": "jsii-pacmak"
}
]
},
"eslint": {
"name": "eslint",
"category": "10.test",
"description": "Runs eslint against the codebase",
"steps": [
{
"exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test .projenrc.js"
}
]
},
"compat": {
"name": "compat",
"category": "20.release",
"description": "Perform API compatibility check against latest version",
"steps": [
{
"exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)"
}
]
},
"docgen": {
"name": "docgen",
"category": "20.release",
"description": "Generate API.md from .jsii manifest",
"steps": [
{
"exec": "jsii-docgen"
}
]
}
},
"env": {
"PATH": "$(npx -c 'echo $PATH')"
},
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"."
}
14 changes: 7 additions & 7 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ const deps = [
'yamljs',
'yargs@16.1.1',
// 'unified@https://github.com/mamund/alps-unified'
'alps-unified-ts'
'alps-unified-ts',
];

const project = new AwsCdkConstructLibrary({
authorAddress: "damadden88@googlemail.com",
authorName: "Martin Mueller",
name: "cdk-alps-spec-rest-api",
defaultReleaseBranch: "main",
cdkVersion: "1.75.0",
repository: "https://github.com/mmuller88/cdk-alps-spec-rest-api.git",
authorAddress: 'damadden88@googlemail.com',
authorName: 'Martin Mueller',
name: 'cdk-alps-spec-rest-api',
defaultReleaseBranch: 'main',
cdkVersion: '1.75.0',
repository: 'https://github.com/mmuller88/cdk-alps-spec-rest-api.git',
deps: deps,
// peerDeps: deps,
bundledDeps: deps,
Expand Down
2 changes: 1 addition & 1 deletion .versionrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
],
"commitAll": true,
"scripts": {
"postbump": "yarn run projen && git add ."
"postbump": "npx projen && git add ."
}
}
Loading

0 comments on commit 3e9fa0d

Please sign in to comment.