-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add types declaration file (resolve #30) * Amend types file (add Class, Relationship, others inside namespace) * Example Note typescript class * typescript setup * build types.js in gulp pipeline * .gitignore * package.json * use types.js in PEG * make typescript and gulp-typescript dev dependencies * ts-pegjs * refactr to use more ts * relative imports * npm i --save-dev @types/node * gitignore * format fix * don't cover src * use dist folder * remove generated typescript files * ignore generated typescript files * more types and ~ accessor * Member variable type * finixh Members * improved watch rules * add interface type * not text is not optional * remove original interface class * add Class type * add Component type * Add UseCase type * Add Relationship type * porting more to ts * eslint --fix * coverage report for typescript * prep for publishing * prepublish -> prepublishOnly * re-export types * remove newline * readme++ * social media button * Update README.md * Update README.md * Update README.md * spelling * update example * prep for 0.0.10 Co-authored-by: George Pickering <29524044+geopic@users.noreply.github.com>
- Loading branch information
Showing
50 changed files
with
3,531 additions
and
16,905 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
src/plantuml.js | ||
src/plantuml-trace.js | ||
src/plantuml.ts | ||
src/plantuml-trace.ts | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,47 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'commonjs': true, | ||
'es6': true | ||
"env": { "browser": true, "es6": true, "node": true }, | ||
"extends": ["eslint:recommended"], | ||
"globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, | ||
"parserOptions": { | ||
"ecmaFeatures": { "jsx": true }, | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
'extends': 'standard', | ||
'globals': { | ||
'Atomics': 'readonly', | ||
'SharedArrayBuffer': 'readonly' | ||
"plugins": [], | ||
"rules": { | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single"], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"semi": ["error", "always"] | ||
}, | ||
'parserOptions': { | ||
'ecmaVersion': 2018 | ||
}, | ||
'rules': { | ||
'semi': ['error', 'always'], | ||
'quotes': ['error', 'single'] | ||
} | ||
"settings": {}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.ts", "**/*.tsx"], | ||
"env": { "browser": true, "es6": true, "node": true }, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { "jsx": true }, | ||
"ecmaVersion": 2018, | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single"], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"@typescript-eslint/no-explicit-any": 0 | ||
}, | ||
"settings": {}, | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,79 @@ | ||
const conf = require('../conf'); | ||
|
||
const { task, parallel, src, dest } = require('gulp'); | ||
const { task, series, parallel, src, dest } = require('gulp'); | ||
const { join } = require('path'); | ||
|
||
|
||
const rename = require('gulp-rename'); | ||
const pegjs = require('gulp-pegjs'); | ||
const ts = require('gulp-typescript'); | ||
const sourcemaps = require('gulp-sourcemaps'); | ||
const tsProject = ts.createProject('tsconfig.json'); | ||
|
||
task('build-copy-js', | ||
() => src(join(conf.src.dir, '**', '*.js')) | ||
.pipe( | ||
dest(conf.dist.dir), | ||
), | ||
); | ||
|
||
task('build-optimized', | ||
(cb) => src(join(conf.src.dir, '*.pegjs')) | ||
.pipe( | ||
pegjs({ | ||
format: 'commonjs' | ||
}).on('error', cb) | ||
...conf.build.options, | ||
}).on('error', cb), | ||
) | ||
.pipe( | ||
dest(conf.src.dir) | ||
rename('plantuml.ts'), | ||
) | ||
.pipe( | ||
dest(conf.src.dir), | ||
), | ||
); | ||
|
||
task('build-debug', | ||
(cb) => src(join(conf.src.dir, '*.pegjs')) | ||
.pipe( | ||
pegjs({ | ||
format: 'commonjs', | ||
trace: true | ||
}).on('error', cb) | ||
trace: true, | ||
...conf.build.options, | ||
}).on('error', cb), | ||
) | ||
.pipe( | ||
rename('plantuml-trace.js') | ||
rename('plantuml-trace.ts'), | ||
) | ||
.pipe( | ||
dest(conf.src.dir) | ||
dest(conf.src.dir), | ||
), | ||
); | ||
|
||
task('build-typescript', | ||
() => tsProject.src() | ||
.pipe(sourcemaps.init()) | ||
.pipe(tsProject()) | ||
.pipe( | ||
sourcemaps.write( | ||
'.', | ||
{ | ||
includeContent: false, | ||
sourceRoot: '../src', | ||
}, | ||
), | ||
) | ||
.pipe( | ||
dest(conf.dist.dir), | ||
), | ||
); | ||
|
||
task('build', parallel( | ||
'build-optimized', | ||
'build-debug' | ||
)); | ||
task( | ||
'build', | ||
series( | ||
'build-copy-js', | ||
parallel( | ||
'build-optimized', | ||
'build-debug', | ||
), | ||
'build-typescript', | ||
), | ||
); |
Oops, something went wrong.