title: trying to use file templates and an init script to provide a note template with a date date: 2018-07-22 publish: true

Borrowing from the Date package code: https://github.com/dannyfritz/atom-date/blob/master/lib/date.js

http://jasonrudolph.com/blog/2014/03/02/defining-atom-commands-in-your-init-script/

So really what i should do i guess is submit a pull request to Date to provide a service for getting its configured dates.

Document a way to run commands (and from init.coffee) https://flight-manual.atom.io/behind-atom/sections/interacting-with-other-packages-via-services/

So this was my attempt, added to .atom/init.coffee:

const dateFns = require('date-fns');

proccess.fileTemplates = {
  macros:
    date: -> dateFns.format(new Date(), 'YYYY-MM-DD')
}

And it resulted in this error on startup:

Failed to load /home/mlncn/.atom/init.coffee
reserved word ‘const’

I’m certain i can work around this but i probably won’t return to it. I only want one template for the foreseeable future, but