1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-23 13:53:15 +00:00

Dev docs update

This commit is contained in:
Jermolene 2014-10-22 16:08:06 +01:00
parent 5bb74319e1
commit b23b4b95ef
2 changed files with 24 additions and 24 deletions

View File

@ -1,14 +1,14 @@
created: 20140320055936611
modified: 20140908152942119
modified: 20141022145259278
tags: howto
title: Developing plugins using Node.js and GitHub
type: text/vnd.tiddlywiki
The most practical way to develop plugins is to use Node.js with the tiddlywiki5 repository to build your plugins, and to use ~GitHub to manage you files.
!Step by step
! Step by step
!!1. Setup your development environment
!! 1. Installation
First read http://tiddlywiki.com/static/PluginMechanism.html.
@ -16,31 +16,31 @@ Install Git from http://git-scm.com/downloads
Install Node.js from http://nodejs.org/
!!2. Create a new blank repository on ~GitHub
!! 2. Create a new blank repository on ~GitHub
Hint: ~GitHub repositories cannot be grouped together into directories, so it is only possible to group by using a naming scheme, e.g. use 'TW5-' as a name prefix with tiddlywiki5 projects to group them together.
Go to https://github.com/ and create new a repository 'pluginname' - choose to add a readme file.
!!3. Setup a working environment
!! 3. Setup a working environment
Choose a location in your file system (eg TW5) for you plugin project; issue commands to:
Choose a location in your file system (eg TW5) for your plugin project; issue commands to:
--create the directory--
!!! 1. Create the directory
```
mkdir TW5
```
--make a local read-only copy of the tiddlywiki5 repository--
!!! 2. Make a local read-only copy of the ~TiddlyWiki5 repository
```
git clone https://github.com/Jermolene/TiddlyWiki5.git TW5
```
--make a directory for your plugin--
!!! 3. Make a directory for your plugin
```
cd TW5
@ -51,13 +51,13 @@ mkdir pluginname
```
--make a local copy of you plugin repository--
!!! 4. Make a local copy of your plugin repository
```
git clone https://github.com/yourgithub/pluginname.git pluginname
```
--go to your files--
!!! 5. Go to your files
```
cd pluginname
@ -79,39 +79,39 @@ Create the file plugin.info with content:
```
!!4. Create the files for you plugin
!! 4. Create the files for your plugin
For example files see the plugins in the tiddlywiki5 repository i.e. those located at plugins/tiddlywiki/ - Note in particular that files need to contain information that is used to tell tiddlywiki the name of the tiddler that is to be used in the tiddlywiki in place of the name of the file within the file system.
For example files see the plugins in the ~TiddlyWiki5 repository i.e. those located at plugins/tiddlywiki/. See TiddlerFiles for details of the supported tiddler file formats.
!!5. Build your files into a tiddlywiki
!!5. Build your files into a ~TiddlyWiki
Modify editions/tw5.com/tiddlywiki.info to include a reference to your plugin directory, i.e. find `"plugins": [ ` and add `"yourname/pluginname"`.
Modify `editions/tw5.com/tiddlywiki.info` to include a reference to your plugin directory, i.e. find `"plugins": [ ` and add `"yourname/pluginname"`.
From the TW5 directory issue the command
```
./bin/qbld.sh
node ./tiddlywiki.js editions/tw5.com --build index
```
the resultant file (index.html) will be placed in the build directory, the default build directory is `../jermolene.github.com` relative to TW5/
The resultant file (index.html) will be placed in the `editions/tw5.com/output` directory of the TW5 repo.
!!6. Save your work on ~GitHub
!! 6. Save your work on ~GitHub
From `plugins/yourname/pluginname/` issue commands to:
--add all files--
!!! 1. Add all files
```
git add -A
```
--commit to your local repository---
!!! 2. Commit to your local repository
```
git commit -am "something meaningful about this check in"
```
--copy local changes to github--
!!! 3. Copy local changes to github
```
git push

View File

@ -1,5 +1,5 @@
created: 20140217173715829
modified: 20140908153034100
modified: 20141022145259278
tags: howto
title: How to create a translation for TiddlyWiki
type: text/vnd.tiddlywiki
@ -16,13 +16,13 @@ type: text/vnd.tiddlywiki
# Create a branch with the name of the translation you intend to create (eg "cy-GB" for "Welsh (United Kingdom)")
#* IETF language codes: http://www.lingoes.net/en/translator/langcode.htm
# Clone your forked repository to your computer (eg, `/MyTranslation/TiddlyWiki5`)
# Create a sibling directory `/MyTranslation/jermolene.github.com`
# Create a sibling directory `/MyTranslation/jermolene.github.io`
# Create a new folder in `<repo>/languages` for your translation
# Copy the contents of `<repo>/core/language/en-GB` into your translation folder
# Create a `plugin.info` file (see below) in your translation folder
# Edit `<repo>/editions/tw5.com/tiddlywiki.info` to add your language to the list
# Run `../build.jermolene.github.io/quick-bld.sh` to build TiddlyWiki
# Open the TiddlyWiki file at `/MyTranslation/jermolene.github.com/index.html`
# Open the TiddlyWiki file at `/MyTranslation/jermolene.github.io/index.html`
# You should see your translation listed in the control panel, but the text of the translation will still be in British English
# Edit the `.tid` and `.multids` files in your language folder to translate the English text