All Projects → StreetSupport → streetsupport-web

StreetSupport / streetsupport-web

Licence: MIT license
Helping people facing homelessness across the UK to find services in their area, and connecting people who want to help to where it is needed most.

Programming Languages

javascript
184084 projects - #8 most used programming language
Handlebars
879 projects
SCSS
7915 projects

Projects that are alternatives of or similar to streetsupport-web

generator-vars-jekyll
Generator for raw web app with CircleCI, Jekyll, Webpack, Express + more.
Stars: ✭ 18 (-14.29%)
Mutual labels:  gulp
gulp-optimize-js
No description or website provided.
Stars: ✭ 23 (+9.52%)
Mutual labels:  gulp
eixample
Multi-Tenant .NET 6 Architecture (Angular, Vue, React)
Stars: ✭ 61 (+190.48%)
Mutual labels:  knockoutjs
metalsmith-convert
Convert images with imagemagick (via imagemagick-native).
Stars: ✭ 17 (-19.05%)
Mutual labels:  metalsmith
odie-client
odie-client is a Knockout.js frontend to odie-server
Stars: ✭ 13 (-38.1%)
Mutual labels:  knockoutjs
gulp-webpack-demo
No description or website provided.
Stars: ✭ 12 (-42.86%)
Mutual labels:  gulp
Asteroids
Yep, a gulp-ready-nunjucks-lover-sass-powered-and-humanstxt-included html starter kit!
Stars: ✭ 15 (-28.57%)
Mutual labels:  gulp
file-include-webpack-plugin
A webpack plugin to include files using @@ include syntax in html files, like gulp-file-include
Stars: ✭ 16 (-23.81%)
Mutual labels:  gulp
gulp-twig-scss
Gulp, Twig and SCSS
Stars: ✭ 15 (-28.57%)
Mutual labels:  gulp
gulp-iife
A Gulp plugin for wrapping JavaScript code in IIFEs.
Stars: ✭ 39 (+85.71%)
Mutual labels:  gulp
gulp-starter-kit
My Gulp Starter Kit
Stars: ✭ 91 (+333.33%)
Mutual labels:  gulp
wx-mini
运用webpack编译构建小程序的脚手架(稳定版)
Stars: ✭ 21 (+0%)
Mutual labels:  gulp
docker-npm
npm, yarn, node, npx, bower, grunt, gulp, generate-md - build and dev tools.
Stars: ✭ 53 (+152.38%)
Mutual labels:  gulp
generator-speedseed
Oriented to components, allow create/choice template, multiple configuration with easy maintenance
Stars: ✭ 13 (-38.1%)
Mutual labels:  gulp
metalsmith-jquery
A Metalsmith plugin to manipulate HTML via jQuery syntax
Stars: ✭ 13 (-38.1%)
Mutual labels:  metalsmith
gulp-asciidoctor
gulp-asciidoctor
Stars: ✭ 14 (-33.33%)
Mutual labels:  gulp
gulp-tinypng-compress
TinyPNG API wrapper for compressing PNG & JPG images
Stars: ✭ 49 (+133.33%)
Mutual labels:  gulp
electron-angular-ngrx
An Angular (6x) Electron seed featuring @angular/cli, @ngrx/platform, and Typescript. Complete with HMR workflow
Stars: ✭ 39 (+85.71%)
Mutual labels:  gulp
Carbon.Gulp
Carbon/Gulp is a delicious blend of tasks and build tools poured into Gulp to form a full-featured modern asset pipeline for Flow Framework and Neos CMS.
Stars: ✭ 15 (-28.57%)
Mutual labels:  gulp
markdown
A metalsmith plugin to render markdown files to HTML.
Stars: ✭ 58 (+176.19%)
Mutual labels:  metalsmith

StreetSupport Website

This repository is for the Street Support website, found at https://streetsupport.net. The website helps people facing homelessness find services in their area, as as well as sign-posting people wanting to help, to where it is needed. The site acts as a gateway into Street Support's broader remit of helping connect organisations, people with lived experience, policy-makers, and businesses to co-produce lasting solutions.

Contributing

