Skip to content

Light Up The Map was started by a group of Western Mass moms who were fed up with the slow pace of climate legislation. Our children's futures and health will not wait. We knew we needed to activate more people and more Representatives, and fast.

Notifications You must be signed in to change notification settings

hackforwesternmass/lightupthemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hack for Western Mass process for working on this site.

  • Pick an issue from the queue
  • Make a branch and name it after the issue number, example: 12345-fix-css
  • Do your work in that branch (see note at bottom of this for how to compile SASS if you are doing CSS work)
  • Push that branch: git push origin 12345-fix-css
  • Optional: you can link a commit to an issue by adding #issuenumber, example git push origin 12345-fix-css #12345
  • File a pull request through the Github UI

Deploying to Pantheon (Rick Hood does this for now)

  • Pick a pull request
  • Reveiw it however you like.
  • When all OK, merge the pull request on Github.
  • Do git checkout master
  • On local, git fetch github
  • Then git merge github/master
  • Then push to Pantheon: git push origin master (Note Rick has two remotes: in his case "origin" is Pantheon and "github" is Github. In your case "origin" = Github. Possible to do: Rick change his local git to rename "origin" to "pantheon" and "github" to "origin".)

Local Setup Using Lando for Local Dev Stack

  • Get lando: https://docs.lndo.io

  • Clone the repo into a folder where you want the local site to be:

    • git clone https://github.com/hackforwesternmass/lightupthemap.git foldername
  • cd into that folder:

    • cd foldername
  • Start the app:

    • lando start
    • It installs a bunch of stuff when when it finishes it looks like this:

    BOOMSHAKALAKA!!!

    Your app has started up correctly. Here are some vitals:

    NAME lightupthemap LOCATION /Users/username/path_to_folder SERVICES appserver, nginx, database, cache, edge_ssl, edge, index, node-cli URLS https://localhost:32771 http://localhost:32772 https://localhost:32775 http://localhost:32774 http://lightupthemap.lndo.site https://lightupthemap.lndo.site

  • Import the DB

    • Get the DB from H4WM Google Drive
    • Import with lando: lando db-import name_of_db_file.sql.gz
  • To get logged in as admin

Lando will install npm, gulp, composer and allows you to use those tools.

  • To watch the theme sass files:
    • lando gulp watch
  • To get usefule info about your app like connecting the DB container use:
    • lando info

Local setup using your own local stack (MAMP or whatever)

  • Clone the repo to wherever you keep your local sites
  • cd into that folder and run npm install
  • Create a database and import the database dump (ask Rick Hood if you do not know where that is)
  • You copy /sites/example.settings.local.php to /sites/default/settings.local.php
  • Put your local database setting in settings.local.php like this (put it at the bottom of the file):

$settings['install_profile'] = 'standard'; $databases['default']['default'] = array ( 'database' => 'light_up', 'username' => 'root', 'password' => 'password', 'prefix' => '', 'host' => 'localhost', 'port' => '3306', 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', 'driver' => 'mysql', );

Change database, username and password appropriately for your local.

Notes on theme used (needed for css work)

  • The theme uses SASS. SCSS files are located in /themes/custom/lightup/sass

  • Compile SASS by runnning gulp compile:sass or gulp watch:sass in the root of the site.

  • These are all the available gulp tasks: gulp gulp build gulp build:dev gulp clean gulp clean:css gulp clean:styleguide gulp compile:sass gulp compile:styleguide gulp lint:js gulp lint:css gulp minify:css gulp serve gulp test:css gulp watch gulp watch:js gulp watch:sass gulp watch:styleguide

  • When you cd into /themes/custom/lightup you will probably need to: nvm use 4.4.4

Above should be all you need, below is more info.

About

Light Up The Map was started by a group of Western Mass moms who were fed up with the slow pace of climate legislation. Our children's futures and health will not wait. We knew we needed to activate more people and more Representatives, and fast.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published