Typescript/React/Electron codebase for Bonsai Arborist v2
2
stars
89
commits
TypeScript
primary language
Dec 28, 2018
updated
First, clone the repo via git, and then install dependencies.
npm install
Run these two commands simultaneously in different console tabs.
$ npm run hot-server
$ npm run start-hot
or run two servers with one command
$ npm run dev
See electron-debug for more information.
This boilerplate out of the box is configured to use css-modules.
All .css file extensions will use css-modules unless it has .global.css.
If you need global styles, stylesheets with .global.css will not go through the
css-modules loader. e.g. app.global.css
If you want to import global css libraries (like bootstrap), you can just write the following code in .global.css:
@import "~bootstrap/dist/css/bootstrap.css";
To package apps for the local platform:
$ npm run package
To package apps for all platforms:
First, refer to Multi Platform Build for dependencies.
Then,
$ npm run package-all
To package apps with options:
$ npm run package -- --[option]
To run the application without packaging run
$ npm run build
$ npm start
To run End-to-End Test
$ npm run build
$ npm run test-e2e
See electron-builder CLI Usage
This repo uses a two package.json structure.
dependencies in ./app/package.json.imported by another module, include it in dependencies in ./package.json. See this ESLint rule.devDependencies in ./package.json.89 commits
TypeScript
75.7%
JavaScript
20.5%
CSS
2.9%
Typescript/React/Electron codebase for Bonsai Arborist v2
2
stars
89
commits
TypeScript
primary language
Dec 28, 2018
updated
First, clone the repo via git, and then install dependencies.
npm install
Run these two commands simultaneously in different console tabs.
$ npm run hot-server
$ npm run start-hot
or run two servers with one command
$ npm run dev
See electron-debug for more information.
This boilerplate out of the box is configured to use css-modules.
All .css file extensions will use css-modules unless it has .global.css.
If you need global styles, stylesheets with .global.css will not go through the
css-modules loader. e.g. app.global.css
If you want to import global css libraries (like bootstrap), you can just write the following code in .global.css:
@import "~bootstrap/dist/css/bootstrap.css";
To package apps for the local platform:
$ npm run package
To package apps for all platforms:
First, refer to Multi Platform Build for dependencies.
Then,
$ npm run package-all
To package apps with options:
$ npm run package -- --[option]
To run the application without packaging run
$ npm run build
$ npm start
To run End-to-End Test
$ npm run build
$ npm run test-e2e
See electron-builder CLI Usage
This repo uses a two package.json structure.
dependencies in ./app/package.json.imported by another module, include it in dependencies in ./package.json. See this ESLint rule.devDependencies in ./package.json.89 commits
TypeScript
75.7%
JavaScript
20.5%
CSS
2.9%