Giter Site home page Giter Site logo

togomedium-web's Introduction

TogoMedium Web

About

本レポジトリは、togomedium.org におけるWebサイトのソースコードを管理するためのレポジトリです。

必要環境

  • NodeJS及びyarnの最新安定版
  • 本要件は開発・修正作業を行うPCに対する要件でありではありません

.envについて

本レポジトリでは、環境変数を管理するために .env ファイルを使用しています。
本番環境で動作させるためには.env ファイルは、以下のように記述します。 開発中は適宜参照先を変更してください。

URL_API=http://togomedium.org/sparqlist/api/
URL_STANZA=https://dbcls.github.io/togomedium-stanza/

Install

yarn install

Scripts

yarn webpack

public にファイルを書き出す

yarn serve

上記 webpack に加えてbrowserSyncサーバーを起動する。
確認用URLは以下
http://localhost:9000/

yarn build

上記 webpack と同等かつ圧縮・難読化を行う。デプロイ前に使用する。
圧縮設定は webpack.config.ts から変更可能。

Lint / Code format

本プロジェクトでは ESLint, StyleLint 及び prettier を採用している。以下の拡張子に対して保存時に自動で適用されるようにエディターの設定を行うこと。

  • ESLint : js,jsx,ts,tsx
  • StyleLint : scss
  • prettier : js,jsx,ts,tsx,json,yaml,pug,scss,css

Rewrite Rule

デプロイ時にはサーバーに応じて以下のリライトルールを設定してください。

nginx

location / {
  rewrite ^/medium/$ /medium/index.html break;
  rewrite ^/medium/.*$ /medium/detail.html break;
  rewrite ^/organism/$ /organism/index.html break;
  rewrite ^/organism/.*$ /organism/detail.html break;
  rewrite ^/component/$ /component/index.html break;
  rewrite ^/component/.*$ /component/detail.html break;
  rewrite ^/taxon/$ /taxon/index.html break;
  rewrite ^/taxon/.*$ /taxon/detail.html break;
}

Apache

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^taxon/$ /taxon/index.html [END]
RewriteRule ^taxon/.+$ /taxon/detail.html [END]
RewriteRule ^medium/$ /medium/index.html [END]
RewriteRule ^medium/.+$ /medium/detail.html [END]
RewriteRule ^organism/$ /organism/index.html [END]
RewriteRule ^organism/.+$ /organism/detail.html [END]
RewriteRule ^component/$ /component/index.html [END]
RewriteRule ^component/.+$ /component/detail.html [END]

togomedium-web's People

Contributors

satoshionoda avatar skwsm avatar

Watchers

Toshiaki Katayama avatar Tazro Inutano Ohta avatar James Cloos avatar Hiromasa Ono avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.