Giter Site home page Giter Site logo

electron-react-dva-boilerplate's Introduction

electron-react-dva-boilerplate Build Status Build status

This project was bootstrapped with Create React App.

DvaJS React and redux based, lightweight and elm-style framework.

Install

git clone --depth 1 --single-branch --branch master https://github.com/ctocto/electron-react-dva-boilerplate.git your-project-name

And then install the dependencies with npm

$ cd your-project-name
$ npm i
$ npm i -g foreman // http://strongloop.github.io/node-foreman/

Starting Development

$ npm start

Packaging for Production

To package apps for the local platform:

$ npm run dist

QA

Unable to resolve path to module '@pages/Home/Home' import/no-unresolved

https://www.npmjs.com/package/eslint-import-resolver-alias

How do I change src folder to something else in create-react-app

const path = require('path')
const {
  override,
} = require('customize-cra')

module.exports = {
  paths(paths, env) {
    paths.appIndexJs = path.resolve(__dirname, 'app/index.js')
    paths.appSrc = path.resolve(__dirname, 'app')
    return paths
  },
}

'@pages/Demo' should be listed in the project's dependencies. Run 'npm i -S @pages/Demo' to add it import/no-extraneous-dependencies

have no alternative

"import/no-extraneous-dependencies": [0]

Treating warnings as errors because process.env.CI = true.

Creating an optimized production build...
Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.
Failed to compile.

https://stackoverflow.com/questions/52888214/how-to-set-environment-variable-in-react-js

"build": "set \"CI=false\" && react-app-rewired build",

or

.travis.yml

env:
  global:
    - CI=false

.appveyor.yml

install:
  - ps: Install-Product node 12 x64
  - set CI=false
  - npm install

electron-builder --publish onTagOrDraft

appveyor CI,travis CI No settings required conditional-releases

TypeError: fs.existsSync is not a function

  3 | 
  4 | var pathFile = path.join(__dirname, 'path.txt')
  5 | 
> 6 | if (fs.existsSync(pathFile)) {
  7 |   module.exports = path.join(__dirname, fs.readFileSync(pathFile, 'utf-8'))
  8 | } else {
  9 |   throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')

electron/electron#9920 (comment)

Sync code changes in electron app while developing

npm i -D nodemon

// scripts
"electron": "nodemon --watch src --exec 'electron .'",

https://stackoverflow.com/questions/39250387/sync-code-changes-in-electron-app-while-developing

TODO

  • electron 6.0 macOS Unexpected exit
    • ✅ update electron-builder@^21.2.0
  • build main code
    • "build-main": "cross-env NODE_ENV=production webpack --config ./configs/webpack.config.main.prod.js --colors"
  • webpack externals import/no-unresolved

electron-react-dva-boilerplate's People

Contributors

ctocto avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.