Code Monkey home page Code Monkey logo

atom-shell-starter's Introduction

Atom Shell Starter App

atom-shell-starter is a base application that you can use to get started writing your own cross-platform (Win/Mac/Linux) Desktop apps via Atom Shell. This template is extracted from the Atom source code, cleaned up to be more generic, and to be a great starting point for a production app.

Getting Started

Everything in Atom Shell Starter is configured via the package.json file - there are some extra fields that are of interest:

  • name - The name for your app that will be used in the build tools. Make it something simple.
  • productName - The name of your product - your executable will be called this (i.e. "MyApp.app")

The default project is called EightOhEight (get it? Cause it's a sample(r)).

Once you've set that up, do:

  1. script/bootstrap - Run this once per checkout.
  2. script/build - Run this whenever you change package.json or change early startup code
  3. script/run - Run the app. Use this for running the app in developer mode

Another useful script is script/grunt, which will run the local version of Grunt. script/grunt --help will tell you the list of available tasks.

Using JavaScript ES6

JavaScript ES6 / ESNext is available via the Babel project for almost all files except for very early in startup. To use it, add 'use babel'; to the top of your file. Check out https://babeljs.io for more information.

What's the "browser" vs "renderer" code?

Atom Shell has (at least) two separate contexts - when your app first starts up, it is running in a DOM-less node.js loop - there are no windows. This is called the Browser context. The built-in code proceeds to start up a BrowserWindow object, which then creates a Rendering context, which is what you are more used to - it's got the Chrome DevTools and a DOM, yet it can still use node.js, as well as several Atom Shell APIs that are made available. Check out the documentation for Atom Shell for more about what you can do.

Most of your app's code should ideally live in the Rendering context, because the Browser context is difficult to debug and test - there is no Chrome DevTools, solely printf-based debugging.

Why does $MY_FAVORITE_LIBRARY not work / do weird stuff?

Some JavaScript libraries try to detect whether they're in node.js via probing for module or require, and assume that they aren't in a browser. You might find that you need to patch these libraries to always operate in Browser Mode.

atom-shell-starter's People

Contributors

anaisbetts avatar kevinsawicki avatar lllama avatar mcolyer avatar nblagoev avatar outsideris avatar sebmck avatar stefanbuck avatar thedaniel avatar waywardmonkeys avatar

Stargazers

 avatar

Watchers

 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.