ysp-yao / electron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hello world - a basic electron project

hello world

hello-world/
├── web/                // 
    ├──css
    ├──js
    └──index.html
└── main.js             //

Steps

  1. npm init,generate file package.json

  2. add to package.json

  "devDependencies": {
    "electron": "^1.8.4",
  }

npm install --save-dev babel-cli babel-preset-es2015 npm install --save-dev rimraf

  1. 创建.babelrc
{
  "presets": ["es2015"]
}
  1. package.json
  "scripts": {
    "build": "rimraf ./dist && babel ./web/js --out-dir ./dist/js",
    "start": "npm run build && electron ."
  },

  1. npm start

About


Languages

Language:JavaScript 99.5%Language:HTML 0.3%Language:CSS 0.2%