All Projects → manabuyasuda → website-template

manabuyasuda / website-template

Licence: MIT license
静的Webサイト制作を少しモダンにするためのテンプレート

Programming Languages

HTML
75241 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to website-template

gulp-boilerplate
Gulp boilerplate
Stars: ✭ 24 (-61.29%)
Mutual labels:  stylelint, gulp, pug
Generator Dhboilerplate
Boilerplate made by David Hellmann
Stars: ✭ 54 (-12.9%)
Mutual labels:  stylelint, gulp
Frontend-StarterKit
Frontend StarterKit - [Gulp 4, Pug, SCSS, ES6+]
Stars: ✭ 13 (-79.03%)
Mutual labels:  gulp, pug
Stylelint Prettier
Stylelint plugin for Prettier formatting
Stars: ✭ 188 (+203.23%)
Mutual labels:  stylelint, prettier
Magento2 Frontools
Set of front-end tools for Magento 2 based on Gulp.js
Stars: ✭ 416 (+570.97%)
Mutual labels:  stylelint, gulp
React Mobx React Router Boilerplate
A simple boilerplate based on create-react-app and add mobx, react-router, linter, prettier and so on. 一个简单的 react 脚手架依赖于 create-react-app 新增了 mobx react-router,linter,prettier 等。
Stars: ✭ 12 (-80.65%)
Mutual labels:  stylelint, prettier
Prettier Stylelint
code > prettier > stylelint > formatted code
Stars: ✭ 162 (+161.29%)
Mutual labels:  stylelint, prettier
dva-typescript-antd-starter-kit
A admin dashboard application demo based on antd by typescript and dva
Stars: ✭ 61 (-1.61%)
Mutual labels:  stylelint, prettier
starter-kit
🏃 A simple and powerful Starter Kit made with Webpack, Gulp 4, Pug and SASS
Stars: ✭ 21 (-66.13%)
Mutual labels:  stylelint, gulp
eslint-config-ns
ESLint config ready to be used in multiple projects. Based on Airbnb's code style with prettier, jest and react support.
Stars: ✭ 27 (-56.45%)
Mutual labels:  stylelint, prettier
ultimate-hot-boilerplate
🚀 node-react universal app boilerplate with everything on hot reload, SSR, GraphQL, Flow included
Stars: ✭ 35 (-43.55%)
Mutual labels:  stylelint, prettier
React 2048 Game
🎮 A fancy 2048 game build with react, redux best practices.
Stars: ✭ 401 (+546.77%)
Mutual labels:  stylelint, prettier
Web Configs
Common configurations for building web apps at Shopify
Stars: ✭ 302 (+387.1%)
Mutual labels:  stylelint, prettier
React Ssr Starter
All have been introduced React environment
Stars: ✭ 20 (-67.74%)
Mutual labels:  stylelint, prettier
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (-11.29%)
Mutual labels:  stylelint, prettier
Nextjs Ts
Opinionated Next JS project boilerplate with TypeScript and Redux
Stars: ✭ 134 (+116.13%)
Mutual labels:  stylelint, prettier
Shangchao-Website
(官网案例) - 上朝科技 - Vue 2.0 - SPA项目
Stars: ✭ 22 (-64.52%)
Mutual labels:  gulp, pug
figma-plugin-typescript-boilerplate
Figma plugin TypeScript boilerplate to start developing right away
Stars: ✭ 43 (-30.65%)
Mutual labels:  stylelint, prettier
ember-boilerplate
👓 The stable base upon which we build our Ember.js projects at Mirego.
Stars: ✭ 33 (-46.77%)
Mutual labels:  stylelint, prettier
spec
🐣 easy to use eslint/stylelint/tslint/prettier/...
Stars: ✭ 60 (-3.23%)
Mutual labels:  stylelint, prettier

Website Template

静的なWebサイトを作るためのテンプレートです。
なるべく多くの人が使えて、少しモダンな制作環境になることを目指しています。

以下のページで詳しく確認できます。

確認環境

以下の環境で動作の確認をしています。

  • macOS High Sierra 10.13.6
  • Node.js 10.16.0

Node.jsのバージョンはnodenvで固定しています。

始め方

開発に必要なパッケージなどは以下のコマンドですべてインストールされます。クローン、またはダウンロードをしたあとに実行してください。

npm install

ファイル構成

