Create a standalone desktop app with puppeteer example.
- Run
npm i - Run
node app
For run this example without installation, run in console:
npx https://gist.github.com/ilio/6f4239b60b84a918ab500e2e0528c094
| const Day = ({value, className})=> ( | |
| <div className={"day"+(className? ' ' + className: '')}> | |
| <div className="selected" /> | |
| <div className="secondary" /> | |
| <div className="value">{value}</div> | |
| </div> | |
| ); | |
| class Calendar extends React.Component { | |
| state = { |
| #!/usr/bin/env node | |
| console.log('v6', process.argv, process.cwd(), __dirname); | |
| const {exec} = require('child_process'); | |
| const path = require('path'); | |
| exec('npm bin', {cwd: __dirname}, (err, stdout, stderr) => { | |
| if (err) { | |
| console.error(err); | |
| } else { |
Create a standalone desktop app with puppeteer example.
npm inode appFor run this example without installation, run in console:
npx https://gist.github.com/ilio/6f4239b60b84a918ab500e2e0528c094
| { | |
| "scripts": { | |
| "build": "babel src/ -d bin", | |
| "build watch": "babel src/ -d bin --watch" | |
| }, | |
| "devDependencies": { | |
| "@babel/preset-env": "^7.2.0", | |
| "@babel/cli": "^7.2.0", | |
| "@babel/core": "^7.2.0" | |
| }, |
| FROM debian | |
| RUN apt update && apt install -y tzdata; \ | |
| apt clean; | |
| # sshd | |
| RUN mkdir /var/run/sshd; \ | |
| apt install -y openssh-server; \ | |
| sed -i 's/^#\(PermitRootLogin\) .*/\1 yes/' /etc/ssh/sshd_config; \ | |
| sed -i 's/^\(UsePAM yes\)/# \1/' /etc/ssh/sshd_config; \ | |
| apt clean; |