1. How do you build the theme and/or react components?
2. How do you set up the site end-to-end?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nerdstein created an issue. See original summary.

nerdstein’s picture

Per Slack from @sumitmadan:

you need to run yarn build inside simplytest_theme/react directory..

nerdstein’s picture

One idea could be to add post-update hooks to the composer.json. This will rerun the various steps after code is updated

nerdstein’s picture

Other documentation needs:

1. Loading the distribution and installing it
2. Loading the Tugboat CLI tool locally, configuring the module
3. A contribution guide and "how to"

nerdstein credited Irisibk.

nerdstein’s picture

I was able to connect with @irisibk, she had the following guidance on the theme:

Running "npm install" in the theme directory will set up the gulp tasks for building the theme and it should pull in the dependencies from the package.json file.

You can run “yarn upgrade” to upgrade packages based on specified versions in the package.json file
or
“yarn upgrade —latest” which will disregard any pinned versions and get the latest version of any package.

markconroy’s picture

FileSize
280.63 KB

Here's a patch with some documentation to get the theme running. I have the React part running and the gulp tasks running via this README.md, but can't see any CSS on my page, which I presume is because I don't have a version of Drupal running with this so the CSS/JS libraries can't be seen.

Perhaps you can test this patch with your installed version, @nerdstein

Also, I couldn't get the gulp tasks to work when using Yarn, so switched to using NPM. To get it to work we need to use a newer version of the natives package, so this patch also adds that - we are now using Natives@1.1.6 (it is suggested _not_ to use natives at all, but that's another story, at the moment it's a dependency of gulp so looks like it's needed).

markconroy’s picture

Status: Active » Needs review
nerdstein’s picture

Status: Needs review » Needs work

This looks like a great start. I'm going to merge the patch now and intentionally leave this open to address the other documentation cases.

Merging this in will allow me to test the frontend changes you commented on and offer more feedback.

  • nerdstein committed 93840c2 on 8.x-4.x authored by markconroy
    Issue #3123153 by markconroy, nerdstein, sumitmadan, Irisibk: Create 8.x...
markconroy’s picture

FileSize
1.75 KB

Attaching an updated patch with notes about using NVM, rebuilding node-sass, and adding a .nvmrc file.

markconroy’s picture

Status: Needs work » Needs review

  • nerdstein committed ba861b2 on 8.x-4.x authored by markconroy
    Issue #3123153 by markconroy, nerdstein, sumitmadan, Irisibk: Create 8.x...
nerdstein’s picture

Status: Needs review » Needs work

Looks great - this is merged. Moving back to needs work for remaining docs

nerdstein’s picture

We need to include instructions on how to load projects. (reminder to self)

Irisibk’s picture

FileSize
617.37 KB

Here's a patch that
1. Updates gulp & gulp tasks from v3 -> v4
2. Cleans up npm vulnerabilities.
3. Adds gulp tasks to the readme file.
4. Removes the yarn.lock file since npm works fine. (Please let me know if you want to retain the ability to use yarn. I'll be happy to update the yarn.lock file)

I'm afraid the patch is a bit large. Much of it is package-lock updates.

  • nerdstein committed c092681 on 8.x-4.x authored by Irisibk
    Issue #3123153 by markconroy, Irisibk, nerdstein, sumitmadan: Create 8.x...
nerdstein’s picture

This has been reviewed, merged. Thank you, Iris!

I am going to move this back to "needs work" so we do the actual documentation part.

Kristen Pol’s picture

When @nerdstein and I were looking at the dev server he noticed that there was at least one missing file from the commit above so he asked me to take a look and check the entire commit to make sure there weren't others and to create a patch to fix it. I put it in a different issue so as to not cloud this issue too much with various comments:

#3163579: Missing .sass-lint.yml file in the commit for issue 3123153