factor/basis/editors/brackets/brackets.factor

23 lines
627 B
Factor
Raw Normal View History

2015-06-13 20:37:23 -04:00
! Copyright (C) 2015 Dimage Sapelkin.
! See http://factorcode.org/license.txt for BSD license.
USING: editors io.pathnames io.standard-paths kernel make
namespaces system vocabs ;
2015-06-13 20:37:23 -04:00
IN: editors.brackets
SINGLETON: brackets-editor
brackets-editor editor-class set-global
2015-06-13 20:37:23 -04:00
HOOK: brackets-path os ( -- path )
2015-06-13 20:37:23 -04:00
M: macosx brackets-path
"io.brackets.appshell" find-native-bundle [
"Contents/MacOS/Brackets" append-path
] [
f
] if* ;
2015-06-13 20:37:23 -04:00
M: brackets-editor editor-command ( file line -- command )
[ brackets-path "brackets" or , drop , ] { } make ;
2015-06-13 20:37:23 -04:00
os windows? [ "editors.brackets.windows" require ] when