-
Notifications
You must be signed in to change notification settings - Fork 30
Home
This is the internal dev corner of basil.js, probably not really interesting. For tutorials, examples and documentation go to the official website: http://basiljs.ch
- Install Sublime Text 2
- Install Sublime package sublime-jsdocs
- Install Sublime package SublimeLinter
- Install the Indesign Build Script in Sublime Text. Copy the folder
Basiljs
(bundle/extras/Sublime Text/Basiljs
) to your Sublime Text 2Packages
directory e.g. OS X:~/Library/Application Support/Sublime Text 2/Packages/Basiljs
- In Sublime go to Project -> Open Project... and select basil.sublime-project
basil.js uses "Code Conventions for the JavaScript Programming Language" by Douglas Crockford with these modifications:
- The unit of indentation is two spaces
Furthermore these structures turned out to be best practice in the basil.js source file:
###checking primitives
- typeof var === 'undefined'
- typeof var === 'number'
- typeof var === 'string'
- typeof var === 'boolean'
###for complex objects
- var instanceof PageItem
- var instanceof TextFrame
- var instanceof Function
##API Documentation basil.js uses YUIDoc to document public API functionality. Installation and usage:
- Download and install Node.js
- Open up a terminal window and run "npm -g install yuidocjs"
- To generate the documetation in doc/api open up a terminal window and simply run "yuidoc ." in the basil.js project directory
##utf-8 bom commits
don't create new files in extendscript! for some reason extendscript adds (sometimes) an utf-8 bom flag to files, which causes problems in github. if you have such a file you can "repair" it with the following terminal commands:
vim file.jsx
:set nobomb
:wq