I will be adding any updates we receive from our users as issues on Github. Please fork and work in the develop branch. Once the update is completed, submit a pull request into develop. Travis CI automatically builds on each commit to develop, uat and prod.

I would also appreciate any issues/PRs for bugs you may come across, and general fixes/refactorings. Where possible, please write a test that covers your code change.

Build Status

Install

  • Install the latest stable Node version,
  • Run in Terminal: npm i gulp-cli -g (Gulp does not need to be installed globally),
  • In your command line terminal, navigate to the street support project folder,
  • Run: npm i

See Installation Troubleshooting section if Installation fails

See https://github.com/fephil/garrus for more information about the Frontend workflow.

Optional Installs

In your editor of choice, the following plugins are recommended but not required. Note the plugin names might be slightly different depending on your editor.

  • editorconfig,
  • tabs-to-spaces,
  • linter,
  • linter-handlebars,
  • linter-js-standard,
  • linter-stylelint.

Usage

Run these tasks in your command line Terminal:

gulp [--production] [--debug]

gulp deploy [--production] [--debug]

gulp auditcode

  • The gulp task builds the website, watches for changes and starts up a sever,
  • The gulp deploy task builds the website without watching for changes or running the server,
  • The gulp auditcode task runs various linting on the project source files,
  • The gulp jsdev task only checks and builds javascript with associated tests,
  • The --production flag builds minified assets with no sourcemaps,
  • The --debug flag shows the files being created in each task (if the task has a pipe).

Environments

There are three API environments: CI, UAT and LIVE. You can alter the API your local instance is running from by editing /blob/develop/src/js/env.js:

  • 0: locally running API instance
  • 1: CI
  • 2: UAT
  • 3: LIVE

Day-to-day development should point at CI.

Development

Workflow

On running the default gulp task from the terminal, it will run tests and linting, build the site into the /_dist/ directory, and then launch in your default browser. As you edit files in the /src/ directory, the site will refresh automatically.

Pages

Each page of the site is found under the /pages/ directory. Each page is represented by a handlebars file index.hbs, in a directory named after the page's url. In each .hbs file, meta data is entered to define the page:

  • title: the page's title tag
  • description: the page's meta description
  • layout: the master layout file (found in /layouts/)
  • permalink: ???
  • jsBundle: the js bundle that will be loaded into the page. Bundles are defined in /webpack.config.js and each one points to a js file in /src/js/. For basic pages, use generic.
  • section: the top level navigation item this page belongs to. See /src/scss/modules/_variables.scss for list of sections
  • page: the navigation item for this page. See /src/scss/modules/_variables.scss for list of pages

Page templating is done using Hogan. Note: template parts need to be escaped eg:

\{{myVariable}}

Knockout data-binding is also used in some pages.

Javascript

Page code-behinds are written in plain ol' Javascript, or use Knockout. Knockout view models are found in /js/models/ are mostly tested. ES2015 syntax is transpiled using Babel.

Testing

Tests reside in the /spec directory, and are written using Jasmine and Sinon. Please ensure any features submitted via pull request are covered by tests.

A number of happy paths are covered by automated browsers tests at: https://github.com/StreetSupport/web-automated-testing.

Styling

CSS styling is written in SCSS, based on Susy, in the BEM style, and is auto-prefixed. Build with a mobile-first approach, using sass-mq for media queries. Each component's styles should reside in its own file. Avoid nesting of elements and modifiers (although there are many cases of nesting at the moment!).

Installation troubleshooting

Gulp Native Code Crashes

gulp[62193]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.

Caused by: One of gulp's dependencies are out of date

Solution: Uninstall and reinstall Node Modules

rm -rf node_modules
npm i

Node Sass

ERROR in Missing binding <PROJECT_DIR>/node_modules/node-sass/vendor/darwin-x64-11/binding.node
Node Sass could not find a binding for your current environment: <ENVIRONMENT> with Node <NODE_VERSION>

Caused by: switching node versions

Solution: Rebuild Project

npm rebuild

Cannot download PhantomJS

Caused by: network blocking download

Solution: use an alternative network (best to run npm i before attending)

Others

If there are problems that aren't mentioned here, post in the slack channel so we can help out and update these docs.

Supported by

Browser Stack

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].