development environment

Setting up JS workspace

Submitted by Nicolabell on Mon, 02/17/2020 - 19:39

Download node.js from https://nodejs.org/en/ (download recommended version). This should also download npm (node package manager).

The GUI did work but I had to close and re-open the command prompt in order to see that. 

Check that npm has been installed with npm -v. 

Nav to correct directory and go through npm init.

npm will have created a bunch of files - the package.json file will appear in the directory.

Setting LPN local site up with VSCode Live Server / Sass

Submitted by Nicolabell on Sat, 07/27/2019 - 20:05

Today I've been trying to get the local LPN site set up with some extensions on VSCode so that we can use this to compile Sass and see changes to theming immediately in the browser.

I've followed Nigel's instructions at http://178.128.162.13/oyster/node/954

Currently I've got to the point where I want to get the extension to open the site in the browser, so I can start the application watching and compiling sass, but for some reason it is currently opening the directory and not loading the site:

Gulp and Sass for LPN - day 2

Submitted by Nicolabell on Mon, 06/03/2019 - 15:19

This is day 2 of me trying to get Gulp and Sass working for the LPN local development environment. I had to give up yesterday due to a problem with ddev which seems to be resolved for now (but for just how long...) See first attempt at this.

Today I've got as far as installing gulp in the custom theme folder using sudo npm install gulp

When trying to run gulp I'm not confronted with:

module.js:549
    throw err;
    ^

Setting up Gulp and Sass for LPN site theming

Submitted by Nicolabell on Sun, 06/02/2019 - 13:36

Today I am trying to get Gulp to watch my sass changes for the LPN development environment, so that I can start branching theme changes and push them to our remote repo on Github.

I'm following Nigel's instructions re. Gulp at http://178.128.162.13/oyster/node/875

1. I used ddev describe to get the port

2. used sudo nano on gulpfile.js but I couldn't see which line 30 was so opened this up in Visual Studio Code which gave me the line numbers. Pasted the post in here:

Setting up Twig debugging for the LPN site (local)

Submitted by Nicolabell on Sat, 05/25/2019 - 14:54

settings.local.php calls sites/development.services.yml. Edit this and add to the parameters stanza, as follows

parameters:

  http.response.debug_cacheability_headers: true

  twig.config:

    debug: true

    auto-reload: true

    cache: false

----

 

This disables cache and provides twig template annotation for debugging when using dev tools in the browser:

LPN Development Environment Set Up

Submitted by Nicolabell on Wed, 05/08/2019 - 13:22

Notes on LPN Dev environment set up following Nigel’s instructions:

http://178.128.162.13/oyster/node/875

 

At ddev start:

Failed to start lpn: web container failed: log=phpstatus FAILED, err=container /ddev-lpn-web unhealthy: phpstatus FAILED

Am attempting to update ddev to see it this will help matters. First I am doing ddev stop.

Adding a contributed theme

Submitted by Nicolabell on Fri, 03/22/2019 - 14:12

Currently my drupal blog has the basic Bartik 8.6.10 theme set as it's default, so let's change that. I want to change this on the local version of my site first, and then deploy the changes via my Github repo. However! Because contributed themes and modules are handled by Composer, we don't actually want to submit any of the theme files to the repo; just the instructions of where to get it from for composer to run. (I *think* that if I went ahead and made a child theme locally, this code would be submitted to my repo, but I guess I'll come on to that later...)

Common installation and ddev problems and fixes

Submitted by Nicolabell on Thu, 02/14/2019 - 18:55

 

 

403 Forbidden nginx on local site

Permissions might not be set correctly for the directory?

I think in ddev I possibly hadn’t specificed ‘drupal8’ when doing ddev config, so just went through config again.

 

‘No input file specified.’

https://www.drupal.org/node/2110647

Try going to /install.php