-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from modelix/feature/samples-with-model-client
Feature/samples with model client
- Loading branch information
Showing
80 changed files
with
24,173 additions
and
72 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
services: | ||
model-server: | ||
# Keep the version in sync with the modelix version in gradle/libs.versions.toml | ||
image: modelix/modelix-model:3.11.0 | ||
ports: | ||
- 28101:28101 | ||
volumes: | ||
- ./model-server/courses.modelserver.dump:/courses.modelserver.dump | ||
command: ["./run-model-server.sh", "-inmemory", "-dumpin", "/courses.modelserver.dump"] | ||
spa-overview-angular: | ||
image: nginx | ||
ports: | ||
- 4200:80 | ||
volumes: | ||
- ./spa-overview-angular/dist/spa-overview-angular:/usr/share/nginx/html | ||
spa-management-vue: | ||
image: nginx | ||
ports: | ||
- 3000:80 | ||
volumes: | ||
- ./spa-management-vue/dist:/usr/share/nginx/html |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
@modelix:registry=https://artifacts.itemis.cloud/repository/npm-open |
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,24 +1,28 @@ | ||
// INFO: This sub-project is not yet used. It is included to show the generated TS files from the model-api-gen. | ||
// | ||
// | ||
import com.github.gradle.node.npm.task.NpmTask | ||
|
||
plugins { | ||
application | ||
alias(libs.plugins.kotlin.jvm) | ||
base | ||
alias(libs.plugins.node.gradle) | ||
} | ||
|
||
dependencies { | ||
} | ||
|
||
node { | ||
download.set(true) | ||
version.set(libs.versions.node) | ||
} | ||
|
||
//val npmRun by tasks.creating(com.github.gradle.node.npm.task.NpmTask::class) { | ||
// dependsOn(tasks.getByName("build")) | ||
// args.addAll("run-script", "ng", "serve") | ||
//} | ||
tasks.named("npm_run_build") { | ||
dependsOn(":mps:generateMetaModelSources") | ||
} | ||
|
||
//tasks.getByName("build").dependsOn("npmInstall") | ||
tasks.named<NpmTask>("npm_pack") { | ||
val packageDirectory = project.layout.buildDirectory.dir("packages").get().asFile | ||
dependsOn("npm_run_build") | ||
doFirst { | ||
packageDirectory.mkdirs() | ||
} | ||
args.addAll("--pack-destination", packageDirectory.path) | ||
} | ||
|
||
tasks.assemble { | ||
dependsOn("npm_pack") | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "metamodel-api-ts", | ||
"version": "1.0.0", | ||
"description": "TypeScript code generated from the meta model", | ||
"main": "build/dist/index.js", | ||
"types": "build/dist/index.d.ts", | ||
"files": [ | ||
"build/dist" | ||
], | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": { | ||
"@tsconfig/recommended": "^1.0.2", | ||
"typescript": "^5.1.6" | ||
}, | ||
"dependencies": { | ||
}, | ||
"peerDependencies": { | ||
"@modelix/ts-model-api": "3.11.0" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"extends": "@tsconfig/recommended/tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./build/dist", | ||
"declaration": true, | ||
"module": "esnext", | ||
"moduleResolution": "bundler" | ||
}, | ||
"include": [ | ||
"src/**/*" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
> 1% | ||
last 2 versions | ||
not dead | ||
not ie 11 |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
extends: [ | ||
'plugin:vue/vue3-essential', | ||
'eslint:recommended', | ||
'@vue/eslint-config-typescript', | ||
], | ||
rules: { | ||
'vue/multi-word-component-names': 'off', | ||
"vue/valid-v-slot": ["error", { | ||
"allowModifiers": false | ||
}] | ||
}, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
@modelix:registry=https://artifacts.itemis.cloud/repository/npm-open |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Compiles and hot-reloads for development | ||
|
||
```sh | ||
../gradlew :spa-management-vue:npm_run_dev | ||
``` | ||
|
||
# Compiles and minifies for production | ||
|
||
```sh | ||
../gradlew :spa-management-vue:build | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import com.github.gradle.node.npm.task.NpmTask | ||
|
||
plugins { | ||
base | ||
alias(libs.plugins.node.gradle) | ||
} | ||
|
||
node { | ||
download.set(true) | ||
version.set(libs.versions.node) | ||
} | ||
|
||
val metamodelApiTsProject = project(":mps:metamodel-api-ts") | ||
val metamodelApiTsPackagePath: String = metamodelApiTsProject.layout.buildDirectory | ||
.file("packages/metamodel-api-ts-1.0.0.tgz").get().asFile.path | ||
|
||
val updateMetaModelApiTs = tasks.register<NpmTask>("updateMetaModelApiTs") { | ||
dependsOn(metamodelApiTsProject.tasks.assemble) | ||
args.set(listOf("install", metamodelApiTsPackagePath)) | ||
} | ||
|
||
tasks.npmInstall { | ||
dependsOn(updateMetaModelApiTs) | ||
} | ||
|
||
tasks.assemble { | ||
dependsOn("npm_run_build") | ||
} | ||
|
||
tasks.check { | ||
dependsOn("npm_run_lint") | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Course Management</title> | ||
</head> | ||
|
||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.