node.jsでつくられたものをいろいろ触ってみた

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
yasuo424
April 18, 2016

 node.jsでつくられたものをいろいろ触ってみた

node.js

yasuo424

April 18, 2016

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

28 slides
  1. ͱΓ͋͑ͣ hello, world • package.json • main.js • index.html 3ͭͷϑΝΠϧΛ༻ҙ

    { "name": "hello-electron", "main": "main.js" } QBDLBHFKTPO
  2. ͱΓ͋͑ͣ hello, world // Electron ͷϞδϡʔϧΛϩʔυ͢Δ var app = require('app');

    var BrowserWindow = require('browser- window'); var mainWindow = null; // ΢Οϯυ΢͕͢΂ͯดͨ͡ͱ͖ͷڍಈ Λఆٛ app.on('window-all-closed', function() { if (process.platform != 'darwin') { app.quit(); } }); app.on('ready', function() { // ϒϥ΢β΢Οϯυ΢Λ࡞Δ mainWindow = new BrowserWindow( { width: 800, height: 600 } ); // main.jsͱಉ͡σΟϨΫτϦʹ͋Δ index.htmlΛಡΈࠐΉ mainWindow.loadUrl( 'file://' + __dirname + '/index.html' ); mainWindow.on('closed', function() { mainWindow = null; }); }); NBJOKT

More Decks by yasuo424

Other Decks in Programming