開発はsrcディレクトリでおこない、テスト用の一時ファイルはhtdocsディレクトリに出力されます。
staticディレクトリは、Gulpの処理は必要ないけれど、ファビコンや共通ファイルのような最終的にhtdocsディレクトリに含めたいファイルを置きます。
templateディレクトリはPugファイルのテンプレートです。このテンプレートを元にファイルを作成してください。

root/
├── src/
│   ├── _data/
│   │   └── ja/
│   │       └── site.json
│   ├── _mixin/
│   │   ├── _all.pug
│   │   ├── _breadcrumb.pug
│   │   └── _picture.pug
│   ├── _partial/
│   │   ├── _script.pug
│   │   └── ja/
│   │       ├── _footer.pug
│   │       ├── _header.pug
│   │       └── _meta.pug
│   ├── _template/
│   │   └── ja/
│   │       └── _default.pug
│   ├── about/
│   │   └── index.pug
│   ├── assets/
│   │   ├── css/
│   │   │   ├── base/
│   │   │   │   ├── variable/
│   │   │   │   ├── function/
│   │   │   │   ├── mixin/
│   │   │   │   ├── _normalize.scss
│   │   │   │   └── _base.scss
│   │   │   ├── namespace/
│   │   │   │   ├── sitewide/
│   │   │   │   ├── structure/
│   │   │   │   ├── layout/
│   │   │   │   ├── home/
│   │   │   │   └── top/
│   │   │   ├── _print.scss
│   │   │   ├── site.scss
│   │   │   └── styleguide/
│   │   ├── svg/
│   │   ├── img/
│   │   │   ├── sitewide/
│   │   │   ├── structure/
│   │   │   └── namespace/
│   │   └── js/
│   │       ├── site.js
│   │       ├── polyfill.js
│   │       ├── util.js
│   │       └── namespace/
│   │           ├── data/
│   │           └── js/
│   └── index.pug
├── static/
├── template/
│   ├── index.html
│   ├── ssi/
│   ├── ja/
│   └── en/
├── htdocs/
├── document/
│   ├── css.md
│   ├── html.md
│   ├── image.md
│   ├── js.md
│   └── icon.md
├── aigis/
├── config/
├── README.md
├── package.json
└── gulpfile.js

開発用タスク

以下のコマンドを実行すると、開発に必要なGulpとwebpackのタスクがすべて実行されます。

npm start

本番環境用にビルドする場合は以下のコマンドを実行します。

npm run release

本番環境の動作を検証したい場合は以下のコマンドを実行します。

npm test

HTML・CSS・JSの整形とリントをまとめて実行します。
(少なくとも)エラーが出ない状態にしてからプッシュします。

npm run lint

HTMLHintgulp-w3cjsでHTMLのリントとW3Cのバリデーションを実行します。

npm run htmlValidate

stylelint-config-standardを元にSassのリントを実行します。

npm run stylelint

Airbnb JavaScriptスタイルガイドeslint-plugin-vueを元にJavaScriptのリントを実行します。

npm run eslint

以下のような処理がおこなわれます。

  • PugをHTMLにコンパイル
  • SassをCSSにコンパイル
  • JSをES5にコンパイル(Vue.jsの単一ファイルコンポーネントも変換する)
  • SVGスプライトの生成
  • ローカルサーバーを立ち上げて動作の確認(static以下のHTMLファイルはSSIにも対応)
  • HTMLのリント
  • Sass(CSS)のリント
  • JavaScriptのリント
  • スタイルガイドの生成

対象ブラウザ

デフォルトでは下記のようなブラウザを対象にしています。

  • IE11以降
  • iOS11以降
  • Android5.1以降
  • その他ブラウザは最新版

browser-syncをhttpsで起動する

APIの実行にhttps環境が必要な場合は、以下の設定が必要です。以降の設定はmacOSでの動作を確認しています。

.env.example.envのサンプルファイル)から.envを作成します。

cp .env.example .env

.envHTTPS_KEYHTTPS_CERTに証明書へのパスを設定します。.env内の#以降がコメントになります。

#browser-syncで`https`オプションを使用する場合にコメントを解除します
#証明書の発行方法はドキュメント「https」を参照してください
#HTTPS_KEY=/Users/<ユーザー名>/<IPアドレス>-key.pem
#HTTPS_CERT=/Users/<ユーザー名>/<IPアドレス>.pem

証明書の発行方法は以下のドキュメントを参照してください。

https.md

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].