-
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 Issues
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
##Git Snippets ###how to create a tag commit your changes, get the commit id e.g. 5e7ddab4f8, then add the tag with the following commands:
- create the tag
git tag -a "0.21_private_beta_end_of_world" -m "private beta release" 76497cd600
- check the tag
git log --oneline --decorate --graph
- commit the tag to the repo
git push --tags
###Hard reset to origin/master
- if working directory not clean:
git stash
git fetch --all
git reset --hard origin/master
- if stashed:
git stash pop
(to reinsert last working state)