Browse Source

Fix examples, templates (#2359)

- move screenshot into screenshots folder
- add Readme, run configuration, .gitignore to web-template
- fix web-compose-in-js (read versions from properties)
- add global idea/ into gitignore
pull/2361/head
Igor Demin 2 years ago committed by GitHub
parent
commit
7bd0b3d1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .gitignore
  2. 2
      examples/codeviewer/README.md
  3. 0
      examples/codeviewer/screenshots/desktop-run-configuration.png
  4. 2
      examples/falling-balls/README.md
  5. 0
      examples/falling-balls/screenshots/desktop-run-configuration.png
  6. 2
      examples/imageviewer/README.md
  7. 0
      examples/imageviewer/screenshots/desktop-run-configuration.png
  8. 2
      examples/intellij-plugin-with-experimental-shared-base/README.md
  9. 0
      examples/intellij-plugin-with-experimental-shared-base/screenshots/ide-run-configuration.png
  10. 2
      examples/intellij-plugin/README.md
  11. 0
      examples/intellij-plugin/screenshots/ide-run-configuration.png
  12. 2
      examples/issues/README.md
  13. 0
      examples/issues/screenshots/desktop-run-configuration.png
  14. 2
      examples/notepad/README.md
  15. 0
      examples/notepad/screenshots/desktop-run-configuration.png
  16. 2
      examples/todoapp-lite/README.md
  17. 0
      examples/todoapp-lite/screenshots/desktop-run-configuration.png
  18. 4
      examples/todoapp/README.md
  19. 0
      examples/todoapp/screenshots/browser-run-configuration.png
  20. 0
      examples/todoapp/screenshots/desktop-run-configuration.png
  21. 2
      examples/visual-effects/README.md
  22. 0
      examples/visual-effects/screenshots/desktop-run-configuration.png
  23. 4
      examples/web-compose-bird/README.md
  24. BIN
      examples/web-compose-bird/cover.jpeg
  25. 0
      examples/web-compose-bird/screenshots/browser-run-configuration.png
  26. 0
      examples/web-compose-bird/screenshots/demo.gif
  27. 2
      examples/web-compose-in-js/README.MD
  28. 4
      examples/web-compose-in-js/build.gradle.kts
  29. 2
      examples/web-compose-in-js/gradle.properties
  30. 0
      examples/web-compose-in-js/screenshots/browser-run-configuration.png
  31. 6
      examples/web-compose-in-js/settings.gradle.kts
  32. 2
      examples/web-landing/README.md
  33. 0
      examples/web-landing/screenshots/browser-run-configuration.png
  34. 2
      examples/web-with-react/README.md
  35. 0
      examples/web-with-react/screenshots/browser-run-configuration.png
  36. 2
      examples/widgets-gallery/README.md
  37. 0
      examples/widgets-gallery/screenshots/desktop-run-configuration.png
  38. 15
      templates/web-template/.gitignore
  39. 23
      templates/web-template/.run/browser.run.xml
  40. 4
      templates/web-template/README.md

8
.gitignore vendored

@ -4,13 +4,7 @@ out
*.iml
.gradle
/local.properties
/.idea
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.idea/
.DS_Store
build/
/captures

2
examples/codeviewer/README.md

@ -4,7 +4,7 @@ MPP Code Viewer example for desktop/android written in Multiplatform Compose lib
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)
### Building native desktop distribution
```

0
examples/codeviewer/desktop-run-configuration.png → examples/codeviewer/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

2
examples/falling-balls/README.md

@ -3,5 +3,5 @@ Falling Balls game
### Running desktop application
* To run, launch command: `./gradlew run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)

0
examples/falling-balls/desktop-run-configuration.png → examples/falling-balls/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

2
examples/imageviewer/README.md

@ -3,7 +3,7 @@ An example of image gallery for remote server image viewing, based on Jetpack Co
### Running desktop application
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)
### Building native desktop distribution
```

0
examples/imageviewer/desktop-run-configuration.png → examples/imageviewer/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

2
examples/intellij-plugin-with-experimental-shared-base/README.md

@ -12,7 +12,7 @@ and allows sharing Compose runtime between multiple plugins
1. Start test IDE:
* Run the following command in terminal: `./gradlew runIde`
* Or choose **runIde** configuration in IDE and run it.
![ide-run-configuration.png](ide-run-configuration.png)
![ide-run-configuration.png](screenshots/ide-run-configuration.png)
2. Create a new project or open any existing;
3. Select `Show Compose Demo...` from the `Tools` menu.

0
examples/intellij-plugin-with-experimental-shared-base/ide-run-configuration.png → examples/intellij-plugin-with-experimental-shared-base/screenshots/ide-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

2
examples/intellij-plugin/README.md

@ -5,7 +5,7 @@ To run the example:
1. from directory `compose-jb/examples/intellij-plugin`:
* Run command in terminal `./gradlew runIde`.
* Or choose **runIde** configuration in IDE and run it.
![ide-run-configuration.png](ide-run-configuration.png)
![ide-run-configuration.png](screenshots/ide-run-configuration.png)
2. create project or open any existing
3. from menu `Tools` select `Show Compose Demo...`

0
examples/intellij-plugin/ide-run-configuration.png → examples/intellij-plugin/screenshots/ide-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

2
examples/issues/README.md

@ -4,7 +4,7 @@ Github Issues viewer example written in Jetpack Compose UI library.
### Running desktop application
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)
### Building native desktop distribution
```

0
examples/issues/desktop-run-configuration.png → examples/issues/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

2
examples/notepad/README.md

