Skip to content

Commit

Permalink
feat(spa-collaboration-vue): setup Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
odzhychko committed Oct 11, 2023
1 parent cc5a6fb commit 71565f3
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 65 deletions.
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ include("rest-api-model-server")
//
// a single page application which can use any of the APIs
include("spa-dashboard-angular")
// a single page application which can write on the model through a model client
include("spa-collaboration-vue")
1 change: 1 addition & 0 deletions spa-collaboration-vue/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@modelix:registry=https://artifacts.itemis.cloud/repository/npm-open
72 changes: 7 additions & 65 deletions spa-collaboration-vue/README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,11 @@
# base
# Compiles and hot-reloads for development

## Project setup

```
# yarn
yarn
# npm
npm install
# pnpm
pnpm install
# bun
bun install
```

### Compiles and hot-reloads for development

```
# yarn
yarn dev
# npm
npm run dev
# pnpm
pnpm dev
# bun
pnpm run dev
```

### Compiles and minifies for production

```
# yarn
yarn build
# npm
npm run build
# pnpm
pnpm build
# bun
pnpm run build
```

### Lints and fixes files

```
# yarn
yarn lint
# npm
npm run lint
# pnpm
pnpm lint
# bun
pnpm run lint
```sh
../gradlew :spa-collaboration-vue:npm_run_dev
```

### Customize configuration
# Compiles and minifies for production

See [Configuration Reference](https://vitejs.dev/config/).
```sh
../gradlew :spa-collaboration-vue:build
```
5 changes: 5 additions & 0 deletions spa-collaboration-vue/TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# TODO Olekz

* /Users/odzhychko/Documents/arbeit1/modelix/modelix.samples/mps/metamodel-api-ts/package.json
* Set not snapshot version as dependencie for ts-model-api
* Set ts-model-api as peerDependencie
32 changes: 32 additions & 0 deletions spa-collaboration-vue/build.gradle.kts
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")
}
20 changes: 20 additions & 0 deletions spa-collaboration-vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions spa-collaboration-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"dependencies": {
"@mdi/font": "7.0.96",
"core-js": "^3.29.0",
"metamodel-api-ts": "file:../mps/metamodel-api-ts/build/packages/metamodel-api-ts-1.0.0.tgz",
"roboto-fontface": "*",
"vue": "^3.2.0",
"vue-router": "^4.0.0",
Expand Down

0 comments on commit 71565f3

Please sign in to comment.