Skip to content

Commit

Permalink
GitHub Pages Site (#161)
Browse files Browse the repository at this point in the history
* move template into repo

* initial content population

* doc keys

* fix scroll issue and spacing

* update lock

* remove redundant intro section and hide news menu

* add Linux to development docs

* chore(github-pages): update alternatives.mdx

* chore(github-pages): update background.mdx

* update packages and format alternatives

---------

Co-authored-by: Peter Smulovics <[email protected]>
Co-authored-by: kruplm <[email protected]>
  • Loading branch information
3 people authored Nov 28, 2023
1 parent 1301cc1 commit e5d0b63
Show file tree
Hide file tree
Showing 66 changed files with 22,826 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: GH Page Deploy

on:
push:
branches:
- main

defaults:
run:
working-directory: ./site

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: './site/package-lock.json'
- run: npm ci
- run: npm run build
- name: Deploy
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: GH Page PR Build

on:
pull_request:
branches:
- main

defaults:
run:
working-directory: ./site

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: './site/package-lock.json'
- run: npm ci
- run: npm run build
69 changes: 69 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variable files
.env*

# gatsby files
.cache/
public

# Mac files
.DS_Store

# Yarn
yarn-error.log
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
4 changes: 4 additions & 0 deletions site/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.cache
package.json
package-lock.json
public
7 changes: 7 additions & 0 deletions site/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
12 changes: 12 additions & 0 deletions site/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint",
"mquandalle.graphql",
"ecmel.vscode-html-css"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
15 changes: 15 additions & 0 deletions site/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"diffEditor.codeLens": true,
"files.trimTrailingWhitespace": true,
"html.format.indentInnerHtml": true,
"html.format.wrapAttributes": "force-aligned",
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"],
"editor.formatOnSave": true,
"search.exclude": {
"**/node_modules": true
}
}
12 changes: 12 additions & 0 deletions site/content/alternatives.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
description: List of alternatives and how they differ from this project
title: Alternatives
---

**Electron Packager** - it only focuses on Electron based applications

**Electron Forge** - it only focuses on Electron based applications

**.NET Packager** - it only focuses on .NET based applications

**PyInstaller** - it only focuses on Python based applications
10 changes: 10 additions & 0 deletions site/content/background.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
description: Background and origin story of the project
title: Background
---

Crossroads is a tool to generate a single executable file to host any application and its content.
It is an important component of the Morgan Stanley Modern Desktop Development Platform called ComposeUI.
While .NET applications do have a native option to be self contained, this tool brings that feature to Node.js, Python, Java, etc applications as well.
This way applications can be distributable without requiring local installation or an app store.
Applications cam be packaged for both Windows and Linux by using just one tool.
11 changes: 11 additions & 0 deletions site/content/documentation-hero.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description: Contribute content hero
title: Hero
---

<Hero title="Documentation">
Open source is more than just code. There is planning before code is written,
the process on how to contribute or release that code, and fostering an
inclusive environment and community. Please review the guidelines below to
learn how to best contribute.
</Hero>
100 changes: 100 additions & 0 deletions site/content/documentation/development.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
order: 2
title: Development
---

### Build the solution

```powershell
dotnet build
```

### Test and test with coverage

```powershell
dotnet test
```

```powershell
dotnet test -maxcpucount:1 -p:CollectCoverage=true -p:CoverletOutput="..\TestResults\" -p:MergeWith="..\TestResults\coverage.json"
```

### Deploy

```powershell
dotnet build -c:release
dotnet publish .\src\Crossroads\Crossroads.csproj -c:release --no-build
```

### Crossroads on Linux

#### Installation

To install crossroads as a global dotnet tool on the linux environment:

```sh
dotnet tool install -g MorganStanley.Crossroads
```

To get the list of available commands:

```sh
crossroads --help
```

#### How to use

##### Package Python

```sh
crossroads package --name newnotepad --command "python3"
```

##### Package Python and add a script file from include

```sh
crossroads package --name newhello --command "python3" --args "script/crosspy.py" --location "./output" --include "../script"
```

##### Inspect a package

```sh
crossroads inspect --package "./newhello"
```

##### Show help

```sh
crossroads --help
```

##### Execute generated app

```sh
./<appname>
```

#### How to Develop

##### Build the solution

```sh
dotnet build
```

##### Test and test with coverage

```sh
dotnet test
```

```sh
dotnet test -maxcpucount:1 -p:CollectCoverage=true -p:CoverletOutput="../TestResults/" -p:MergeWith="../TestResults/coverage.json"
```

##### Deploy

```sh
dotnet build -c:release
dotnet publish ./src/Crossroads/Crossroads.csproj -c:release --no-build
```
46 changes: 46 additions & 0 deletions site/content/documentation/use.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
order: 1
title: Use
---

### Package Notepad

```powershell
crossroads package --name newnotepad --command "notepad"
```

### Package Notepad and open a text file from include

```powershell
crossroads package --name newhello --command notepad --args .\notepadtxt\abc.txt --location .\output --icon .\testicon.ico --version "2.2.2" --include ".\notepadtxt"
```

### Package an application from include directory

```powershell
crossroads package --name newhello --command ".\helloworld\helloworld.exe" --location .\output --icon .\testcion.ico --version "3.0.1" --include ".\helloworld"
```

### Inspect a package

```powershell
crossroads inspect --package ".\testapp.exe"
```

### Show help

```powershell
crossroads --help
```

### Execute generated app

```powershell
<appname>.exe
```

### Execute generated with override arguments

```powershell
<appname>.exe --args "new args"
```
16 changes: 16 additions & 0 deletions site/content/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
description: Quick start guide
title: Getting Started
---

To install crossroads as a global dotnet tool:

```powershell
dotnet tool install -g MorganStanley.Crossroads
```

To get the list of available commands:

```powershell
crossroads --help
```
20 changes: 20 additions & 0 deletions site/content/hero.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
description: Featured content hero
title: Hero
---

<Hero title="Crossroads">
Crossroads is a dotnet core commandline tool packager for developers. This is
a generic solution to host any application within Crossroads package
executable and further launches application's executable. Developers will
specify arguments such as name, icon, version etc for branding during the
package generation. The specified argument name will be used to rebrand the
internal application.

![Lifecycle Active](https://badgen.net/badge/Lifecycle/Active/green)
[![CI](https://github.com/morganstanley/Crossroads/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/morganstanley/Crossroads/actions/workflows/continuous-integration.yml)

<a variant="outlined" href="https://github.com/morganstanley/Crossroads">
Project Repo
</a>
</Hero>
Loading

0 comments on commit e5d0b63

Please sign in to comment.