@ -3,7 +3,7 @@ Notepad example for desktop written in Compose for Desktop library, using Compos
### Running desktop application
* To run, launch command: `./gradlew run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)
### Building native desktop distribution
```

0
examples/notepad/desktop-run-configuration.png → examples/notepad/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

2
examples/todoapp-lite/README.md

@ -5,7 +5,7 @@ Supported targets: Android and Desktop.
### Running desktop application
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)
### Building native desktop distribution
```

0
examples/todoapp-lite/desktop-run-configuration.png → examples/todoapp-lite/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

4
examples/todoapp/README.md

@ -36,7 +36,7 @@ Features:
### Running desktop application
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)
#### Building native desktop distribution
```
@ -51,7 +51,7 @@ Open project in Intellij IDEA or Android Studio and run "android" configuration.
### Running Web browser application
* To run, launch command: `./gradlew :web:jsBrowserDevelopmentRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)
![browser-run-configuration.png](screenshots/browser-run-configuration.png)
### Running iOS application

0
examples/todoapp/browser-run-configuration.png → examples/todoapp/screenshots/browser-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

0
examples/todoapp/desktop-run-configuration.png → examples/todoapp/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

2
examples/visual-effects/README.md

@ -3,5 +3,5 @@ Several visual effects implmented with Compose Multiplatform, used in 1.0 releas
### Running desktop application
* To run, launch command: `./gradlew run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)

0
examples/visual-effects/desktop-run-configuration.png → examples/visual-effects/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

4
examples/web-compose-bird/README.md

@ -1,6 +1,6 @@
# 🐦 Compose Bird
![](demo.gif)
![](screenshots/demo.gif)
![latestVersion](https://img.shields.io/github/v/release/theapache64/compose-bird)
<a href="https://twitter.com/theapache64" target="_blank">
@ -18,7 +18,7 @@
* To run, launch command: `./gradlew jsBrowserRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)
![browser-run-configuration.png](screenshots/browser-run-configuration.png)
## 📦 Distribute

BIN
examples/web-compose-bird/cover.jpeg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

0
examples/web-compose-bird/browser-run-configuration.png → examples/web-compose-bird/screenshots/browser-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

0
examples/web-compose-bird/demo.gif → examples/web-compose-bird/screenshots/demo.gif

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

2
examples/web-compose-in-js/README.MD

@ -70,7 +70,7 @@ config.output.library = "MyComposables";
### Running Web browser application
* To run, launch command: `./gradlew :jsBrowserDevelopmentRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)
![browser-run-configuration.png](screenshots/browser-run-configuration.png)
### Building and using the output

4
examples/web-compose-in-js/build.gradle.kts

@ -1,8 +1,8 @@
import org.jetbrains.compose.compose
plugins {
kotlin("multiplatform") version "1.6.10"
id("org.jetbrains.compose") version "1.0.1"
kotlin("multiplatform")
id("org.jetbrains.compose")
}
group = "me.user"

2
examples/web-compose-in-js/gradle.properties

@ -2,3 +2,5 @@ kotlin.code.style=official
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false
kotlin.js.webpack.major.version=4
kotlin.version=1.7.10
compose.version=1.2.0-beta02

0
examples/web-compose-in-js/browser-run-configuration.png → examples/web-compose-in-js/screenshots/browser-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

6
examples/web-compose-in-js/settings.gradle.kts

@ -3,7 +3,11 @@ pluginManagement {
gradlePluginPortal()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
plugins {
kotlin("multiplatform").version(extra["kotlin.version"] as String)
id("org.jetbrains.compose").version(extra["compose.version"] as String)
}
}
rootProject.name = "web-compose-in-js"

2
examples/web-landing/README.md

@ -3,4 +3,4 @@ Landing page of Compose for Web
### Running Web browser application
* To run, launch command: `./gradlew :jsBrowserRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)
![browser-run-configuration.png](screenshots/browser-run-configuration.png)

0
examples/web-landing/browser-run-configuration.png → examples/web-landing/screenshots/browser-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

2
examples/web-with-react/README.md

@ -21,4 +21,4 @@ Here is a good tutorial - [Using packages from NPM](https://play.kotlinlang.org/
### Running web application
* To run, launch command: `./gradlew :jsBrowserRun`
* Or choose **browser** configuration in IDE and run it.
![browser-run-configuration.png](browser-run-configuration.png)
![browser-run-configuration.png](screenshots/browser-run-configuration.png)

0
examples/web-with-react/browser-run-configuration.png → examples/web-with-react/screenshots/browser-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

2
examples/widgets-gallery/README.md

@ -11,7 +11,7 @@ demonstrating how to use various Material widgets.
### Running desktop application
* To run, launch command: `./gradlew :desktop:run`
* Or choose **desktop** configuration in IDE and run it.
![desktop-run-configuration.png](desktop-run-configuration.png)
![desktop-run-configuration.png](screenshots/desktop-run-configuration.png)
### Building native desktop distribution
```

0
examples/widgets-gallery/desktop-run-configuration.png → examples/widgets-gallery/screenshots/desktop-run-configuration.png

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

15
templates/web-template/.gitignore vendored

@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
build/
/captures
.externalNativeBuild
.cxx

23
templates/web-template/.run/browser.run.xml

@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="browser" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":jsBrowserRun" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

4
templates/web-template/README.md

@ -0,0 +1,4 @@
Compose Web Application
- `./gradlew jsBrowserRun` - run application in a browser
- `./gradlew jsBrowserProductionWebpack` - produce the output in `build/distributions`
Loading…
Cancel
Save