Skip to content

Commit

Permalink
Merge pull request #32 from funktechno/dev
Browse files Browse the repository at this point in the history
v0.0.4
  • Loading branch information
lastlink authored Jul 5, 2024
2 parents 6c671c5 + 67dcc6c commit 8075d7f
Show file tree
Hide file tree
Showing 17 changed files with 203,927 additions and 197,899 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ jobs:
node-version: current
- run: npm ci
- run: npm test
- run: npm run build:client
- run: npm run build:client:nosql
- run: npm run build:client:nosql:min
- run: npm run build:client:all
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
* see https://github.com/ariel-bentu/tam-drawio for multiple install options
* download plugin file
* [sql.js](https://raw.githubusercontent.com/funktechno/sqltooling-drawio/main/dist/sql.js) - import/export SQL DLLS
* [nosql.js](https://raw.githubusercontent.com/funktechno/sqltooling-drawio/main/dist/nosql.js) - import/export typescript interfaces and openapi jsons (NOT vscode compatible)
* [nosql.js](https://raw.githubusercontent.com/funktechno/sqltooling-drawio/main/dist/nosql.js) - import/export openapi jsons
* or [nosql.min.js](https://raw.githubusercontent.com/funktechno/sqltooling-drawio/main/dist/nosql.min.js)
* you can then use the openapi.json spec to generate classes/interfaces in the language of your choosing
* [nosql-ts.js](https://raw.githubusercontent.com/funktechno/sqltooling-drawio/main/dist/nosql-ts.js) - import/export typescript interfaces and openapi jsons (NOT vscode compatible)
* or [nosql-ts.min.js](https://raw.githubusercontent.com/funktechno/sqltooling-drawio/main/dist/nosql-ts.min.js)
* or clone project `git clone --branch main [email protected]:funktechno/sqltooling-drawio.git` and check `dist folder`
* vscode [Draw.io Integration](https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio)
* settings.json
Expand All @@ -16,6 +19,9 @@
{
"file": "xxx\\sqltooling-drawio\\dist\\sql.js"
},
{
"file": "xxx\\sqltooling-drawio\\dist\\nosql.js"
},
```

## Examples
Expand Down
201,688 changes: 201,688 additions & 0 deletions dist/nosql-ts.js

Large diffs are not rendered by default.

449 changes: 449 additions & 0 deletions dist/nosql-ts.min.js

Large diffs are not rendered by default.

197,106 changes: 423 additions & 196,683 deletions dist/nosql.js

Large diffs are not rendered by default.

384 changes: 3 additions & 381 deletions dist/nosql.min.js

Large diffs are not rendered by default.

529 changes: 281 additions & 248 deletions dist/sql.js

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import gutil from "gulp-util";
import uglify from "gulp-uglify";
import rename from "gulp-rename";

gulp.task("default", () => {
gulp.task("nosql-min", () => {
return browserify({
basedir: ".",
debug: true,
Expand All @@ -32,3 +32,27 @@ gulp.task("default", () => {
// .pipe(sourcemaps.write("./", {}))
.pipe(gulp.dest("dist")); // Output directory
});

gulp.task("nosql-ts-min", () => {
return browserify({
basedir: ".",
debug: true,
entries: ["src/nosql-ts.ts"], // Your entry point(s)
cache: {},
packageCache: {}
})
.plugin("tsify", { target: "es2016"}) // TypeScript plugin
.transform(babelify.configure({
presets: ["es2015"]
}))
// .transform(babelify, { presets: ["@babel/preset-env"], extensions: [".ts"] }) // Babelify with ES6+ presets
.bundle()
.pipe(source("nosql-ts.js")) // Output filename
.pipe(buffer())
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(uglify()) // Minify (optional)
.pipe(rename({ suffix: ".min" })) // Add ".min" to the filename
.on("error", gutil.log)
// .pipe(sourcemaps.write("./", {}))
.pipe(gulp.dest("dist")); // Output directory
});
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sqltooling-drawio",
"version": "0.0.3",
"version": "0.0.4",
"description": "plugins for sql tooling in drawio",
"main": "index.js",
"engines": {
Expand All @@ -17,10 +17,13 @@
"build": "tsc && npm run build:types",
"build:types": "tsc -p tsconfig.json",
"build:help": "tsc --help",
"build:client": "npm run mkdir:dist && browserify src/sql.ts -p [ tsify --noImplicitAny ] > dist/sql.js && npm run updateVersion:dist",
"build:client:nosql": "npm run mkdir:dist && browserify src/nosql.ts -p [ tsify --noImplicitAny ] > dist/nosql.js && npm run updateVersion:dist",
"build:client:sql": "browserify src/sql.ts -p [ tsify --noImplicitAny ] > dist/sql.js",
"build:client:nosql": "browserify src/nosql.ts -p [ tsify --noImplicitAny ] > dist/nosql.js",
"build:client:nosql:manual": "browserify src/nosql.ts -p [ tsify --noImplicitAny ] > \"absolutePath\\drawio-desktop\\drawio\\src\\main\\webapp\\plugins\\sql.js\"",
"build:client:nosql:min": "npm run mkdir:dist && gulp && npm run updateVersion:dist",
"build:client:nosql:min": "gulp nosql-min",
"build:client:nosql-ts": "browserify src/nosql-ts.ts -p [ tsify --noImplicitAny ] > dist/nosql-ts.js",
"build:client:nosql-ts:min": "gulp nosql-ts-min",
"build:client:all": "npm run mkdir:dist && npm run build:client:sql && npm run build:client:nosql && npm run build:client:nosql:min && npm run build:client:nosql-ts && npm run build:client:nosql-ts:min && npm run updateVersion:dist",
"mkdir:dist": "node ./build/createDistFolder.js",
"updateVersion:dist": "node ./build/updateVersion.js"
},
Expand Down
Loading

0 comments on commit 8075d7f

Please sign in to comment.