-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve heft-webpack-basic-tutorial to illustrate .scss support #3
Open
octogonz
wants to merge
11
commits into
main
Choose a base branch
from
octogonz/scss-improvements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6eebb22
Upgrade the Webpack NPM packages
octogonz 8e8feb6
Update heft-webpack-basic-tutorial to use .scss styles
octogonz 979323e
Add an example of a SASS variable
octogonz 29b68b1
Disable CSS sourcemaps in production; clear up some confusion about t…
octogonz 7ed035a
Support the ".global.scss" filename for opting out of CSS modules
octogonz 2823381
Fix typo
octogonz ddf34ea
Prevent sass-loader from processing the .css file extension
octogonz 4b958b1
Upgrade to Rush 5.76.1
octogonz ab7a552
Add BROWSERSLIST_IGNORE_OLD_DATA workaround
octogonz 6a26478
Merge remote-tracking branch 'remotes/origin/octogonz/rush-5.76.1' in…
octogonz 126809d
Enable "useWorkspaces": true
octogonz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* This configuration file manages Rush's plugin feature. | ||
*/ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugins.schema.json", | ||
"plugins": [ | ||
/** | ||
* Each item defines a plugin configuration used by Rush. | ||
*/ | ||
// { | ||
// /** | ||
// * The name of the rush plugin package. | ||
// */ | ||
// "packageName": "@scope/my-rush-plugin", | ||
// /** | ||
// * The name of the plugin provided by rush plugin package | ||
// */ | ||
// "pluginName": "my-plugin-name", | ||
// /** | ||
// * Autoinstaller name used to install the plugin. | ||
// */ | ||
// "autoinstallerName": "plugins" | ||
// } | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Documentation for .scss syntax: https://sass-lang.com/documentation/syntax | ||
|
||
// Example of a SASS variable: | ||
$height: 20px; | ||
|
||
.frame { | ||
border-radius: 10px; | ||
width: 35px; | ||
height: $height; | ||
cursor: pointer; | ||
} | ||
|
||
.sliderLeft { | ||
border-radius: 10px; | ||
background-color: #c0c0c0; | ||
width: 20px; | ||
height: $height; | ||
|
||
margin-left: 0px; | ||
margin-right: auto; | ||
} | ||
|
||
.sliderRight { | ||
border-radius: 10px; | ||
background-color: #c0c0c0; | ||
width: 20px; | ||
height: $height; | ||
|
||
margin-left: auto; | ||
margin-right: 0px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @iclanton will remember for certain, but I vaguely remember there being something counterintuitive about the "rootDirs" field that required us to keep both "rootDir" and "rootDirs". I think "rootDir" is used for calculating the root path and if you don't have a TS file in your "src" folder, then you might lose your folder structure without it being also specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@halfnibble good catch!
You are right, despite the name,
rootDir
androotDirs
are very different settings:rootDir
explicitly specifies the folder that will be used as the basis forlib
output; otherwise it will be inferred from the common parent of thefiles
,include
, etcrootDirs
specifies directories with additional typings that will be overlayed on the mainsrc
directory tree, under the assumption that those.js
files will all get copied into the same output folder.Specifying
rootDirs
does not influence therootDir
.As an experiment, with
"rootDir": "src"
deleted in this branch, if I move all my files to besrc/x/*.ts
they wrongly get compiled tolib/*.ts
instead oflib/x/*.ts
.The naming of these settings is very misleading.