pxt-calliope/docs/reference/js/publishing.md

53 lines
2.2 KiB
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# Publish a Script
2016-04-02 01:22:47 +02:00
How to publish scripts.
2016-03-26 00:47:20 +01:00
### @parent js/contents
Scripts that you create are periodically saved in the cloud, but only published scripts can be seen by other people. Once you publish a script, other people can run your script, post comments on it, tweak and re-publish it, or rate your script with a heart.
### How to publish a script
To publish a script from the TouchDevelop Editor:
* when you're editing a script, click `script` and then click `publish`
To publish a script from `My Scripts`:
* go to **My Scripts*
* click a script on the left and then click `Publish` on the right
**Publish options:**
**Share with everyone**: click `publish` to publish your script so that anyone can find it using search or by browsing scripts.
**Share with people you choose**: click `publish as hidden` to publish your script in a way that it is not discoverable by search (users will need to know your script's id to access it).
2016-04-13 17:27:45 +02:00
When you publish a script, a url with a unique script id is created so that you can share your script with other people. To share a *publish as hidden* script, copy the url and give it to select people. There is also a `share` button in [script options](/js/editor).
2016-03-26 00:47:20 +01:00
You can add a short publication note if you'd like. This note appears with the publishing history (on the script overview page).
### Hidden scripts
A hidden script is
* not indexed by the search (so are never visible in search results)
* hidden from various lists, unless the person viewing the list is the user who created the script
* accessible to anyone who knows the hidden script's id
* accessible when it is the base of a public script
The lists include:
* list of scripts by the user
* list of derived scripts
### Published scripts are public!
**Do not store passwords or other confidential information** in your script code. Everyone will be able to see your script on the Internet forever once it is published.
### Updates
If you are working on a script, you might want to publish multiple updates of the same script. As long as you do not change the script name (and you are the author of the previous version), the published version will automatically be considered as the latest version of this script.