TouchDevelop is a touch-friendly app creation environment for iPad, iPhone, Android, Windows, Mac, Linux. Our mobile-friendly editor makes coding fun, even on your phone or tablet!
Перейти к файлу
Michal Moskal 6e6c0e0c36 Merge branch 'master' of github.com:Microsoft/TouchDevelop 2015-11-12 16:06:02 -08:00
.vscode updated VSCode settings (requires to update VS Code on client) 2015-09-10 07:35:52 -07:00
ast Include closures of nested functions in current closure if needed; see /rvayfwyxhk 2015-11-12 16:05:53 -08:00
browser added pseudo-localization 2015-11-11 11:53:40 -08:00
editor Remove delete/ignore buttons on reports about deleted pubs; resolves https://github.com/bbc/microbit-extras/issues/2298 2015-11-12 14:00:09 -08:00
embedded Simplify file save; fix hex import 2015-11-11 11:07:55 -08:00
fonts embed symbol font in printed css 2015-09-01 09:50:23 -07:00
generated added pseudo-localization 2015-11-11 11:53:40 -08:00
images Bitload icon source 2015-10-13 10:41:58 -07:00
intellitrain Fix line endings 2015-02-04 13:41:44 -08:00
json Fix line endings 2015-02-04 13:41:44 -08:00
lib update for color-blind users. fix for bbc/microbit-extras#2137 2015-11-12 14:26:45 -08:00
libcordova more cordova fix 2015-07-16 07:11:45 -07:00
libnode Inform worker process before killing it 2015-10-29 15:49:57 -07:00
libwab support for uploading files through dnd (cloud.lite) 2015-04-28 08:09:48 -07:00
locales added pseudo-localization 2015-11-11 11:53:40 -08:00
microbit update for color-blind users. fix for bbc/microbit-extras#2137 2015-11-12 14:26:45 -08:00
node-webkit updated nw package.json definition 2015-03-11 23:19:25 -07:00
noderunner Randomize the C++ sent to ARM. 2015-11-10 08:04:24 -08:00
officemix fixed regression in officemix.html 2015-02-12 09:37:07 -08:00
rt Bump glue layer. 2015-11-11 15:38:06 -08:00
runner removing picture_to_text 2015-08-25 14:50:45 -07:00
shell More encryption support in shell 2015-11-04 16:53:03 -08:00
storage Simplify file save; fix hex import 2015-11-11 11:07:55 -08:00
tools Merge branch 'crowdin' 2015-11-11 09:47:50 -08:00
webapp TouchDevelop -> Touch Develop 2015-08-26 21:15:04 -07:00
www Remove delete/ignore buttons on reports about deleted pubs; resolves https://github.com/bbc/microbit-extras/issues/2298 2015-11-12 14:00:09 -08:00
.ackrc Only show "my scripts", "learn" and "top & new" when in beginner mode. 2015-02-16 11:18:08 -08:00
.gitattributes don't enforce unix line encoding for unknown file types (fonts) 2015-08-31 18:20:00 +01:00
.gitignore compiling file generated by crowdin 2015-11-11 09:34:06 -08:00
.travis.yml don't specify minor version of node 2015-06-01 21:56:07 -07:00
.tsdrc Re-instate TSD as part of the build. 2015-02-10 10:39:45 -08:00
CONTRIBUTING.md - updated contribution instructions for automated CLA 2015-03-03 22:57:44 -08:00
Jakefile update translation export to support multiple files 2015-11-10 06:43:14 -08:00
LICENSE Missing license terms. 2015-03-18 17:22:24 -07:00
Makefile remove old stuff from the Makefile 2015-02-10 16:33:38 -08:00
README.md removing badges from readme.md 2015-10-28 22:51:18 -07:00
package.json refreshing nw build dependencies 2015-11-04 05:42:38 -08:00
tsd.json Blockly compiler. 2015-06-02 16:04:32 -07:00
vs.sln redirect large tutorial button to theme tutorials 2015-04-02 20:40:50 -07:00
vsrefs.ts updated master vs reference file 2015-04-26 21:28:45 -07:00

README.md

Touch Develop is a touch-friendly, cross-platform, mobile-first app creation environment developed with <3 at Microsoft Research. Build Status

Dependency Status devDependency Status

This repo contains the source code of the Touch Develop editor. If you are intending to write Touch Develop scripts, you want to go to touchdevelop.com:

If you want to always run the latest build,

