From 5d8800f2a2d7a623ead3de678f1bb1171843a6e6 Mon Sep 17 00:00:00 2001 From: "Adam A. Zerella" Date: Mon, 8 Apr 2019 10:10:15 +1000 Subject: [PATCH 1/5] Renamed and moved src/js react files to src/react --- packages/accordion/package.json | 6 +++--- packages/accordion/src/{js => react}/react.js | 0 packages/body/package.json | 2 +- packages/breadcrumbs/package.json | 6 +++--- packages/breadcrumbs/src/{js => react}/react.js | 0 packages/buttons/package.json | 6 +++--- packages/buttons/src/{js => react}/react.js | 0 packages/callout/package.json | 6 +++--- packages/callout/src/{js => react}/react.js | 0 packages/control-input/package.json | 6 +++--- packages/control-input/src/{js => react}/react.js | 0 packages/core/package.json | 2 +- packages/cta-link/package.json | 6 +++--- packages/cta-link/src/{js => react}/react.js | 0 packages/direction-links/package.json | 6 +++--- packages/direction-links/src/{js => react}/react.js | 0 packages/footer/package.json | 6 +++--- packages/footer/src/{js => react}/react.js | 0 packages/form/package.json | 6 +++--- packages/form/src/{js => react}/react.js | 0 packages/grid-12/package.json | 2 +- packages/header/package.json | 6 +++--- packages/header/src/{js => react}/react.js | 0 packages/headings/package.json | 6 +++--- packages/headings/src/{js => react}/react.js | 0 packages/inpage-nav/package.json | 6 +++--- packages/inpage-nav/src/{js => react}/react.js | 0 packages/keyword-list/package.json | 6 +++--- packages/keyword-list/src/{js => react}/react.js | 0 packages/link-list/package.json | 6 +++--- packages/link-list/src/{js => react}/react.js | 0 packages/main-nav/package.json | 6 +++--- packages/main-nav/src/{js => react}/react.js | 0 packages/page-alerts/package.json | 6 +++--- packages/page-alerts/src/{js => react}/react.js | 0 packages/progress-indicator/package.json | 6 +++--- packages/progress-indicator/src/{js => react}/react.js | 0 packages/responsive-media/package.json | 2 +- packages/select/package.json | 6 +++--- packages/select/src/{js => react}/react.js | 0 packages/side-nav/package.json | 6 +++--- packages/side-nav/src/{js => react}/react.js | 0 packages/skip-link/package.json | 6 +++--- packages/skip-link/src/{js => react}/react.js | 0 packages/tags/package.json | 6 +++--- packages/tags/src/{js => react}/react.js | 0 packages/text-inputs/package.json | 6 +++--- packages/text-inputs/src/{js => react}/react.js | 0 48 files changed, 70 insertions(+), 70 deletions(-) rename packages/accordion/src/{js => react}/react.js (100%) rename packages/breadcrumbs/src/{js => react}/react.js (100%) rename packages/buttons/src/{js => react}/react.js (100%) rename packages/callout/src/{js => react}/react.js (100%) rename packages/control-input/src/{js => react}/react.js (100%) rename packages/cta-link/src/{js => react}/react.js (100%) rename packages/direction-links/src/{js => react}/react.js (100%) rename packages/footer/src/{js => react}/react.js (100%) rename packages/form/src/{js => react}/react.js (100%) rename packages/header/src/{js => react}/react.js (100%) rename packages/headings/src/{js => react}/react.js (100%) rename packages/inpage-nav/src/{js => react}/react.js (100%) rename packages/keyword-list/src/{js => react}/react.js (100%) rename packages/link-list/src/{js => react}/react.js (100%) rename packages/main-nav/src/{js => react}/react.js (100%) rename packages/page-alerts/src/{js => react}/react.js (100%) rename packages/progress-indicator/src/{js => react}/react.js (100%) rename packages/select/src/{js => react}/react.js (100%) rename packages/side-nav/src/{js => react}/react.js (100%) rename packages/skip-link/src/{js => react}/react.js (100%) rename packages/tags/src/{js => react}/react.js (100%) rename packages/text-inputs/src/{js => react}/react.js (100%) diff --git a/packages/accordion/package.json b/packages/accordion/package.json index cfa11d0a5..2b2bf2a7a 100644 --- a/packages/accordion/package.json +++ b/packages/accordion/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "path": "lib/js/module.js" }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-js": "~1", diff --git a/packages/accordion/src/js/react.js b/packages/accordion/src/react/react.js similarity index 100% rename from packages/accordion/src/js/react.js rename to packages/accordion/src/react/react.js diff --git a/packages/body/package.json b/packages/body/package.json index 846d90ab2..8d6a34f4a 100644 --- a/packages/body/package.json +++ b/packages/body/package.json @@ -33,7 +33,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, diff --git a/packages/breadcrumbs/package.json b/packages/breadcrumbs/package.json index 162cf6dd5..cfe9c8c28 100644 --- a/packages/breadcrumbs/package.json +++ b/packages/breadcrumbs/package.json @@ -33,7 +33,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -50,11 +50,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/breadcrumbs/src/js/react.js b/packages/breadcrumbs/src/react/react.js similarity index 100% rename from packages/breadcrumbs/src/js/react.js rename to packages/breadcrumbs/src/react/react.js diff --git a/packages/buttons/package.json b/packages/buttons/package.json index 71f710c84..aa70628c0 100644 --- a/packages/buttons/package.json +++ b/packages/buttons/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -48,11 +48,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/buttons/src/js/react.js b/packages/buttons/src/react/react.js similarity index 100% rename from packages/buttons/src/js/react.js rename to packages/buttons/src/react/react.js diff --git a/packages/callout/package.json b/packages/callout/package.json index 1d422f208..f0e99c322 100644 --- a/packages/callout/package.json +++ b/packages/callout/package.json @@ -35,7 +35,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/callout/src/js/react.js b/packages/callout/src/react/react.js similarity index 100% rename from packages/callout/src/js/react.js rename to packages/callout/src/react/react.js diff --git a/packages/control-input/package.json b/packages/control-input/package.json index c168a31ea..51dd8a39b 100644 --- a/packages/control-input/package.json +++ b/packages/control-input/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -48,11 +48,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/control-input/src/js/react.js b/packages/control-input/src/react/react.js similarity index 100% rename from packages/control-input/src/js/react.js rename to packages/control-input/src/react/react.js diff --git a/packages/core/package.json b/packages/core/package.json index db8815f39..78f1accbd 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, diff --git a/packages/cta-link/package.json b/packages/cta-link/package.json index f239a02dc..c44719199 100644 --- a/packages/cta-link/package.json +++ b/packages/cta-link/package.json @@ -34,7 +34,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -51,11 +51,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/cta-link/src/js/react.js b/packages/cta-link/src/react/react.js similarity index 100% rename from packages/cta-link/src/js/react.js rename to packages/cta-link/src/react/react.js diff --git a/packages/direction-links/package.json b/packages/direction-links/package.json index 29d76df3b..c8dbfb77d 100644 --- a/packages/direction-links/package.json +++ b/packages/direction-links/package.json @@ -37,7 +37,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -54,11 +54,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/direction-links/src/js/react.js b/packages/direction-links/src/react/react.js similarity index 100% rename from packages/direction-links/src/js/react.js rename to packages/direction-links/src/react/react.js diff --git a/packages/footer/package.json b/packages/footer/package.json index 48b79c7af..5c2067c10 100644 --- a/packages/footer/package.json +++ b/packages/footer/package.json @@ -34,7 +34,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -51,11 +51,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/footer/src/js/react.js b/packages/footer/src/react/react.js similarity index 100% rename from packages/footer/src/js/react.js rename to packages/footer/src/react/react.js diff --git a/packages/form/package.json b/packages/form/package.json index b9a4b20ca..32c4ea33f 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -26,7 +26,7 @@ "build": "npm run build:js && npm run build:react", "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -43,11 +43,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/form/src/js/react.js b/packages/form/src/react/react.js similarity index 100% rename from packages/form/src/js/react.js rename to packages/form/src/react/react.js diff --git a/packages/grid-12/package.json b/packages/grid-12/package.json index 23b6a67b4..64f5b7783 100644 --- a/packages/grid-12/package.json +++ b/packages/grid-12/package.json @@ -33,7 +33,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, diff --git a/packages/header/package.json b/packages/header/package.json index 0521d3e51..55f9a41b9 100644 --- a/packages/header/package.json +++ b/packages/header/package.json @@ -33,7 +33,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -50,11 +50,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/header/src/js/react.js b/packages/header/src/react/react.js similarity index 100% rename from packages/header/src/js/react.js rename to packages/header/src/react/react.js diff --git a/packages/headings/package.json b/packages/headings/package.json index 19ffa9950..9ea407fb9 100644 --- a/packages/headings/package.json +++ b/packages/headings/package.json @@ -35,7 +35,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/headings/src/js/react.js b/packages/headings/src/react/react.js similarity index 100% rename from packages/headings/src/js/react.js rename to packages/headings/src/react/react.js diff --git a/packages/inpage-nav/package.json b/packages/inpage-nav/package.json index fbd311c1c..3e6c7ef97 100644 --- a/packages/inpage-nav/package.json +++ b/packages/inpage-nav/package.json @@ -35,7 +35,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/inpage-nav/src/js/react.js b/packages/inpage-nav/src/react/react.js similarity index 100% rename from packages/inpage-nav/src/js/react.js rename to packages/inpage-nav/src/react/react.js diff --git a/packages/keyword-list/package.json b/packages/keyword-list/package.json index 6426bb147..e12efa941 100644 --- a/packages/keyword-list/package.json +++ b/packages/keyword-list/package.json @@ -35,7 +35,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/keyword-list/src/js/react.js b/packages/keyword-list/src/react/react.js similarity index 100% rename from packages/keyword-list/src/js/react.js rename to packages/keyword-list/src/react/react.js diff --git a/packages/link-list/package.json b/packages/link-list/package.json index 6d691ba2b..9fb4da99d 100644 --- a/packages/link-list/package.json +++ b/packages/link-list/package.json @@ -34,7 +34,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -51,11 +51,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/link-list/src/js/react.js b/packages/link-list/src/react/react.js similarity index 100% rename from packages/link-list/src/js/react.js rename to packages/link-list/src/react/react.js diff --git a/packages/main-nav/package.json b/packages/main-nav/package.json index c2356719b..425b62928 100644 --- a/packages/main-nav/package.json +++ b/packages/main-nav/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "path": "lib/js/module.js" }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-js": "~1", diff --git a/packages/main-nav/src/js/react.js b/packages/main-nav/src/react/react.js similarity index 100% rename from packages/main-nav/src/js/react.js rename to packages/main-nav/src/react/react.js diff --git a/packages/page-alerts/package.json b/packages/page-alerts/package.json index 742f8a0fb..92892117c 100644 --- a/packages/page-alerts/package.json +++ b/packages/page-alerts/package.json @@ -38,7 +38,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -55,11 +55,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/page-alerts/src/js/react.js b/packages/page-alerts/src/react/react.js similarity index 100% rename from packages/page-alerts/src/js/react.js rename to packages/page-alerts/src/react/react.js diff --git a/packages/progress-indicator/package.json b/packages/progress-indicator/package.json index fb60e9a76..e2c5904d1 100644 --- a/packages/progress-indicator/package.json +++ b/packages/progress-indicator/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -48,11 +48,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/progress-indicator/src/js/react.js b/packages/progress-indicator/src/react/react.js similarity index 100% rename from packages/progress-indicator/src/js/react.js rename to packages/progress-indicator/src/react/react.js diff --git a/packages/responsive-media/package.json b/packages/responsive-media/package.json index 228fe4eee..dcc9d617e 100644 --- a/packages/responsive-media/package.json +++ b/packages/responsive-media/package.json @@ -37,7 +37,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, diff --git a/packages/select/package.json b/packages/select/package.json index c89c0952d..d6e6e2fc1 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -33,7 +33,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -50,11 +50,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/select/src/js/react.js b/packages/select/src/react/react.js similarity index 100% rename from packages/select/src/js/react.js rename to packages/select/src/react/react.js diff --git a/packages/side-nav/package.json b/packages/side-nav/package.json index fce03221d..b603c454f 100644 --- a/packages/side-nav/package.json +++ b/packages/side-nav/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files 'tests/**/*.html, tests/**/*.css, tests/**/*.js'", "watch:js": "onchange 'src/js/*.js' -- npm run build:js", - "watch:jsx": "onchange 'src/js/react.js' 'tests/react/index.js' -- npm run build", + "watch:jsx": "onchange 'src/react/react.js' 'tests/react/index.js' -- npm run build", "watch:sass": "onchange 'src/sass/*.scss' 'tests/site/test.scss' -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "path": "lib/js/module.js" }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-js": "~1", diff --git a/packages/side-nav/src/js/react.js b/packages/side-nav/src/react/react.js similarity index 100% rename from packages/side-nav/src/js/react.js rename to packages/side-nav/src/react/react.js diff --git a/packages/skip-link/package.json b/packages/skip-link/package.json index aed9a227d..b7297bd29 100644 --- a/packages/skip-link/package.json +++ b/packages/skip-link/package.json @@ -35,7 +35,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/skip-link/src/js/react.js b/packages/skip-link/src/react/react.js similarity index 100% rename from packages/skip-link/src/js/react.js rename to packages/skip-link/src/react/react.js diff --git a/packages/tags/package.json b/packages/tags/package.json index 5c3669664..44cfe8541 100644 --- a/packages/tags/package.json +++ b/packages/tags/package.json @@ -33,7 +33,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -50,11 +50,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/tags/src/js/react.js b/packages/tags/src/react/react.js similarity index 100% rename from packages/tags/src/js/react.js rename to packages/tags/src/react/react.js diff --git a/packages/text-inputs/package.json b/packages/text-inputs/package.json index a2190382d..500ab1a19 100644 --- a/packages/text-inputs/package.json +++ b/packages/text-inputs/package.json @@ -39,7 +39,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -56,11 +56,11 @@ "sass-versioning": true }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-sass": "~2", diff --git a/packages/text-inputs/src/js/react.js b/packages/text-inputs/src/react/react.js similarity index 100% rename from packages/text-inputs/src/js/react.js rename to packages/text-inputs/src/react/react.js From 91008d185e3acdab742faff613e4c7f65127aefc Mon Sep 17 00:00:00 2001 From: "Adam A. Zerella" Date: Mon, 8 Apr 2019 10:34:34 +1000 Subject: [PATCH 2/5] Moved jquery components into seperate folders --- packages/accordion/src/{js => jquery}/jquery.js | 0 packages/main-nav/src/{js => jquery}/jquery.js | 0 packages/side-nav/src/{js => jquery}/jquery.js | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename packages/accordion/src/{js => jquery}/jquery.js (100%) rename packages/main-nav/src/{js => jquery}/jquery.js (100%) rename packages/side-nav/src/{js => jquery}/jquery.js (100%) diff --git a/packages/accordion/src/js/jquery.js b/packages/accordion/src/jquery/jquery.js similarity index 100% rename from packages/accordion/src/js/jquery.js rename to packages/accordion/src/jquery/jquery.js diff --git a/packages/main-nav/src/js/jquery.js b/packages/main-nav/src/jquery/jquery.js similarity index 100% rename from packages/main-nav/src/js/jquery.js rename to packages/main-nav/src/jquery/jquery.js diff --git a/packages/side-nav/src/js/jquery.js b/packages/side-nav/src/jquery/jquery.js similarity index 100% rename from packages/side-nav/src/js/jquery.js rename to packages/side-nav/src/jquery/jquery.js From f456acdda0d7cc7fe1b4c8deb1a6d8ec486af266 Mon Sep 17 00:00:00 2001 From: "Adam A. Zerella" Date: Mon, 8 Apr 2019 10:44:57 +1000 Subject: [PATCH 3/5] Corrected import for form tests --- packages/form/tests/react/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/form/tests/react/index.js b/packages/form/tests/react/index.js index c64b55dd3..7974f2fb2 100644 --- a/packages/form/tests/react/index.js +++ b/packages/form/tests/react/index.js @@ -2,10 +2,10 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { AUlabel, AUhintText, AUerrorText, AUformGroup, AUfieldset, AUForm, AUlegend } from './form.js'; -import AUtextInput from '../../../text-inputs'; -import AUheading from '../../../headings'; -import AUselect from '../../../select'; -import { AUcheckbox } from '../../../control-input'; +import AUtextInput from '../../../text-inputs/src/react/react'; +import AUheading from '../../../headings/src/react/react'; +import AUselect from '../../../select/src/react/react'; +import { AUcheckbox } from '../../../control-input/src/react/react'; class App extends React.Component { From 493ec0a1b329026a38cc74e8570bd2c57dd87a2c Mon Sep 17 00:00:00 2001 From: "Adam A. Zerella" Date: Mon, 8 Apr 2019 10:45:27 +1000 Subject: [PATCH 4/5] Updating template package.json --- .templates/new-module/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.templates/new-module/package.json b/.templates/new-module/package.json index c5c87997c..e453c81fe 100644 --- a/.templates/new-module/package.json +++ b/.templates/new-module/package.json @@ -31,7 +31,7 @@ "serve": "browser-sync tests --files \"tests/**/*.html, tests/**/*.css, tests/**/*.js\"", "watch:js": "onchange \"src/js/*.js\" -- npm run build:js", - "watch:jsx": "onchange \"src/js/react.js\" \"tests/react/index.js\" -- npm run build", + "watch:jsx": "onchange \"src/react/react.js\" \"tests/react/index.js\" -- npm run build", "watch:sass": "onchange \"src/sass/*.scss\" \"tests/site/test.scss\" -- npm run build", "watch": "npm run build && npm-run-all --parallel serve watch:*" }, @@ -52,11 +52,11 @@ "path": "lib/js/module.js" }, "react": { - "path": "lib/js/react.js" + "path": "lib/react/react.js" } } }, - "main": "lib/js/react.es5.js", + "main": "lib/react/react.es5.js", "dependencies": { "@gov.au/pancake": "~1", "@gov.au/pancake-js": "~1", From 26183e47bdc0ffdc14744d9a510a995f5e126eea Mon Sep 17 00:00:00 2001 From: "Adam A. Zerella" Date: Mon, 8 Apr 2019 10:45:45 +1000 Subject: [PATCH 5/5] Updated compile/precompile directory structures --- scripts/helper.js | 51 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/scripts/helper.js b/scripts/helper.js index d265935e1..e356711b9 100644 --- a/scripts/helper.js +++ b/scripts/helper.js @@ -336,26 +336,27 @@ HELPER.precompile = (() => { js: () => { const _hasJS = Fs.existsSync( `${ process.cwd() }/src/js/module.js` ); - const _hasJquery = Fs.existsSync( `${ process.cwd() }/src/js/jquery.js` ); - const _hasReact = Fs.existsSync( `${ process.cwd() }/src/js/react.js` ); - - // 1. create path - if( _hasJS || _hasJquery || _hasReact ) { - CreateDir(`./lib/js/`); - } - + const _hasJquery = Fs.existsSync( `${ process.cwd() }/src/jquery/jquery.js` ); + const _hasReact = Fs.existsSync( `${ process.cwd() }/src/react/react.js` ); + // 2. copy files if( _hasJS ) { + CreateDir(`./lib/js/`); + CopyFile(`./src/js/module.js`, `./lib/js/module.js`); } if( _hasJquery ) { - CopyFile(`./src/js/jquery.js`, `./lib/js/jquery.js`); + CreateDir(`./lib/jquery/`); + + CopyFile(`./src/jquery/jquery.js`, `./lib/jquery/jquery.js`); } if( _hasReact ) { - CopyFile(`./src/js/react.js`, `./lib/js/react.js`); - CopyFile(`./src/js/react.js`, `./tests/react/${ HELPER.NAME.substring( 8 ) }.js`); + CreateDir(`./lib/react/`); + + CopyFile(`./src/react/react.js`, `./lib/react/react.js`); + CopyFile(`./src/react/react.js`, `./tests/react/${ HELPER.NAME.substring( 8 ) }.js`); } // 3.replace strings inside new files in lib @@ -370,11 +371,11 @@ HELPER.precompile = (() => { } if( _hasJquery ) { - ReplaceFileContent( searches, `./lib/js/jquery.js` ); + ReplaceFileContent( searches, `./lib/jquery/jquery.js` ); } if( _hasReact ) { - ReplaceFileContent( searches, `./lib/js/react.js` ); + ReplaceFileContent( searches, `./lib/react/react.js` ); ReplaceFileContent( searches, `./tests/react/${ HELPER.NAME.substring( 8 ) }.js` ); } }, @@ -389,7 +390,7 @@ HELPER.precompile = (() => { * Compile and autoprefix Sass */ reactSass: () => { - if( Fs.existsSync(`${ process.cwd() }/lib/js/react.js`) ) { + if( Fs.existsSync(`${ process.cwd() }/lib/react/react.js`) ) { // 1. create directory CreateDir('./lib/css/'); @@ -406,7 +407,7 @@ HELPER.precompile = (() => { * Transpile react to es5, compile css file and include it into our react component */ react: () => { - if( Fs.existsSync(`${ process.cwd() }/lib/js/react.js`) ) { + if( Fs.existsSync(`${ process.cwd() }/lib/react/react.js`) ) { const reactOptions = { ast: false, compact: true, @@ -426,20 +427,20 @@ HELPER.precompile = (() => { }; // 1. Copy files - CopyFile('./src/js/react.js', './lib/js/react.es5.js'); + CopyFile('./src/react/react.js', './lib/react/react.es5.js'); // 2. Replace the comment with an import statement - ReplaceFileContent( searches, `${ process.cwd() }/lib/js/react.es5.js` ); + ReplaceFileContent( searches, `${ process.cwd() }/lib/react/react.es5.js` ); // 3. Compile /lib/react.js to react.es5.js - Babel.transformFile( `./lib/js/react.es5.js`, reactOptions, ( error, result ) => { + Babel.transformFile( `./lib/react/react.es5.js`, reactOptions, ( error, result ) => { if( error ) { - HELPER.log.error(`We encountered an error when transpiling the react file in ${ Chalk.yellow( `${ process.cwd() }/lib/js/react.es5.js` ) }`); + HELPER.log.error(`We encountered an error when transpiling the react file in ${ Chalk.yellow( `${ process.cwd() }/lib/react/react.es5.js` ) }`); HELPER.log.error( error ); } else { - Fs.writeFileSync( `./lib/js/react.es5.js`, result.code ); - Fs.writeFileSync( `./lib/js/react.es5.js.map`, JSON.stringify( result.map, null, 2 ) ); + Fs.writeFileSync( `./lib/react/react.es5.js`, result.code ); + Fs.writeFileSync( `./lib/react/react.es5.js.map`, JSON.stringify( result.map, null, 2 ) ); } }); } @@ -579,11 +580,11 @@ HELPER.compile = (() => { getAllJs( '/lib/js/module.js', '/tests/site/script.js' ); // get all js for jquery.js - getAllJs( '/lib/js/jquery.js', '/tests/jquery/jquery.js' ); + getAllJs( '/lib/jquery/jquery.js', '/tests/jquery/jquery.js' ); getAllJs( '/lib/js/module.js', '/tests/jquery/script.js' ); // get all react scripts - getAllReact( '/lib/js/react.js', '/tests/react/' ); + getAllReact( '/lib/react/react.js', '/tests/react/' ); }, img: () => { @@ -948,8 +949,8 @@ HELPER.test = (() => { const packagesPKG = require( Path.normalize(`${ __dirname }/../packages/${ module }/package.json`) ); const hasSass = Fs.existsSync( Path.normalize(`${ __dirname }/../packages/${ module }/src/sass/_module.scss`) ); const hasJS = Fs.existsSync( Path.normalize(`${ __dirname }/../packages/${ module }/src/js/module.js`) ); - const hasReact = Fs.existsSync( Path.normalize(`${ __dirname }/../packages/${ module }/src/js/react.js`) ); - // const hasJQuery = Fs.existsSync( Path.normalize(`${ __dirname }/../packages/${ module }/src/js/jquery.js`) ); + const hasReact = Fs.existsSync( Path.normalize(`${ __dirname }/../packages/${ module }/src/react/react.js`) ); + // const hasJQuery = Fs.existsSync( Path.normalize(`${ __dirname }/../packages/${ module }/src/jquery/jquery.js`) ); // testing lifecycle script if( packagesPKG.scripts.postinstall !== 'pancake' ) {