Skip to content

Commit 34f4321

Browse files
Merge pull request #16 from manastalukdar/develop
v0.1.6
2 parents 08cb8bb + f28937b commit 34f4321

File tree

19 files changed

+17910
-8119
lines changed

19 files changed

+17910
-8119
lines changed

.eslintrc.js

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,53 @@ module.exports = {
22
root: true,
33
env: {
44
browser: true,
5-
node: true
5+
node: true,
6+
es6: true
67
},
78
parserOptions: {
8-
parser: 'babel-eslint'
9+
parser: 'babel-eslint',
10+
"parserOptions": {
11+
"ecmaVersion": 6,
12+
"sourceType": "module",
13+
"ecmaFeatures": {
14+
"jsx": true,
15+
"modules": true,
16+
"experimentalObjectRestSpread": true
17+
}
918
},
1019
extends: [
1120
'plugin:prettier/recommended',
12-
"eslint:recommended"
21+
"eslint:recommended",
22+
'google',
23+
'standard'
1324
],
1425
plugins: [
15-
'prettier'
26+
'prettier',
27+
'markdown'
1628
],
1729
// add your custom rules here
1830
rules: {
19-
"prettier/prettier": ["error", {
20-
"endOfLine":"auto"
21-
}
31+
'no-underscore-dangle': 0,
32+
'import/imports-first': ['error', 'absolute-first'],
33+
'import/newline-after-import': 'error',
34+
'prettier/prettier': [
35+
'error',
36+
{
37+
endOfLine: 'auto'
38+
}
2239
],
2340
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
2441
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
2542
},
26-
globals: {}
43+
globals: {
44+
window: true,
45+
document: true,
46+
localStorage: true,
47+
FormData: true,
48+
FileReader: true,
49+
Blob: true,
50+
navigator: true,
51+
Atomics: "readonly",
52+
SharedArrayBuffer: "readonly"
53+
}
2754
}

.eslintrc.json

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
2-
"env": {
3-
"browser": true,
4-
"es6": true,
5-
"node": true
6-
},
7-
"extends": ["google", "standard"],
8-
"globals": {
9-
"Atomics": "readonly",
10-
"SharedArrayBuffer": "readonly"
11-
},
12-
"parserOptions": {
13-
"ecmaVersion": 2018,
14-
"sourceType": "module"
15-
},
16-
"plugins": [],
17-
"rules": {
18-
}
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"google",
9+
"standard"
10+
],
11+
"globals": {
12+
"Atomics": "readonly",
13+
"SharedArrayBuffer": "readonly"
14+
},
15+
"parserOptions": {
16+
"ecmaVersion": 6,
17+
"sourceType": "module"
18+
},
19+
"plugins": [],
20+
"rules": {}
1921
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: 'CodeQL'
2+
3+
on:
4+
push:
5+
branches: [develop, main]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [develop]
9+
schedule:
10+
- cron: '0 3 * * 2'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
# Override automatic language detection by changing the below list
21+
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
22+
language: ['javascript']
23+
# Learn more...
24+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v2
29+
with:
30+
# We must fetch at least the immediate parents so that if this is
31+
# a pull request then we can checkout the head.
32+
fetch-depth: 2
33+
34+
# If this run was triggered by a pull request event, then checkout
35+
# the head of the pull request instead of the merge commit.
36+
- run: git checkout HEAD^2
37+
if: ${{ github.event_name == 'pull_request' }}
38+
39+
# Initializes the CodeQL tools for scanning.
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v1
42+
with:
43+
languages: ${{ matrix.language }}
44+
# If you wish to specify custom queries, you can do so here or in a config file.
45+
# By default, queries listed here will override any specified in a config file.
46+
# Prefix the list here with "+" to use these queries and those in the config file.
47+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
48+
49+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
50+
# If this step fails, then you should remove it and run the build manually (see below)
51+
- name: Autobuild
52+
uses: github/codeql-action/autobuild@v1
53+
54+
# ℹ️ Command-line programs to run using the OS shell.
55+
# 📚 https://git.io/JvXDl
56+
57+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
58+
# and modify them (or add more) to build your code if your project
59+
# uses a compiled language
60+
61+
#- run: |
62+
# make bootstrap
63+
# make release
64+
65+
- name: Perform CodeQL Analysis
66+
uses: github/codeql-action/analyze@v1

.github/workflows/linter.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
###########################
3+
###########################
4+
## Linter GitHub Actions ##
5+
###########################
6+
###########################
7+
name: Lint Code Base
8+
9+
#
10+
# Documentation:
11+
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
12+
#
13+
14+
#############################
15+
# Start the job on all push #
16+
#############################
17+
on:
18+
push:
19+
branches-ignore: [main]
20+
# Remove the line above to run when pushing to main
21+
pull_request:
22+
branches: [main]
23+
24+
###############
25+
# Set the Job #
26+
###############
27+
jobs:
28+
build:
29+
# Name the Job
30+
name: Lint Code Base
31+
# Set the agent to run on
32+
runs-on: ubuntu-latest
33+
34+
##################
35+
# Load all steps #
36+
##################
37+
steps:
38+
##########################
39+
# Checkout the code base #
40+
##########################
41+
- name: Checkout Code
42+
uses: actions/checkout@v2
43+
44+
################################
45+
# Run Linter against code base #
46+
################################
47+
- name: Lint Code Base
48+
uses: github/super-linter@v3
49+
env:
50+
VALIDATE_ALL_CODEBASE: false
51+
DEFAULT_BRANCH: develop
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow integrates a collection of open source static analysis tools
2+
# with GitHub code scanning. For documentation, or to provide feedback, visit
3+
# https://github.com/github/ossar-action
4+
name: OSSAR
5+
6+
on:
7+
push:
8+
pull_request:
9+
10+
jobs:
11+
OSSAR-Scan:
12+
# OSSAR runs on windows-latest.
13+
# ubuntu-latest and macos-latest support coming soon
14+
runs-on: windows-latest
15+
16+
steps:
17+
# Checkout your code repository to scan
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
with:
21+
# We must fetch at least the immediate parents so that if this is
22+
# a pull request then we can checkout the head.
23+
fetch-depth: 2
24+
25+
# If this run was triggered by a pull request event, then checkout
26+
# the head of the pull request instead of the merge commit.
27+
- run: git checkout HEAD^2
28+
if: ${{ github.event_name == 'pull_request' }}
29+
30+
# Ensure a compatible version of dotnet is installed.
31+
# The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201.
32+
# A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action.
33+
# Remote agents already have a compatible version of dotnet installed and this step may be skipped.
34+
# For local agents, ensure dotnet version 3.1.201 or later is installed by including this action:
35+
# - name: Install .NET
36+
# uses: actions/setup-dotnet@v1
37+
# with:
38+
# dotnet-version: '3.1.x'
39+
40+
# Run open source static analysis tools
41+
- name: Run OSSAR
42+
uses: github/ossar-action@v1
43+
id: ossar
44+
45+
# Upload results to the Security tab
46+
- name: Upload OSSAR results
47+
uses: github/codeql-action/upload-sarif@v1
48+
with:
49+
sarif_file: ${{ steps.ossar.outputs.sarifFile }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ dist
6464
.reify-cache
6565
src/**/mermaid.min.js
6666
src/temp/
67+
68+
.metals

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,8 @@
3939
"markdown.extension.toc.levels": "2..6",
4040
"editor.codeActionsOnSave": {
4141
"source.fixAll.eslint": true
42+
},
43+
"files.watcherExclude": {
44+
"**/target": true
4245
}
4346
}

README.md

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# markdown-it-textual-uml
22

33
1. [Overview](#overview)
4-
1. [Metadata](#metadata)
5-
2. [Continuous Integration](#continuous-integration)
64
2. [UML examples](#uml-examples)
75
1. [PlantUML](#plantuml)
86
2. [DOT](#dot)
@@ -17,6 +15,13 @@
1715

1816
## Overview
1917

18+
[![npm](https://img.shields.io/npm/v/markdown-it-textual-uml)](https://www.npmjs.com/package/markdown-it-textual-uml)
19+
![NPM](https://img.shields.io/npm/l/markdown-it-textual-uml)
20+
![npm](https://img.shields.io/npm/dw/markdown-it-textual-uml)
21+
[![GitHub Super-Linter](https://github.com/manastalukdar/markdown-it-textual-uml/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
22+
23+
[More project metadata badges [here](./documentation/project/metadata.md). More CI/CD badges [here](./documentation/development/ci-cd.md#current-status).]
24+
2025
This is a `markdown-it` markdown parser plugin to create uml diagrams from text, based on plantuml, mermaid, etc.
2126

2227
At this point the following textual uml offerings are supported:
@@ -28,31 +33,6 @@ At this point the following textual uml offerings are supported:
2833
| [ditaa](http://ditaa.sourceforge.net/) | `ditaa` |
2934
| [mermaid](https://github.com/knsv/mermaid) | `mermaid` |
3035

31-
### Metadata
32-
33-
| Provider | Data | Status |
34-
| ---------------------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
35-
| [npm](https://www.npmjs.com/package/markdown-it-textual-uml) | Version | ![npm](https://img.shields.io/npm/v/markdown-it-textual-uml) |
36-
| npm | License | ![NPM](https://img.shields.io/npm/l/markdown-it-textual-uml) |
37-
| npm | Downloads | ![npm](https://img.shields.io/npm/dw/markdown-it-textual-uml) |
38-
| BundlePhobia | Bundle size | ![npm bundle size](https://img.shields.io/bundlephobia/min/markdown-it-textual-uml) |
39-
| GitHub | Version (package.json) | ![GitHub package.json version](https://img.shields.io/github/package-json/v/manastalukdar/markdown-it-textual-uml) |
40-
| GitHub | Repo Size | ![GitHub repo size](https://img.shields.io/github/repo-size/manastalukdar/markdown-it-textual-uml) |
41-
| GitHub | Code Size | ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/manastalukdar/markdown-it-textual-uml) |
42-
| GitHub | Commit Activity | ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/manastalukdar/markdown-it-textual-uml) |
43-
| GitHub | Last Commit | ![GitHub last commit (branch)](https://img.shields.io/github/last-commit/manastalukdar/markdown-it-textual-uml/master) |
44-
| GitHub | Open Issues | ![GitHub issues](https://img.shields.io/github/issues-raw/manastalukdar/markdown-it-textual-uml) |
45-
| GitHub | Closed Issues | ![GitHub issues](https://img.shields.io/github/issues-closed/manastalukdar/markdown-it-textual-uml) |
46-
| GitHub | Language Count | ![GitHub language count](https://img.shields.io/github/languages/count/manastalukdar/markdown-it-textual-uml) |
47-
| GitHub | License | ![GitHub](https://img.shields.io/github/license/manastalukdar/markdown-it-textual-uml) |
48-
| [david-dm](https://david-dm.org/manastalukdar/markdown-it-textual-uml) | Check node.js dependency status | ![David (path)](https://img.shields.io/david/manastalukdar/markdown-it-textual-uml) |
49-
| david-dm | Check node.js dev dependency status | ![David (path)](https://img.shields.io/david/manastalukdar/markdown-it-textual-uml?type=dev) |
50-
51-
### Continuous Integration
52-
53-
| Platform | Provider | Operations | Status |
54-
| -------- | -------- | ---------- | ------ |
55-
5636
## UML examples
5737

5838
### PlantUML
@@ -84,9 +64,9 @@ digraph example1 {
8464
|Document| |!magic!| | |
8565
| {d}| | | | |
8666
+---+----+ +-------+ +-------+
87-
: ^
88-
| Lots of work |
89-
+-------------------------+
67+
: ^
68+
| Lots of work |
69+
+-------------------------+
9070
```
9171
````
9272

@@ -170,15 +150,20 @@ I have an open issue to make development, testing and deployments easier but for
170150
3. `npm run build`
171151
4. `npm run pack`
172152
5. In a separate test project that includes this npm package:
173-
1. Change the entry in its package.json to: `"markdown-it-textual-uml": "file:./markdown-it-textual-uml-0.1.3.tgz"`. Change 0.1.3 to version from step 2.
153+
1. Change the entry in its package.json to: `"markdown-it-textual-uml": "file:./markdown-it-textual-uml-0.1.3.tgz"`. Change version (last released version) to version from step 2.
174154
2. Run `npm cache clean --force`.
175155
3. Delete its package-lock.json.
176156
4. Delete folder for `markdown-it-textual-uml` from within the node_modules folder.
177157
5. Run `npm install`.
178158
179159
Once we have the changes tested out, revert back all changes in the test project.
180160
181-
Now, in this project, run `npm publish`. Then tag the `develop` branch. Then merge develop to master. Then create a GitHub release at the tag.
161+
Now, in this project:
162+
163+
1. Run `npm publish`.
164+
2. Merge `develop` to `main`.
165+
3. Create a GitHub release with the semantically versioned tag against `main`.
166+
4. Pull repo to local.
182167
183168
## References
184169
@@ -190,4 +175,4 @@ Here are some alternative npm packages:
190175
191176
## License
192177
193-
[MIT](https://github.com/manastalukdar/markdown-it-textual-uml/blob/master/LICENSE)
178+
[MIT](https://github.com/manastalukdar/markdown-it-textual-uml/blob/main/LICENSE)

0 commit comments

Comments
 (0)