The make sure which version you're running, tap the small copyright/legal/version bar in the bottom right, and then the latest changes button. This will give you the changes that went into your current version, and in particular if the fix for your submitted issue is in. If the expected change is not there, try reloading the page. Keep in mind that the build process takes a few minutes.

Other pages of interest:

What's in this repo?

The repo is mostly written in TypeScript with tiny pieces of HTML gluing.

This repo contains the source code for:

  • the browser client
  • the compiler
  • the editor
  • the runtime
  • the node.js client

The next-generation cloud backend for Touch Develop is available in TouchDevelop-backend repo. It was originally written in Touch Develop itself (see script tdlite if you're interested) and was later converted to TypeScript. It is currently used for the BBC micro:bit and will be deployed at https://www.touchdevelop.com shortly.

Contributing

There are many ways to contribute to Touch Develop.

If you're not a developer but still would like to help, we've got more tasks for you!

Setup

In order to build Touch Develop, ensure that you have Git and Node.js installed.

  • clone a copy of the repo:
git clone https://github.com/Microsoft/TouchDevelop.git
  • change to the Touch Develop directory:
cd TouchDevelop
  • install dependencies:
npm install jake -g
npm install tsd@next -g
tsd reinstall
npm install

Quick windows setup

These steps install the tools for Windows (+ extras to handle the Arduino compilation scenarios)

  • install Chocolatey
  • install nodejs, Visual Studio Code
choco install -y nodejs git visualstudiocode arduino python2 pip

Building

There's different ways to build and run Touch Develop:

  • just build:
jake

You can generate source maps by defining the env variable TD_SOURCE_MAPS

export TD_SOURCE_MAPS=1 # optional, will slow down your build
  • build and run locally:
jake local
  • run packaged as a [nwjs] app:
jake nw
  • run the test suite
jake test
  • cleaning
jake clean

Editing

You can use your favorite editor to edit the TypeScript file. Here are a couple tips:

  • Visual Studio Code, cross platform editor for TypeScript. Simply open the folder in Code.
  • Atom: there are a number of packages that will give you TypeScript coloring

Documentation

All the docs are available online at https://www.touchdevelop.com/docs.

The docs are authored as Touch Develop scripts in Touch Develop itself. You can fork them and send pull requests from Touch Develop itself to update them. You can update the local cache of documents by running this command:

jake update-docs

More handy commands

Our catch-all tool is build/client.js, which is compiled from tools/client.ts. Some of the common invocations of client.js are exposed as Jake targets.

# assumes TD_UPLOAD_KEY and TD_UPLOAD_USER are set, uploads a new test build
jake upload

Find out about other commands directly:

node build/client.js

The client.js is built by default.

The various directories in the tree

  • ast: contains the lexer, parser, type-checker and ast definitions for the Touch Develop language
  • browser: feature-detection
  • editor: the Touch Develop user interface that drives the website: hub, script list, editor itself
  • generated: files needed for the build that are re-generated manually once in a while
  • intellitrain:
  • json:
  • lib: the libraries exposed to Touch Develop scripts, written in TypeScript
  • libcordova: Apache Cordova specific implementations
  • libnode: Node.JS specific implementations
  • libwab: WebAppBooster implementations, used by the Windows Phone client
  • libwinRT: (deprecated) WinRT specific implementations
  • mc: Minecraft bindings
  • noderunner: runs in the cloud, and parses Touch Develop scripts / compiles them by responding to requests on /api.
  • node-webkit: configuration files for the node-webkit app creation
  • officemix: office mix app host
  • rt: various run-time support libraries for the Touch Develop application: in-browser storage, cloud connection, promises, DOM utilities...
  • runner: the run-time system for generated Touch Develop apps; that is, once a Touch Develop script is packaged as an app (webapp, cordova app, etc.), runner.js is the runtime system and the stub is in webapp
  • shell: shell app used by Azure and node-webkit; basically a way to serve files locally
  • storage: code for syncing your locally-stored scripts and the cloud storage, in the Touch Develop application
  • tools: internal tools that are part of the build (pre-processing)
  • webapp: the stub file that is used to generate the HTML5 Web App when exporting a script
  • www: the base files that make up the Touch Develop website (html and css)

Structure of the generated website / app

When packaged, as the website or as an app, the directory structure is flat. That is, the CSS and HTML files from www/ as well as the generated .js files from build/ all end up in the same directory. That way, index.html can refer to main.js without worrying.

When running locally (via jake local), the local node server knows where to find the right files to give the illusion that all files are in the /editor/local/ directory of the web server.

LICENSE

The MIT License (MIT)

Copyright (c) 2015 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3rd Party Notices