var fs = require('fs');
fs.readFile('/etc/passwd', function(err, fileContent) {
if (err) {
throw err;
}
Atom이 실행된후, ~/.atom
디렉토리에 있는 init.coffee
파일이 실행되며, 너에게 원하는 대로 만든 CoffeeScript 코드를 실행할 기회를 준다.
너는 Atom > Open Your Init Script
메뉴에서 init.coffee
파일을 열수있다. 이 파일은 또한 init.js
이름 지어질 수 있으며 JavaScript 코드를 포함할 수 있다.
예를 들어, 만약 너가 Audio Beep 활성화 하고 싶다면, 너는 밑에 코드를 너의 init.coffe
파일에 추가하면 Atom을 실행할 때마다 Beep가 울릴것이다.
code:
atom.beep()
src/HelloWorld.js:
function helloWorld() {
return 'Hello World!';
var jsdom = require('jsdom');
var jquery = require('jquery');
jsdom.env({
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello World |