Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

init #1

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
assignees:
- "arjangeertsema"
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: release

on:

pull_request:
types: [closed]
branches: [main]

jobs:

release:

runs-on: ubuntu-latest
environment: production
if: github.event.pull_request.merged
timeout-minutes: 10

steps:

- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: get package version
id: package_version
uses: Saionaro/extract-package-version@v1.0.6

- name: add v
id: version
run: echo "::set-output name=value::${{ format('v{0}', steps.package_version.outputs.version) }}"

- name: print package version
run: |
echo "package version: ${{ steps.version.outputs.value }}"

- name: get tag version
id: tag_version
uses: WyriHaximus/github-action-get-previous-tag@v1

- name: print tag version
run: |
echo 'tag version: ${{ steps.tag_version.outputs.tag }}'

- name: push tag
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }}
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

git tag -a "${{ steps.version.outputs.value}}" -m "${{ steps.version.outputs.value }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}"
git push origin "${{ steps.version.outputs.value}}"

- name: setup node.js
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }}
uses: actions/setup-node@v2
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: npm publish
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }}
run: |
npm ci
npm run build
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM }}

- name: build release notes
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }}
id: release_notes
uses: mikepenz/release-changelog-builder-action@v3.6.0
env:
GITHUB_TOKEN: ${{ github.token }}

- name: create release
if: ${{ steps.version.outputs.value != steps.tag_version.outputs.tag }}
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ steps.version.outputs.value }}
title: '${{ steps.version.outputs.value }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}'
body: ${{steps.release_notes.outputs.changelog}}

46 changes: 17 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -42,8 +41,8 @@ build/Release
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo
Expand All @@ -54,9 +53,6 @@ web_modules/
# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
Expand All @@ -72,41 +68,29 @@ web_modules/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
# dotenv environment variables file
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

Expand All @@ -119,12 +103,16 @@ dist
# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# Project config files
/.idea

# Temporary files used for building
.temp/

# Generated files
.generated/
tests/dist/
tests/release/
.DS_Store

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
private/
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
# business-model-canvas-component
# Business model canvas for [md-docs](https://github.com/biz-dev-ops/md-docs-cli)

HTML5 web component which renders a business model canvas.

## Usage

- Add `business-model-canvas.js` to the webpage
- Add the `<business-model-canvas></business-model-canvas>` to the page

## Attributes

### model-json

An HTML escaped version of the business model canvas model.

### model

The business model canvas model, must be set via JavaScript.

## Examples

### HTML

```html
<business-model-canvas model-json="{ &quot;key &quot;: &quot;value &quot; }" />
```

### HTML and JavaScript

```html
<business-model-canvas id="business-model-canvas" />

<script>
document.getElementById('business-model-canvas').model = {
...
}
<script>
```
Loading
Loading