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!
Перейти к файлу
Jonathan Protzenko e9b618b85a External editors.
Fix the use-case where we import from the cloud someone else's script, written
using an external editor.
2015-04-02 16:08:18 -07:00
ast External editors. 2015-04-02 16:08:18 -07:00
browser removed WinRT specific implementations. Furture support for WinRT will go through Apache Cordova. 2015-02-24 15:52:27 -08:00
editor add 'activity' tab to groups in lite cloud 2015-04-02 12:29:53 -07:00
generated better dialog for azure certificates, support drag and drop 2015-03-31 09:15:57 -07:00
images New initial commit. Yay again! 😹 2015-02-04 08:07:58 -08: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 added ``app->env->has host`` to determine if ``host_exec`` can be used 2015-04-01 21:14:58 -07:00
libcordova remove facebook/twitter buttons from landing page 2015-04-01 10:03:26 -07:00
libnode Dealing with permissions in lite cloud; compile API 2015-03-31 17:25:45 -07:00
libwab remove facebook/twitter buttons from landing page 2015-04-01 10:03:26 -07:00
node-webkit updated nw package.json definition 2015-03-11 23:19:25 -07:00
noderunner deploy shell version from the client, not the server 2015-03-27 13:29:21 -07:00
officemix fixed regression in officemix.html 2015-02-12 09:37:07 -08:00
portal fixing madoko invocation 2015-03-02 11:05:51 -08:00
rt working on abuse report UI 2015-04-01 12:46:28 -07:00
runner removed WinRT specific implementations. Furture support for WinRT will go through Apache Cordova. 2015-02-24 15:52:27 -08:00
shell trying to hunt down log problems 2015-03-30 18:53:58 -07:00
storage External editors. 2015-04-02 16:08:18 -07:00
tools External editors. 2015-03-30 17:50:58 -07:00
webapp fixed css path in officemix.html 2015-02-12 05:41:01 -08:00
www Blockly. 2015-04-02 14:26:04 -07:00
.ackrc Only show "my scripts", "learn" and "top & new" when in beginner mode. 2015-02-16 11:18:08 -08:00
.gitattributes dummy visual studio solution to edit typescript in VS 2015-02-11 09:33:19 -08:00
.gitignore Merge remote-tracking branch 'origin/icons' 2015-03-05 15:00:40 +00:00
.travis.yml Try with node 0.12 instead 2015-02-12 12:05:32 -08: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 External editors. 2015-04-01 15:32:15 -07: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 Revert "Update README." 2015-03-19 11:33:15 -07:00
package.json fixing nw version 2015-03-25 09:04:21 -07:00
tsd.json More work towards external editors. 2015-03-09 17:00:35 -07:00
vs.sln support for specifying editor mode in hub:follow:...:block routing 2015-03-17 15:26:46 -07:00
vsrefs.ts removed WinRT specific implementations. Furture support for WinRT will go through Apache Cordova. 2015-02-24 15:52:27 -08:00

README.md

TouchDevelop

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

App Status Beta Status latest Status Cloud Status

Dependency Status devDependency Status

This repo contains the source code of the TouchDevelop editor. If you are intending to write TouchDevelop 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

However, you will not find the cloud backend code here. Indeed, https://www.touchdevelop.com takes care of storing and managing the scripts.

Contributing

There are many ways to contribute to TouchDevelop.

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

Setup

In order to build TouchDevelop, 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 TouchDevelop directory:
cd TouchDevelop
  • install dependencies:
npm install jake -g
npm install tsd@next -g
tsd reinstall
npm install

Building

There's different way to build and run TouchDevelop:

  • 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 2013+: open the vs.sln, then open the vsrefs.ts file to open the repo as a virtual folder.
  • 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 TouchDevelop scripts in TouchDevelop itself. You can fork them and send pull requests from TouchDevelop 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 TouchDevelop language
  • browser: feature-detection
  • editor: the TouchDevelop 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 TouchDevelop 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 TouchDevelop 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 TouchDevelop application: in-browser storage, cloud connection, promises, DOM utilities...
  • runner: the run-time system for generated TouchDevelop apps; that is, once a TouchDevelop 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 TouchDevelop 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 TouchDevelop 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.