• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript tools.env函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中@toba/tools.env函数的典型用法代码示例。如果您正苦于以下问题:TypeScript env函数的具体用法?TypeScript env怎么用?TypeScript env使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了env函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: env

import { env } from '@toba/tools';
import { OwnerConfig, SiteConfig } from '@trailimage/models';

/** Site domain name. */
export const domain = 'trailimage.com';

const url = `http://www.${domain}`;

export const owner: OwnerConfig = {
   name: 'Jason Abbott',
   image: {
      url: url + '/img/face4_300px.jpg',
      width: 300,
      height: 300
   },
   email: env('EMAIL_CONTACT', null),
   urls: [
      'https://www.facebook.com/jason.e.abbott',
      'http://www.flickr.com/photos/boise',
      'https://www.youtube.com/user/trailimage',
      'https://twitter.com/trailimage'
   ]
};

export const site: SiteConfig = {
   domain,
   title: 'Trail Image',
   subtitle: 'Adventure Photography by ' + owner.name,
   description:
      'Stories, images and videos of small adventure trips in and around the state of Idaho',
   url,
开发者ID:Trail-Image,项目名称:blog,代码行数:31,代码来源:models.ts


示例2: env

   /**
    * Characters separating title and subtitle in library source. Posts with
    * different subtitles but the same title are considered parts of a series
    */
   subtitleSeparator: ':',
   /** Photo EXIF is only shown for named artists */
   artistNames: ['Abbott', 'Wright', 'Bowman', 'Thomas', 'Reed'],
   /** Key (slug) of root category to display on home page */
   defaultCategory: 'when'
};

export const config = {
   env,
   domain,
   /** Whether to redirect `HTTP` requests to `HTTPS`. */
   requireSSL: env('REQUIRE_SSL', '') == 'true',

   /** Whether any provider needs authorization tokens */
   //    get needsAuth(): boolean {
   //       const f = flickr.auth.token.access;
   //       const g = google.auth.token.access;
   //       return f === null || f === '' || g === null || g === '';
   //    },
   proxy: env('HTTPS_PROXY', null),

   /** When the application started. Used for cache busting. */
   timestamp: new Date().getTime(),

   /**
    * Whether site is running tests. This is only needed in a few particular
    * cases, such as setting the `isProduction` flag while using response
开发者ID:Trail-Image,项目名称:blog,代码行数:31,代码来源:index.ts


示例3: env

import { env } from '@toba/tools';
import { mapSource } from './mapsource';

export const bing = {
   key: env('BING_KEY', null)
};

/**
 * https://developers.facebook.com/docs/reference/plugins/like/
 * https://developers.facebook.com/apps/110860435668134/summary
 */
export const facebook = {
   appID: '599065673763481',
   pageID: '241863632579825',
   siteID: '578261855525416',
   adminID: '1332883594',
   enabled: true,
   authorURL: 'https://www.facebook.com/jason.e.abbott'
};

export const google = {
   apiKey: env('GOOGLE_KEY', null),
   projectID: '316480757902',
   analyticsID: '22180727', // shown as 'UA-22180727-1
   searchEngineID: env('GOOGLE_SEARCH_ID', null),
   blogID: '118459106898417641'
};

export const mapbox = {
   accessToken: env('MAPBOX_ACCESS_TOKEN'),
   style: {
开发者ID:Trail-Image,项目名称:blog,代码行数:31,代码来源:vendors.ts


示例4: env

import { env } from '@toba/tools';
import { Token } from '@toba/oauth';
import { ProviderConfig } from '@trailimage/google-provider';
import { domain } from './models';
import { mapSource } from './mapsource';

/**
 * @see http://code.google.com/apis/console/#project:1033232213688
 */
export const mapProvider: ProviderConfig = {
   api: {
      apiKey: env('GOOGLE_DRIVE_KEY'),
      folderID: '0B0lgcM9JCuSbMWluNjE4LVJtZWM',
      cacheSize: 0,
      useCache: false,
      auth: {
         apiKey: '',
         clientID: env('GOOGLE_CLIENT_ID'),
         secret: env('GOOGLE_SECRET'),
         callback: 'http://www.' + domain + '/auth/google',
         token: {
            type: null,
            access: env('GOOGLE_ACCESS_TOKEN', null),
            accessExpiration: null as Date,
            refresh: env('GOOGLE_REFRESH_TOKEN')
         } as Token
      }
   },
   minimumTrackLength: 0.2,
   minimumTrackPoints: 5,
   maxPointDeviationFeet: 0.5,
开发者ID:Trail-Image,项目名称:blog,代码行数:31,代码来源:map-provider.ts


示例5: env

   api: {
      userID: '60950751@N04',
      appID: '72157631007435048',
      timeZoneOffset: -7,
      searchPhotoSizes: [Flickr.SizeCode.Square150],
      // setPhotoSizes will be copied from provider configuration
      excludeSets: ['72157631638576162'],
      excludeTags: [
         'Idaho',
         'United States of America',
         'Abbott',
         'LensTagger',
         'Boise'
      ],
      maxRetries: 10,
      retryDelay: 300,
      useCache: true,
      maxCacheSize: 500,
      auth: {
         apiKey: env('FLICKR_API_KEY'),
         secret: env('FLICKR_SECRET'),
         callback: 'http://www.' + domain + '/auth/flickr',
         token: {
            access: env('FLICKR_ACCESS_TOKEN', null),
            secret: env('FLICKR_TOKEN_SECRET', null),
            request: null as string
         } as Token
      }
   }
};
开发者ID:Trail-Image,项目名称:blog,代码行数:30,代码来源:post-provider.ts



注:本文中的@toba/tools.env函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript tools.is类代码示例发布时间:2022-05-28
下一篇:
TypeScript tools.addCharSet函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap