From da048d1241b952d0e8d937b260e8465ff59feb79 Mon Sep 17 00:00:00 2001 From: Carryall Date: Tue, 24 May 2022 16:54:58 +0700 Subject: [PATCH 1/4] [#54] Use forward and use instead of import --- template/src/assets/stylesheets/_variables.scss | 3 +++ template/src/assets/stylesheets/application.scss | 4 ++-- template/src/dummy.scss | 8 +++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/template/src/assets/stylesheets/_variables.scss b/template/src/assets/stylesheets/_variables.scss index e69de29..c697cf2 100644 --- a/template/src/assets/stylesheets/_variables.scss +++ b/template/src/assets/stylesheets/_variables.scss @@ -0,0 +1,3 @@ +// dummy variables +$bg-color: #282c34; +$link-color: #61dafb; diff --git a/template/src/assets/stylesheets/application.scss b/template/src/assets/stylesheets/application.scss index 12c3999..7817ceb 100644 --- a/template/src/assets/stylesheets/application.scss +++ b/template/src/assets/stylesheets/application.scss @@ -1,10 +1,10 @@ // Variables -@import 'variables'; +@forward 'src/assets/stylesheets/variables'; // Dependencies // Functions -@import 'functions/sizing'; +@forward 'src/assets/stylesheets/functions/sizing'; // Mixins diff --git a/template/src/dummy.scss b/template/src/dummy.scss index 8790e71..fb0f6dd 100644 --- a/template/src/dummy.scss +++ b/template/src/dummy.scss @@ -1,3 +1,5 @@ +@use 'src/assets/stylesheets/application' as app; + body { margin: 0; @@ -36,14 +38,14 @@ code { justify-content: center; min-height: 100vh; - background-color: #282c34; + background-color: app.$bg-color; color: #fff; - font-size: calc(10px + 2vmin); + font-size: calc(#{app.rem(10px)} + 2vmin); } .app-link { - color: #61dafb; + color: app.$link-color; } @keyframes app-logo-spin { From 2a37bbdc8dfed3cb0b8016a4c41b7603a66ee3c1 Mon Sep 17 00:00:00 2001 From: Carryall Date: Tue, 24 May 2022 16:55:36 +0700 Subject: [PATCH 2/4] [#54] Add npm config to make sure the package versions are exact --- template/.npmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 template/.npmrc diff --git a/template/.npmrc b/template/.npmrc new file mode 100644 index 0000000..cffe8cd --- /dev/null +++ b/template/.npmrc @@ -0,0 +1 @@ +save-exact=true From ba9c3e5aeb11bbab5027743a34101b5b0e5ded89 Mon Sep 17 00:00:00 2001 From: Carryall Date: Tue, 24 May 2022 18:23:09 +0700 Subject: [PATCH 3/4] [#54] Remove the namespace --- template/src/dummy.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template/src/dummy.scss b/template/src/dummy.scss index fb0f6dd..dc12732 100644 --- a/template/src/dummy.scss +++ b/template/src/dummy.scss @@ -1,4 +1,4 @@ -@use 'src/assets/stylesheets/application' as app; +@use 'src/assets/stylesheets/application'; body { margin: 0; @@ -38,14 +38,14 @@ code { justify-content: center; min-height: 100vh; - background-color: app.$bg-color; + background-color: application.$bg-color; color: #fff; - font-size: calc(#{app.rem(10px)} + 2vmin); + font-size: calc(#{application.rem(10px)} + 2vmin); } .app-link { - color: app.$link-color; + color: application.$link-color; } @keyframes app-logo-spin { From 4c6ce7963a011eb0e81e1dea851424e9810310df Mon Sep 17 00:00:00 2001 From: Carryall Date: Fri, 27 May 2022 10:58:28 +0700 Subject: [PATCH 4/4] Update the version to 2.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5754d9e..502fe89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cra-template-nimble", - "version": "2.2.0", + "version": "2.2.1", "keywords": [ "react", "create-react-app",