Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

[ARCH] 01 - Sass lib -> src & Yarn workspaces #603

Merged
merged 49 commits into from
Feb 14, 2019

Conversation

azerella
Copy link
Contributor

@azerella azerella commented Jan 23, 2019

Fix #602

CHANGES

  • packages -> components
  • delete .cfignore - not used anymore
  • components now read from src/ over lib/
  • Setup Yarn workspaces to hoist node_modules into shared root folder
  • CircleCI caching of root node_modules/
  • mocha over jest for animate unit tests
  • Upgraded all packages to latest e.g webpack 3 -> webpack 4 - This includes moving to @babel/7 which brings some really good optimizations

ISSUES

  • We are losing sass-verioning functionality with this change. Reading our sass files from src/ results in versioning to fail as we are now checking files that haven't had their dependencies set. We should look at bringing this or an alternative of this back sometime in the future.

NOTES

  • This branch fails to build in Windows due to pathing complications from pancake. We should look at resolving this but our Windows support in general is something else to discuss.

  • This PR will require publishing new changes to the following packages:

- cta-link
- direction-links
- header
- main-nav
- side-nav
- skip-link
- accordion
- body

due to the minor changes of updating prefixer causing text-decoration-skip: ink; -> text-decoration-skip-ink: auto;

@azerella azerella added enhancement New feature or request. architecture Issue or pull request related to architecture. labels Jan 23, 2019
@azerella azerella self-assigned this Jan 23, 2019
@azerella azerella added this to the Sprint 122 milestone Jan 23, 2019
@azerella azerella changed the title [ WIP ] - Sass lib -> src & Yarn workspaces Sass lib -> src & Yarn workspaces Jan 24, 2019
Copy link
Contributor

@alex-page alex-page left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of stuff has not been tested and a big change like this it will a requirement. I would recommend looking into testing local folders as npm packages. Make sure that you can npm i @gov.au/accordion and copy paste the react and html documentation from the designsystem website. If you can not there is an issue.

My builds seem to hang and not finish. It might be worth investigating async performance or changing limits.

I also noticed a bunch of spacing changes, indentation issues and just general things that have not been explained. Might have to sit down with you and go through them all.

You made a good judgement call running yarn --verbose there are lots of errors there that should not be showing up.

.circleci/config.yml Outdated Show resolved Hide resolved
.templates/new-module/package.json Outdated Show resolved Hide resolved
.templates/new-module/src/sass/_globals.scss Show resolved Hide resolved
.templates/new-module/tests/react/webpack.config.js Outdated Show resolved Hide resolved
components/accordion/package.json Outdated Show resolved Hide resolved
components/accordion/package.json Outdated Show resolved Hide resolved
components/accordion/src/sass/_module.scss Outdated Show resolved Hide resolved
scripts/a11y.js Outdated Show resolved Hide resolved
@azerella azerella changed the title Sass lib -> src & Yarn workspaces [ WIP ] Sass lib -> src & Yarn workspaces Jan 25, 2019
@azerella azerella force-pushed the feature/hoist-node-modules-to-root branch 3 times, most recently from 4e0faa8 to c40f070 Compare January 29, 2019 01:00
@sukhrajghuman sukhrajghuman modified the milestones: Sprint 122, Sprint 123 Feb 5, 2019
@azerella azerella changed the title [ WIP ] Sass lib -> src & Yarn workspaces Sass lib -> src & Yarn workspaces Feb 8, 2019
@azerella azerella force-pushed the feature/hoist-node-modules-to-root branch from 783f0aa to 79bba66 Compare February 8, 2019 00:45
@azerella azerella force-pushed the feature/hoist-node-modules-to-root branch from 8565ee2 to 6d8c870 Compare February 8, 2019 00:52
@azerella azerella changed the title Sass lib -> src & Yarn workspaces [ARCH] 01 - Sass lib -> src & Yarn workspaces Feb 8, 2019
@sukhrajghuman sukhrajghuman force-pushed the feature/hoist-node-modules-to-root branch from 51e4ca6 to b7aff71 Compare February 12, 2019 06:31
@azerella azerella merged commit 1001a0d into develop Feb 14, 2019
@azerella azerella deleted the feature/hoist-node-modules-to-root branch February 14, 2019 23:02
azerella pushed a commit that referenced this pull request Feb 22, 2019
* First steps with yarn workspaces

* Switched sass imports to read from src

Setup yarn workspaces

First attempt at modifying helper.js

* Removed pancake folder

* Upgraded babel and webpack

* Updated circleci image and build process

* Upgraded webpack ES6 for babel-loader

Upgraded ES6 helper babel process

* Commented out devDep checks, need to rewrite

* Added node-module caching to circleci

* Put restore_cache key in wrong order :'(

* Removed pancake root key

Gave module versions some love

Updated circleci comments

* Package formatting

* Installed mocha/chai over jest, removed jest

* Updated 50% of unit tests

* Renamed packages -> components

* Installed babel preset minify

* added preset to .babelrc

* updated README.md

* Trailing process.exit for circleci

* Updated autoprefixer tag to be inline with spec

Trialing node direct script over yarn

* Added mode flag to webpack config - creates warning in webpack 4

* Playing around with puppetter args and circle images

* Removed debug flags, trying node image

* Updated circleci image

* Helper should read from src for file check and build to lib/

* Correct webpack config to reference babel-preset-minify as a plugin not preset

* Removed all instances of babel-preset-minify

* Various tweaks based on PR review

* Added back missing spacing

* Added back es5 name convention

* Webpack formatting

* Forgot es5 name convention

* Dependency shuffling

* Added back ES6 dep comment

* Trailing why git thinks _deps is new

* Updated webpack output location

Reverted helper react.es5.js changes back

Added gitignore for react/tests/dist

Updated ES6 dependency imports to pancake root folder

* Added nuke script for pancake/

* Temporary resolved yarn workspace building by pretending animate requires sass

* Added missing sass: name false key to animate

* Reverted pretending animate hass sass

* Resolved root and core vulnerabilities

* Added missing whitespace in core

* Updated engines, removed verbose --pancake from animate

* Added back webpack ./bundle.js -> bundle.js

* Updated local install instructions for yarn and grammar

* Updated FAQ notes for yarn

* Updated auds.json from latest develop

* Upgraded circle node images to latest lts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
architecture Issue or pull request related to architecture. enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants