TAROT A status report
- 格式:pdf
- 大小:73.03 KB
- 文档页数:5
taro使用总结Taro是一款基于React的多端开发框架,可以同时开发小程序、H5、React Native等应用。
它采用统一的语法和组件规范,使得开发者可以在不同平台上共享代码,提高开发效率。
下面将从安装Taro、创建项目、编写代码等方面进行详细介绍。
要使用Taro进行开发,我们需要先安装Taro的命令行工具。
可以通过npm全局安装,具体命令如下:```npm install -g @tarojs/cli```安装完成后,我们可以使用Taro命令创建一个新的项目。
在命令行输入以下命令:```taro init myApp```这将创建一个名为myApp的新项目。
接下来,进入项目目录并启动开发服务器:```cd myAppnpm installnpm run dev```通过以上步骤,我们已经成功创建并启动了一个Taro项目。
接下来,我们可以开始编写代码了。
Taro的代码结构和React非常相似,我们可以使用JSX语法编写组件。
Taro的组件生命周期和React的生命周期类似,我们可以在组件的不同生命周期方法中编写相应的逻辑。
同时,Taro还为我们提供了一些特定的生命周期方法,用于处理小程序、H5等不同平台上的差异。
在编写组件时,我们可以使用Taro提供的一些内置组件,也可以自定义组件。
Taro的内置组件和原生小程序组件类似,可以满足大部分开发需求。
如果需要扩展功能,我们可以使用Taro的插件机制,引入第三方组件库或自行开发插件。
除了组件开发,Taro还提供了一些工具函数和API,用于处理网络请求、数据存储、路由跳转等常见开发任务。
这些工具函数和API 都封装了底层平台的差异,使得我们可以在不同平台上保持一致的开发体验。
在开发完成后,我们可以使用Taro提供的打包命令将项目打包成不同平台的应用。
具体命令如下:```npm run build:weapp // 打包小程序npm run build:h5 // 打包H5应用npm run build:rn // 打包React Native应用```通过以上步骤,我们已经完成了一个基于Taro的多端应用的开发过程。
taro 条件判断Taro 条件判断概述:Taro 是一款基于 React 的多端开发框架,它能够实现一套代码同时运行在多个平台上,如微信小程序、H5 网页、React Native 等。
在 Taro 中,条件判断是一种常用的编程技巧,可以根据不同的条件执行不同的代码逻辑。
本文将介绍 Taro 条件判断的基本语法和应用场景。
一、基本语法:在 Taro 中,条件判断主要通过 if、else if 和 else 语句来实现。
其基本语法如下所示:```javascriptif (条件1) {// 条件1 为真时执行的代码} else if (条件2) {// 条件1 不满足,条件2 为真时执行的代码} else {// 以上条件都不满足时执行的代码}```其中,条件可以是比较表达式、逻辑表达式或函数调用的结果等。
根据不同的条件结果,程序将执行相应的代码块。
二、常见应用场景:1. 根据用户的登录状态显示不同的页面内容:```javascriptif (isLogin) {// 显示用户个人信息} else {// 显示登录按钮}```2. 根据用户的权限判断是否显示某些功能模块:```javascriptif (isAdmin) {// 显示管理员功能模块} else {// 不显示管理员功能模块}```3. 根据用户的操作触发不同的事件处理函数:```javascriptif (event.type === 'click') {handleClick()} else if (event.type === 'hover') {handleHover()} else {handleOther()}```4. 根据不同的条件渲染不同的组件:```javascriptif (condition) {return <ComponentA />} else {return <ComponentB />}```5. 根据数组的长度判断是否显示列表内容:```javascriptif (list.length > 0) {// 显示列表内容} else {// 显示空列表提示}```三、注意事项:1. 在条件判断中,要注意比较表达式的准确性,避免歧义或错误信息的出现。
Taro开发微信⼩程序遇到的问题和解决⽅法1.scroll-view 置顶, 给设置scroll-top为0⽆效问题?解决⽅案: 不触发置顶问题,需要给scroll-top⼀个设置接近0的随机数,Math.random()2.scroll-view绑定bindscrolltolower没有触发问题?解决⽅案: 通过获取系统信息wx.getSystemInfoSync()拿到屏幕的⾼度,然后减去其他组件占位的⾼度, 得到scroll-view容器的⾼度, 最后给scroll-view的style设置容器的⾼度才能⽣效3.⽤wx.createSelectorQuery().select(id).fields({computedStyle: ['margin', 'backgroundColor', 'width', 'height']}),获取⾼度,如果设置了padding得到的值不准确问题?解决⽅案: 给容器添加box-sizing: border-box;4.注意在使⽤taro, 对webpack配置defineConstants全局变量,不能在代码中使⽤相同和全局变量相同的命令变量或者函数中的形成5.⼩程序中使⽤request,如果url直接带上中⽂,在部分⼿机会导致中⽂编号异常请求失败解决不要直接query拼接到url中,把query传递到request对应的data中,最好在header中添加'Content-Type': 'application/json;charset=utf-8'6.aro v1.3.0-beta.3开发微信插件,使⽤'@tarojs/async-await'导致regeneratorRuntime is not defined报错在载⼊@tarojs/async-await的地⽅添加⼀个声明const regeneratorRuntime = global.regeneratorRuntime;7.升级Taro为Taro v1.3.0-beta.3,开发微信插件,微信开发⼯具报VM2140:5 未找到⼊⼝ app.json ⽂件,或者⽂件读取失败,请检查后重新编译。
taro-ui 校验规则Taro-UI是一个基于Taro框架开发的UI组件库,它提供了一系列常用的UI组件和功能。
在使用Taro-UI进行表单校验时,可以使用以下几种校验规则:1. required(必填),该规则要求字段必须填写,不能为空。
如果字段为空,则校验不通过。
2. pattern(正则校验),该规则要求字段的值必须符合指定的正则表达式。
例如,可以使用pattern="/^[0-9]{6}$/"来校验一个六位数字的输入。
3. maxLength(最大长度),该规则要求字段的长度不能超过指定的最大值。
例如,可以使用maxLength="10"来限制一个输入字段的最大长度为10个字符。
4. minLength(最小长度),该规则要求字段的长度不能少于指定的最小值。
例如,可以使用minLength="6"来限制一个输入字段的最小长度为6个字符。
5. range(数值范围),该规则要求字段的数值必须在指定的范围内。
例如,可以使用range="[1, 100]"来限制一个输入字段的数值必须在1到100之间。
6. customValidator(自定义校验函数),该规则允许你自定义一个校验函数来进行更复杂的校验逻辑。
你可以在该函数中编写自己的校验规则,并返回一个布尔值表示校验结果。
除了以上的校验规则,Taro-UI还提供了一些其他的校验功能,例如表单的整体校验、校验错误提示等。
你可以根据具体的需求在Taro-UI的文档中查找更多相关信息。
记住,在使用校验规则时,要根据实际情况合理选择适用的规则,并进行正确的配置和使用,以确保表单数据的准确性和完整性。
如何正确使用taro.request请求文件流一、问题背景在使用Taro框架进行小程序开发时,我们经常需要发送网络请求来获取数据或文件流。
Taro.request是Taro框架提供的发送网络请求的API之一,它可以用来请求文件流。
然而,很多开发者在使用taro.request请求文件流时,经常会遇到一些报错或用法不正确的情况。
为了更好地理解和掌握taro.request请求文件流的正确用法,下面我们将深入探讨这个主题。
二、问题分析1. taro.request请求文件流报错的原因在使用taro.request请求文件流时,常见的报错原因包括参数不正确、网络请求失败、权限问题等。
需要从请求参数、网络状态、文件流处理等多个方面进行分析和排查。
2. taro.request请求文件流的正确用法正确使用taro.request请求文件流需要注意以下几个方面:参数设置、网络状态判断、文件流处理等。
三、深入探讨1. 参数设置在发送taro.request请求文件流时,需要正确设置参数。
包括url、method、header、dataType等参数的设置。
需要注意文件流的处理方式,例如使用responseType: 'arraybuffer'来获取文件流数据。
2. 网络状态判断在发送文件流请求后,需要及时判断网络状态以及请求是否成功。
对于网络请求失败的情况,需要进行合适的错误处理。
3. 文件流处理接收到文件流数据后,需要进行正确的文件流处理。
可以使用Taro的文件操作API来保存文件流,或者在小程序中展示文件流内容。
四、总结回顾通过本文的深入探讨,我们更全面地了解了taro.request请求文件流的正确用法。
正确设置参数、判断网络状态、处理文件流等环节都是十分重要的。
只有在每一个环节都进行了正确处理,我们才能顺利地发送文件流请求并正确处理返回的文件流数据。
五、个人观点和理解在实际开发中,正确使用taro.request请求文件流不仅是技术细节问题,更是对整个小程序功能的保障。
【taro atdrawer用法】深度解析一、前言在当今社会,移动应用开发已经成为了不可或缺的一部分,而taro作为一款多端统一开发框架,在开发效率和运行性能上有着显著的优势。
而在taro的子组件中,atdrawer作为一个非常重要的工具,为我们提供了便利和效率。
今天我们就来深度解析一下taro atdrawer的用法和功能。
二、 atdrawer的基本概念taro atdrawer是一个专门用来处理抽屉效果的组件,它可以方便我们实现页面的侧滑效果和内容的展示。
在实际开发中,我们可以将其应用在一些侧边栏菜单、消息列表、个人中心等场景中,为用户提供更加友好和便捷的操作体验。
三、 atdrawer的基本使用在taro中,我们可以通过引入atdrawer组件,并结合相关的参数和方法,来快速构建和使用抽屉效果。
我们需要引入atdrawer组件:```javascriptimport { AtDrawer } from 'taro-ui'```在页面中使用AtDrawer组件,并设置相应的属性和方法:```javascript<AtDrawer show={this.state.show} maskonClose={this.closeDrawer} ><view>抽屉内容</view></AtDrawer>```这样,我们就可以在页面中实现一个简单的抽屉组件,并通过show属性来控制其显示和隐藏的状态。
在具体的使用中,我们还可以通过设置多种不同的属性,来实现更加个性化和丰富的抽屉效果,例如width、right、mask等属性,以及onClose、onMaskClick等方法,来处理抽屉关闭和遮罩点击的事件。
四、 atdrawer的高级应用除了基本的使用方法之外,atdrawer还有许多高级的功能和应用场景,例如嵌套抽屉、抽屉样式定制、抽屉动画效果等。
lumen错误⽇志1、简介开始⼀个新的项⽬的时候,和处理已经默认为你配置好了。
此外,Lumen还集成了提供各种功能强⼤处理器的⽇志库。
2、配置2.1 错误详情配置⽂件.env中的APP_DEBUG配置选项控制浏览器显⽰的错误详情数量。
对本地开发⽽⾔,你应该设置环境变量APP_DEBUG值为true。
在⽣产环境,该值应该被设置为false。
3、异常处理器所有异常都由类App\Exceptions\Handler处理,该类包含两个⽅法:report和render。
下⾯我们详细阐述这两个⽅法。
3.1 report⽅法report⽅法⽤于记录异常并将其发送给外部服务如。
默认情况下,report⽅法只是将异常传递给异常被记录的基类,你可以随⼼所欲的记录异常。
例如,如果你需要以不同⽅式报告不同类型的异常,可使⽤PHP的instanceof⽐较操作符:/*** 报告或记录异常** This is a great spot to send exceptions to Sentry, Bugsnag, etc.** @param \Exception $e* @return void*/public function report(Exception $e){if ($e instanceof CustomException) {//}return parent::report($e);}通过类型忽略异常异常处理器的$dontReport属性包含⼀个不会被记录的异常类型数组,默认情况下,404错误异常不会被写到⽇志⽂件,如果需要的话你可以添加其他异常类型到这个数组。
3.2 render⽅法render⽅法负责将给定异常转化为发送给浏览器的HTTP响应,默认情况下,异常被传递给为你⽣成响应的基类。
然⽽,你可以随⼼所欲地检查异常类型或者返回⾃定义响应:/*** 将异常渲染到HTTP响应中** @param \Illuminate\Http\Request $request* @param \Exception $e* @return \Illuminate\Http\Response*/public function render($request, Exception $e){if ($e instanceof CustomException) {return response()->view('errors.custom', [], 500);}return parent::render($request, $e);}4、HTTP异常有些异常描述来⾃服务器的HTTP错误码,例如,这可能是⼀个“页⾯未找到”错误(404),“认证失败错误”(401)亦或是程序出错造成的500错误,为了在应⽤中⽣成这样的响应,使⽤如下⽅法:abort(404);abort⽅法会⽴即引发⼀个会被异常处理器渲染的异常,此外,你还可以像这样提供响应描述:abort(403, 'Unauthorized action.');该⽅法可在请求⽣命周期的任何时间点使⽤。
taro学习笔记(⼀)---taro⼊门1、介绍taro是⼀套遵循React语法规范的多端开发解决⽅案,实现只书写⼀套代码,通过Taro的编译⼯具,将源代码分别编译出可以在不同端(微信⼩程序, h5,RN等)运⾏的代码2、安装安装taro的脚⼿架⼯具npm install -g @tarojs/cli//创建app项⽬taro init myApp//启动项⽬npm run dev:h5 //h5npm run dev:weapp //微信⼩程序npm run dev:alipay //⽀付宝⼩程序npm run dev:swan //百度⼩程序npm run dev:rn //reactNative注意:如果是编译那么就直接把dev变成build即可在开发微信⼩程序的过程中,需要调⽤微信开发⼯具,那么步骤是a、先运⾏npm run dev:weappb、打开微信⼩程序开发⼯具c、添加项⽬,注意导⼊的时候,只需要导⼊项⽬中的dist⽂件夹就可以了,因为微信⼩程序只认编译后的内容d、判断当前的运⾏环境 process.env.TARO_ENV3、taro项⽬⽂件结构注意:在项⽬下还有⼀个⽂件project.config.json⽂件,这个⽂件主要⽤于配置微信⼩程序的配置,并且该⽂件⾥的appid是体现当前微信的appid在微信⼩程序中是区别页⾯与组件的,app.config.ts是配置路由的,凡是配置到app.config.ts中的均为页⾯,否则为组件,主要在app.config.ts => pages是配置路由的4、taro的⽣命周期函数taro结合了⼩程序与react两者的⽣命周期函数,具体见官⽹,并且针对函数式编程做了⼀定的兼容import React, { useEffect } from 'react'import { View } from '@tarojs/components'import {useReady,useDidShow,useDidHide,usePullDownRefresh} from '@tarojs/taro'function Index () {// 可以使⽤所有的 React HooksuseEffect(() => {})// 对应 onReadyuseReady(() => {})// 对应 onShowuseDidShow(() => {})// 对应 onHideuseDidHide(() => {})// Taro 对所有⼩程序页⾯⽣命周期都实现了对应的⾃定义 React Hooks 进⾏⽀持// 详情可查阅:【Taro ⽂档】-> 【进阶指南】->【Hooks】usePullDownRefresh(() => {})return (<View className='index' />)}export default Index注意:对于获取路由信息import { View, Text } from '@tarojs/components'import {useEffect} from 'react'import {useReady, getCurrentInstance} from '@tarojs/taro'import './index.less'const App: React.FC = () => {useEffect(() => {console.log('effect')}, [])useReady(() => {console.log('ready')console.log(getCurrentInstance()) //获取路由信息})return <View><Text>today is good day</Text></View>}5、taro的路由功能在taro中,路由功能是默认⾃带的,不需要开发者进⾏额外的配置,这⾥相当于通过⼩程序的配置适配了⼩程序与h5的路由问题, taro默认根据配置路径⽣成了Route,我们只需要在⼊⼝⽂件的config配置中指定好pages,然后就可以在代码中通过taro提供的API来跳转页⾯的⽬的。
taro框架的缺陷以及注意事项1.不要使⽤ eval()2.禁⽌使⽤ Object 构造器let config = new Object() // ✗错误3.不使⽤ Generator 函数语法使⽤Promise或者async functions来实现异步编程1.function* helloWorldGenerator() { // ✗错误2.yield 'hello';3.yield 'world';4.return 'ending';5.}4.SX 属性均使⽤单引号1.import Taro, { Component } from '@tarojs/taro'2.import { View, Input } from '@tarojs/components'3.4.class MyComponent extends Component {5.render () {6.return (7.<View className='test'> // ✓正确8.<Text className="test_text">12</Text> // ✗错误9.</View>10.)11.}12.}5.推荐使⽤对象解构的⽅式来使⽤ state、props1.import Taro, { Component } from '@tarojs/taro'2.import { View, Input } from '@tarojs/components'3.state = {6.myTime: 127.}8.render () {9.const { isEnable } = this.props // ✓正确10.const { myTime } = this.state // ✓正确11.return (12.<View className='test'>13.{isEnable && <Text className='test_text'>{myTime}</Text>}14.</View>15.)16.}17.}6.不要以 class/id/style 作为⾃定义组件的属性名1.<Hello class='foo' /> // ✗错误2.<Hello id='foo' /> // ✗错误3.<Hello style='foo' /> // ✗错误7.不要在调⽤ this.setState 时使⽤ this.state由于 this.setState 异步的缘故,这样的做法会导致⼀些错误,可以通过给 this.setState 传⼊函数来避免1.this.setState({2.value: this.state.value + 13.}) // ✗错误4.5.6.this.setState(prevState => ({ value: prevState.value + 1 })) // ✓正确8.map 循环时请给元素加上 key 属性1.list.map(item => {2.return (3.<View className='list_item' key={item.id}>{}</View>5.})9.尽量避免在 componentDidMount 中调⽤ this.setState因为在componentDidMount中调⽤this.setState会导致触发更新1.import Taro, { Component } from '@tarojs/taro'2.import { View, Input } from '@tarojs/components'3.4.class MyComponent extends Component {5.state = {6.myTime: 127.}8.9.componentDidMount () {10.this.setState({ // ✗尽量避免,可以在 componentWillMount 中处理11.name: 112.})13.}14.15.render () {16.const { isEnable } = this.props17.const { myTime } = this.state18.return (19.<View className='test'>20.{isEnable && <Text className='test_text'>{myTime}</Text>}21.</View>22.)23.}24.}10.不要在 componentWillUpdate/componentDidUpdate/render 中调⽤ this.setState 1.import Taro, { Component } from '@tarojs/taro'2.import { View, Input } from '@tarojs/components'3.class MyComponent extends Component {5.state = {6.myTime: 127.}8.9.componentWillUpdate () {10.this.setState({ // ✗错误11.name: 112.})13.}14.15.componentDidUpdate () {16.this.setState({ // ✗错误17.name: 118.})19.}20.21.render () {22.const { isEnable } = this.props23.const { myTime } = this.state24.this.setState({ // ✗错误25.name: 1126.})27.return (28.<View className='test'>29.{isEnable && <Text className='test_text'>{myTime}</Text>} 30.</View>31.)32.}33.}不要定义没有⽤到的 state11.import Taro, { Component } from '@tarojs/taro'2.import { View, Input } from '@tarojs/components'3.4.class MyComponent extends Component {5.6.static defaultProps = {7.isEnable: true8.}9.10.state = {11.myTime: 1212.}13.14.render () {15.const { isEnable } = this.props16.const { myTime } = this.state17.18.return (19.<View className='test'>20.{isEnable && <Text className='test_text'>{myTime}</Text>} 21.</View>22.)23.}24.}12.taro注意:不能在包含 JSX 元素的 map 循环中使⽤ if 表达式以下代码会被 ESLint 提⽰警告,同时在 Taro(⼩程序端)也不会有效:1.numbers.map((number) => {2.let element = null3.const isOdd = number % 24.if (isOdd) {5.element = <Custom />6.}})以下代码不会被警告,也应当在 Taro 任意端中能够运⾏:1.numbers.map((number) => {2.let isOdd = false3.if (number % 2) {4.isOdd = true5.}6.return isOdd && <Custom />7.})13.尽量在 map 循环中使⽤条件表达式或逻辑表达式1.numbers.map((number) => {2.const isOdd = number % 23.return isOdd ? <Custom /> : null4.})5.6.numbers.map((number) => {7.const isOdd = number % 28.return isOdd && <Custom />9.})14不能使⽤ Array#map 之外的⽅法操作 JSX 数组15.先处理好需要遍历的数组,然后再⽤处理好的数组调⽤map⽅法。
详解微信⼩程序(Taro)⼿动埋点和⾃动埋点的实现每⼀个公司要想⽤户增长,都要收集和分析⽤户操作数据,因此埋点是必不可少的事情。
⽽对于前端职业发展来说,传统的⼿动埋点,⽆疑是繁琐⼜⽆聊的事情,能简化就简化。
⼀、⼿动埋点⼿动埋点就是在每⼀处需要的地⽅,都加⼀段上报埋点的代码。
影响代码的阅读体验,且散落的埋点代码不⽅便管理。
以页⾯ pv 为例,我们此前是在每⼀个页⾯中上报 pv:// src/manual/home/index.tsximport tracking from "./tracking";// pageSn 是前端和产品约定的「页⾯在埋点系统的唯⼀标识」,⽐如这个项⽬⾸页的标识符是数字 11664const pageSn = 11111;export default () => {// useDidShow 是 Taro 专有的 Hook,等同于⼩程序原⽣ componentDidShow ⽣命周期,会在页⾯展⽰的时候调⽤。
useDidShow(() => {// 通过统⼀封装的 sendPv ⽅法发送 pv 埋点sendPv(pageSn);});return <View>⼿动埋点页⾯</View>;};⼆、⾃动埋点⾃动埋点可分为全⾃动埋点和半⾃动埋点。
全⾃动埋点则是不管需不需要,将所有的点都埋了。
前端肯定开⼼了 “以后埋点产品都不要不要找我啦”,可数据同学就哭唧唧了。
⽐如,腾讯和 Taro 团队共同推出,接⼊超级简单。
⽐如配置 proxyPage 为 true 即可 “上报所有页⾯的 browse 、leave、share 等事件”,配置 autoTrack 为 true 即可 “⾃动上报所有元素的 tap、change、longpress、confirm 事件”。
可从数据量和有效性来说,「全埋」等于「不埋」,因为「全埋」⼀⽅⾯对数据存储量要求很⾼,另⼀⽅⾯会给我们负责数据清洗的同学带来⼤量⼯作。
a r X i v :a s t r o -p h /9711195v 1 18 N o v 1997TAROT:A status reportMichel Bo¨e r,J.L.Atteia,M.Bringer,A.Klotz,C.Peignot ∗,R.Malina,P.Sanchez †,H.Pedersen ‡G.Calvet,J.Eysseric,A.Leroy,M.MeissonierC.Pollas,J.de Freitas Pacheco ¶∗Centre d’Etude Spatiale des Rayonnements (CNRS)BP 4346,F 31028Toulouse Cedex 4,France †Laboratoire d’Astronomie Spatiale (CNRS),Marseille,France ‡Copenhagen University Observatory,Denmark INSU-CNRS,Division Technique,Paris,France ¶Observatoire de la Cˆo te d’Azur,Nice,France Abstract.TAROT-1is an automatic,autonomous ground based observatory whose primary goal is the rapid detection of the optical counterparts of cosmic gamma-ray burst sources.It will be able to begin imaging any GRB localization 8seconds after receipt of an alert from CGRO/BATSE or HETE-2.TAROT-1will reach the 17th V magnitude in 10seconds,at a 10σconfidence level.TAROT will be able to observe GRB positions given by Beppo-SAX or RXTE,EUV transients from ALEXIS alerts,etc.TAROT will also study a wide range of secondary objectives and will feature a complete automatic data analysis system,and a powerful scheduling software.TAROT will be installed this fall on the Plateau du Calern,1200m above sea level.We report on the status of the project.SCIENTIFIC GOALSCosmic Gamma-Ray BurstsThe T´e lescope `a Action Rapide pour les Objets Transitoires (Rapid Action Tele-scope for Transient Objects)has as primary objective the detection of optical tran-sients associated with gamma-ray bursts.Its construction was decided in 1995,at a time when the optical emission of GRBs was unknown,but predicted by a few models [1].At that time we thought that the best chance was to observe the GRB source in optical during its gamma-ray activity,meaning a fast moving wide field telescope.We also decided,given the various constraints,to reach a sensitivity level somewhat below the theoretical constraints,i.e.V min ≥16or 17.The recentdetection of the afterglow from GRB970228and GRB970508[2,3]at optical and X-ray wavelengths demonstrates that this objective is achievable,since given the time delays involved,the light emitted by GRB970508would have been easily detectable by TAROT-1.Popular models[4]invoke the chock of a relativisticfire-ball with the interstellar medium.TAROT will be able to detect it quite early, but also,it will detect the emission due to internal chocks within thefireball itself [5].In this later case,the optical emission is predicted to be simultaneous with the gamma-ray emission,and in the range of V magnitude between14and16[1].With a maximum delay of8seconds from the burst onset to the TAROT observation,we will be able to catch70%of the sources while they are still active,provided that the error box is small enough(4square degrees).In the case of BATSE we hope to detect one or two bursts per year within this delay.Detection of this emission by TAROT or by a similar experiment would be an important objective,since it may lead to the confirmation of the model,and give data on the physical source conditions.An early detection of afireball at a relatively high level(e.g.magnitude16)would trigger observations at larger telescopes,in order to take spectrum of the source itself,as well as of the host,and to detail the light curve of the optical transient from the beginning of the event,and to see the transition between the internal chock regime and the afterglow.Moreover,since TAROT has a largefield of view(4square degrees)and will operate continuously,it will be able to detect optical transients which may be related to undetected GRBs if the emission is beamed[6].Large areas of the sky will be surveyed both for secondary objectives and to establish a reference catalogue for later detection of GRB optical counterparts.This has two advantages.1)In the case we detect an object within the error box of a GRB,from the inspection of our catalogue we can precise its nature,real new object or variable orflaring object active at the GRB time;2)During this survey we will detect a large number of variable or new objects,since a substantial fraction of the sky will be observed every night.How we will be able to separate GRB afterglows from variable orflare stars is another problem which is currently under study,but the information will be in our data.Secondary ObjectivesAn automated,versatile telescope like TAROT has a wide range of possibles applications.Objects may be observed upon alert or in a systematic mode.In addition,the widefield of view will result in a lot of serendipitous detections.In alert mode we shall try to identify EUVE transients detected by the ALEXIS satellite and so far of unknown nature,as well as X-ray transients upon alert from the SAX,RXTE,BATSE,HETE-2,INTEGRAL,MOXE,etc.In the routine mode we plan to observe systematically several late typeflare stars in order to test our ability to detect optical transients.Our programme includes also the detection of supernovae,symbiotic stars,asteroids and comets.TABLE1.Summary of TAROT technical dataThe detailed program of TAROT is currently being elaborated and will be made available through our server and in later publications.TECHNICAL DESIGNThe actual design of TAROT is summarized in Table1.As it can be inferred from the table,the goal of observing GRBs while they are active has driven the design.We list below some technical features.•Mechanics:The mechanical design has been extensively studied in order to ensure the stability and the reliability of the telescope.The requirement was that TAROT should be able to track(without a guiding star)an object for at least5minutes,without any noticeable displacement on the CCD camera.Also,TAROT will accommodate wind speeds as high as80km/h(50mph).The behaviour of the mount has been simulated to ensure that no vibrations are generated during the acceleration/deceleration phase.•Motors and controls:The drives have been chosen in order to accomodate for the large accelerations needed by TAROT.They will be able to make a move to any point in less than3seconds,meaning a maximum speed of120 degrees/second.,and accelerations as large as100deg/s2.For simplicity,we decided to use the same motors for the declination and right ascension axis.All drives,including the focus andfilter wheel mechanisms are controlled from the telescope control software via a single PC card.An extensive protection of all electric and electronic parts is used against lightning.•Filter wheel:We use a custom designedfilter wheel with6positions.In addition to a transparent position,a set of standard Cousins B,V,Ifilters will be used,and two wide bandfilters,of transmission approximating the overall band pass of the B+V and R+Ifilters.SOFTW AREThe software is one of the most sensitive parts of TAROT,since it should run in complete autonomy.The interfaces for the alerts and routine observations will use the Web,the mail,and socket processes(for GCN/BACODINE).In addition, a local interface will be available,mainly for testing and debugging purposes.Our objective is that the telescope operates unmanned for periods as long as3months. Hence the control program will be responsible for night operations,day/night tran-sition,calibrations,focusing,etc.This software will take into account the data from the environmental sensors to decide what operation to perform,and will run the telescope accordingly.Routine operations can be interrupted at any time to process an alert.In addition the control software will perform general tasks such as housekeeping,logging...Routine observations,and follow-up alert observations will be scheduled through a particular software called the Majordome.This software implements several algo-rithms in order to ensure a maximum efficiency of the observations.Objects should be observed at minimal airmass(unless they are other constraints),and the num-ber of possible observations should be maximized,according to various parameters such as the Moon,user constraints,observation types(periodic,repeated,time tagged...)and priorities.If an alerts occurs,the routine program is interrupted, and the alert processed according to a predefined sequence.The alert modifies in turn the input of the Majordome in order to introduce follow-up observations. We began to design a module to process automatically the data taken by TAROT. Our decision was based on the fact that TAROT will produce an average of3Gb per night,and on the necessity to react quickly after an alert.This software will produce a list of sources detected in the image,together with their characteristics (photometry,spatial extension,apparent motion,etc.)will compare each object with the TAROT database(whenever possible),and with other available catalogues to search for a possible variability,or change in properties,or to detect candidate new objects.In order to ensure their nature,each observation will be done twice. In addition to the above mentionned routine and alert mode,TAROT will be able to scan the sky according to two modes:in imaging mode we take a normal2K x2K image,and in scanning mode the telescope scans a wide area,while the CCD is read-out continuously.This later mode will be mainly used for BACODINE/BATSE alerts.In this mode a typical error box is scanned in less than5minutes.The scanning mode may be used also to build quickly afirst database of TAROT objects, to a limiting magnitude of17(V).CURRENT SCHEDULEThe mechanics and the optics of TAROT have been delivered and integrated in September1997together with the drives.The software is currently being integrated and tested in the lab.,and the optics will soon be submitted to interferometric measurements.This fall(1997),the telescope will be moved to itsfinal location,the”Plateau du Calern”,1200m above sea level and French Riviera.It will be installed in a building with a fully retractable roof,which has been recently refurbished in order to ensure maximum sky coverage.After that the telescope will enter in an extensive test period(mechanics,soft-ware,security checks,optics,scientific validation...).During it we hope to be able to receive alerts at least through the GCN network.Routine scientific observations and automatic image processing should start running during the second semester of1998.CONCLUSIONThough its dimensions are rather modest,TAROT will be a very efficient in-strument,optimized for its prime objective,the detection of high energy tran-sients.Given that5seconds are needed to obtain the coordinate information from BATSE/BACODINE or HETE-2,TAROT will be able to get data from the source less than8second after the burst onset,while most sources are still active,and to eventually detect the internal chock from the GRBfireball.TAROT will be able also to estimate the background of transient events over the sky,to detect putative ”optical GRBs”,and to address a wide range of secondary objectives.Its schedule is well in accordance with BATSE,SAX,RXTE and HETE-2satellites. AcknowledgementsThe TAROT project is funded by the Centre National de la Recherche Scien-tifique(CNRS/INSU)in France,and by the Carlsberg Fondation in Denmark.REFERENCES1.M´e sz´a ros,P.,and Rees,M.,1994,ApJ,432,181.2.Costa,E.et al.,1997,Nature,387,783.3.Piro et al.,1997,IAUC6656.4.Wijers,R.A.M.J.,Rees,M.J.,and M´e sz´a ros,P.,1997,MNRAS,288,L51.5.M´e sz´a ros,P.,and Rees,M.J.,1997,ApJ,476,232.6.Rhoads,J.E.,1997,ApJ,487,L1.。