10x Developer
  • Introduction
  • HTML
    • HTML DOM Jquery
    • HTML: Form
    • CSS
    • CSS Layout
    • CSS Flexbox
    • CSS Grid
    • SASS/LESS
    • CSS/LESS/SASS Cookbook
    • Bootstrap
  • JavaScript
    • JavaScript
    • ES6
    • TypeScript
    • JavaScript Testing
    • JavaScript Event Loop
    • DOM
    • Web APIs
    • JSON
    • RegEx
    • Functional Programming
    • JavaScript Lib
    • CoffeeScript
    • CoffeeScript to ES6 cheatsheet
  • Angular.js
    • Angular
    • Angular Cookbook
    • Angular Mistakes I Made
    • Angular 1.x
  • React.js
    • React.js
  • Node
    • Node.js
    • CLI command line tool
    • Electron / Atom
    • NW.js (node-webkit)
  • Serverless
    • AWS Lambda
    • Google Cloud Function
    • Actions on Google / Google Assistant
  • Full Stack Development
    • HTTP
    • Meteor
    • MongoDB
    • Digital Ocean
    • UI
    • Sketch
    • Web Dev Resources
  • Lang
    • Ruby
  • Know Your Tools
    • Chrome DevTools
    • Editor: VS Code
    • Editor: Vim
    • Editor: Sublime
    • Editor: Atom
    • Windows
    • Git
    • Linux / Bash
    • Mac
  • Cheatsheets
Powered by GitBook
On this page
  • Electron
  • Build Error npm ERR! Failed at the nslog@3.0.0 install script 'node-gyp rebuild'.
  • How to use bootstrap?
  • How to use Select2 or Jquery?
  • Atom
  • How to build custom syntax file for Atom Editor
  1. Node

Electron / Atom

PreviousCLI command line toolNextNW.js (node-webkit)

Last updated 6 years ago

Build Error npm ERR! Failed at the nslog@3.0.0 install script 'node-gyp rebuild'.

NOTE: if you see the error after npm install, it's because there is a problem when building node-gyp on some Windows machines.

Try to delete the 'node_modules' folder, and call npm install from a "VS2013 x86 Native Tools Command Prompt" window (found in VS2013 installation).

See related issue on

How to use bootstrap?

// use jquery
import $ from 'jquery';

// use bootstrap with jqeury
global.jQuery = require('jquery');
require('bootstrap');

How to use Select2 or Jquery?

  1. install npm package: npm install select2

  2. reference css file in app.html: `

  3. require the package so webpack will pack it: import S2 from 'select2'

Atom

How to build custom syntax file for Atom Editor

  • Use dev tool to find out class names

  • Open two window: one for dev and one for preview the syntax; Ctrl+Alt+r on preview window to reload.

  • Don't forget to escape \ in the regex string in the cson file:

    'match': '\\s*(defined)\\b(?![?!])'

Reference this:

and any familiar language syntax file, for example,

Electron
electron-react-boilerplate
awesome-electron
Github
https://github.com/lee-dohm/language-generic-config
Ruby