-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* composeui-cli * fix csproj file * Renaming package and command
- Loading branch information
Showing
6 changed files
with
140 additions
and
73 deletions.
There are no files selected for viewing
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
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,48 @@ | ||
<!-- Morgan Stanley makes this available to you under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> | ||
|
||
# @morgan-stanley/composeui-node-launcher | ||
|
||
## Library | ||
|
||
The library enables you to dynmically set properties for your window in your javascript code. | ||
|
||
``` | ||
function windowOpenExample() { | ||
const window = new BrowserWindow( | ||
{ | ||
url: "https://github.com/morganstanley/composeui", | ||
title: "My Web App", | ||
width: 1600, | ||
height: 800 | ||
}); | ||
window.open(); | ||
} | ||
windowOpenExample(); | ||
``` | ||
|
||
Or with loadUrl | ||
|
||
``` | ||
function loadUrlExample() { | ||
const window = new BrowserWindow( | ||
{ | ||
width: 1600, | ||
height: 800 | ||
}); | ||
window.loadUrl("https://github.com/morganstanley/composeui"); | ||
} | ||
loadUrlExample(); | ||
``` | ||
|
||
## CLI | ||
|
||
The CLI enables you to execute your app with compose by executing the following command: | ||
|
||
``` | ||
composeui myapp.js | ||
``` |
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,14 @@ | ||
#!/usr/bin/env node | ||
|
||
import { execFile } from 'child_process'; | ||
import { resolve } from 'path'; | ||
|
||
let filename = process.argv.slice(2)[0]; | ||
let filePath= resolve(filename); | ||
|
||
const child = execFile("node", [filePath], (error, stdout, stderr) => { | ||
console.log(stdout); | ||
if (error) { | ||
throw error; | ||
} | ||
}); |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.