当前位置: 首页 > 软件库 > 程序开发 > >

ember-osf-preprints

授权协议 Apache-2.0 License
开发语言 JavaScript
所属分类 程序开发
软件类型 开源软件
地区 不详
投 递 者 南门鸿哲
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

ember-osf-preprints

master Build Status: Master Build Status

develop Build Status: Develop Build Status

This is the codebase for OSF preprints.This guide will help you get started if you're interested.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone this repository
    • To pull in local preprint provider assets as well, use git clone --recursive instead (assuming you are using git >= 1.6.5).
  • yarn install --frozen-lockfile
  • bower install

Preprint Provider Assets

If you will be using local preprint provider assets (rather than the CDN):

  1. If you did not clone the repository using --recursive, run: git submodule update --init --recursive
  2. Set the PROVIDER_ASSETS_URL environment variable to 'local'

Updating Assets

  • To refresh your local assets, run: git submodule update
  • To update the assets submodule to the latest assets, run: npm run update-assets
  • To update to the latest assets and create a hotfix, run: npm run updates-assets-hotfix

Running / Development

For local development, this is designed to run alongside (and from within) the flask application for osf.io.

  1. Check out this OSF feature branch: https://github.com/CenterForOpenScience/osf.io/tree/feature/ember-preprints
  2. Start your Ember server: ember serve
  3. Copy these linesto your website/settings/local.py file. Uncomment '/preprints/': 'http://localhost:4200', and restart your flask app.
  4. Visit your app at http://localhost:5000/preprints/

Provider Domains

  1. Start the API server
  2. Run sudo ./scripts/add-domains.js. This will add the domains to your /etc/hosts. Use --dry for a dry run.
  3. Visit your app at one of the provider domains with https://local.<domain>:4200 (e.g. http://local.socarxiv.org:4200)

If you encounter problems, make sure that your version of ember-osf is up to date. If login fails, try logging in fromany other OSF page, then returning to the preprints app.

Generating test data on the OSF

There are a few scripts to run to populate your local preprint providers list, and help generate some "fake" preprints locally so you can begin testing using the OSF API.

  • Populate the OSF's PreprintProvider model with data:

python -m scripts.populate_preprint_providers

  • Populate the OSF's Subject model with data:

python -m scripts.update_taxonomies

  • Create "fake" preprints using some additional arguments to the create_fakes script:

python -m scripts.create_fakes -u user@email.io --nprojects 2 --preprint True --preprintprovider osf,psyarxiv

notes: You can enter as many providers as you like, separated by commas. Also, this script does not currently create actual fake files, only fake file metadata; the file itself won't render in a preprint view, but you can still request its information from the API.

Code Generators

Make use of the many generators for code, try ember help generate for more details

Running Tests

You can run tests either with ember installed on your machine or by using Docker

On your local machine

  • ember test
  • ember test --server

With Docker

  • docker build --tag preprints .
  • docker run preprints

Building

  • ember build (development)
  • ember build --environment production (production)

Further Reading / Useful Links

 相关资料
  • ember-osf-web master build develop build A front end for osf.io. Prerequisites You will need the following things properly installed on your computer. osf.io back end Git Node.js (with NPM) Ember CLI

  • OSF

    OSF 是一个开放、自由、分享的内容社区类网站原型,实现多用户,内容的发布、评论、喜欢,消息传递,Feed流,标签分类等内容社区类网站通用功能。你可以用OSF构建一个单纯的社交网站,也可以加入标签成为一个兴趣社区,甚至两者皆可,这一切OSF都已为你提供。 主要功能 邮箱注册激活验证 多用户、用户间互相关注 标签系统 Feed流 关注用户Feed 关注标签Feed 说说、日志、相册 评论、回复 通知

  • Ember检查器是一个浏览器插件,用于调试Ember应用程序。 灰烬检查员包括以下主题 - S.No. 灰烬检查员方式和描述 1 安装Inspector 您可以安装Ember检查器来调试您的应用程序。 2 Object Inspector Ember检查器允许与Ember对象进行交互。 3 The View Tree 视图树提供应用程序的当前状态。 4 检查路由,数据选项卡和库信息 您可以看到检查

  • 英文原文: http://emberjs.com/guides/getting-ember/index/ Ember构建 Ember的发布管理团队针对Ember和Ember Data维护了不同的发布方法。 频道 最新的Ember和Ember Data的 Release,Beta 和 Canary 构建可以在这里找到。每一个频道都提供了一个开发版、最小化版和生产版。更多关于不同频道的信息可以查看博客

  • ember-emojione ember-emojione is your emoji solution for Ember, based on the EmojiOne project. EmojiOne version 2 is used, which is free to use for everyone (CC BY-SA 4.0), you're only required to giv

  • Ember 3D Ember 3D is an Ember addon for using Three.js - an easy to use, lightweight, javascript 3D library. It is designed to: Prescribe a solid file structure to Three.js code using ES6 modules. Ena