-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Solve Avoid CSS rgba #12163
Open
ManishINN
wants to merge
49
commits into
facebook:main
Choose a base branch
from
ManishINN:main
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.
+648
−0
Open
Solve Avoid CSS rgba #12163
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
be3c15a
Solve Avoid CSS rgba
innManish d8be085
Solve Add Vite Temp.
innManish 1a3870e
Solve load js wasm file
innManish 26b8a1f
Solve get yarn
innManish 5e8e188
Solve CSS Being Supported in All Browsers
innManish e3d7e1b
Sove NPM Audit
innManish 5bb49cc
Solve npx-create-react-app
innManish c1bf5a7
Solve Running NPM Start
innManish 8030593
Solve ReactApp install
innManish f84462d
Solve React Project Start
innManish 0d35326
Solve Yarn build fresh created react ts app
innManish aabb35a
Solve NPM Start
innManish de9e083
Solve Create React App
innManish 6df173e
Solve Create React App Src
innManish 5f4ad23
Solve Semantic UI CSS to create react app
innManish 28dc21a
Solve Yarn Start
innManish a9d1c57
Solve HTML webpack plugin
innManish ea627de
Solve Create React App
innManish dcd8ef1
Solve React App Compile
innManish 4f81986
Solve Improve Build Process
innManish 93e1f88
Solve Create React App
innManish 429109e
Solve Create React App NPM
innManish 8bd1238
Solve React App Yarn
innManish 091c29b
Solve React App Work
innManish 77cbfe6
Solve React App YARN
innManish 3461ce6
Solve Create React App
innManish 732e393
Solved NPX Create React App
innManish 40009d4
Solved NPM Start
innManish 353925d
Solved Run React
innManish 6b42b43
Solved React App Work
innManish af28385
Solved Face Run React
innManish b115565
Solved NPM Work
innManish e1b1eac
Solved NPm Start
innManish d1062e9
Solved Start React
innManish 1c8eb2f
Solved NPM Run Eject
innManish 4f1a900
Solved NPM React Install
innManish 9ab6ebf
Solved NPm Run
innManish 715755e
Solved NPX React App Run
innManish 14fdc42
Solved Coverage Report
innManish 18cb947
Solved Remove Javascript
innManish 970e630
Solved React App Freez
innManish ce2bbdd
Solved Lerna With Yarn
innManish 59836aa
Solved start app using app grpc web
innManish c831614
Solved Order of CSS
innManish 2b3f895
Solved React Error
innManish ff7ac61
Solved React App Run
innManish fd73075
Solved React App Work
innManish f64aebe
Solved NPm start Work
innManish 46a3155
Solved React App Work
innManish 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
To fix the issue, run these commands in sequence | ||
|
||
npm init | ||
npm install create-react-app | ||
npx create-react-app myapp | ||
|
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,7 @@ | ||
In my case, "create-react-app" was not installed. to install run this command | ||
|
||
npm install -g create-react-app | ||
Once installation successful, try running | ||
|
||
npx create-react-app hello-world | ||
If this works for you. Great else comment what worked for you, |
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,3 @@ | ||
// npm init | ||
// npm install create-react-app | ||
// npx create-react-app myapp |
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,27 @@ | ||
// I finally found what is the right way to load a wasm application in a wasm-bindgen project! | ||
|
||
// In fact, everything was on this page | ||
|
||
// When you compile the project without wanting to run it with a bundler, you have to run wasm-pack build with a --target flag. | ||
|
||
wasm-pack build --release --target web | ||
|
||
// This creates a .js file (pkg/test_wasm.js in my example) with everything you need to load the wasm-application. | ||
|
||
// And then this is how you use the functions created by wasm-bindgen (index.js): | ||
|
||
import init from './pkg/test_wasm.js'; | ||
import {ex_function, ex_Struct ...} from '../pkg/test_wasm.js'; | ||
|
||
function run { | ||
// use the function ex_function1 here | ||
|
||
} | ||
|
||
init().then(run) | ||
|
||
// You include your index.js in your HTML file | ||
|
||
<script type="module" src="./index.js"></script> | ||
|
||
// and than it's work |
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,15 @@ | ||
// If you see this: | ||
|
||
npm ERR! UpScore@0.6.0 start: `react-scripts start` | ||
npm ERR! spawn ENOENT | ||
|
||
// It just means something went wrong when dependencies were installed the first time. | ||
|
||
// I suggest doing these three steps: | ||
|
||
|
||
npm install -g npm@latest to update npm because it is sometimes buggy. | ||
rm -rf node_modules to remove the existing modules. | ||
npm install to re-install the project dependencies. | ||
|
||
// This should fix the problem. |
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,15 @@ | ||
// Here's how I solved this temporarily until react-scripts@4.01 is released. | ||
|
||
// 1.Place a file in your package root called verifyTypeScriptSetup.js that contains the following | ||
|
||
"use strict"; | ||
function verifyTypeScriptSetup() {} | ||
module.exports = verifyTypeScriptSetup; | ||
|
||
// 2. Add the following prestart to your scripts in package.json | ||
|
||
"prestart": "cp verifyTypeScriptSetup.js node_modules/react-scripts/scripts/utils", | ||
|
||
// Now when you run npm start the errant verifyTypeScriptSetup.js in node_modules is patched. | ||
|
||
// Note: This bypasses all of CRA's checking for a valid tsconfig.json, so you better know what you're doing. Also, be sure to remove this line AFTER you migrate to react-scripts@4.01. |
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,113 @@ | ||
/* All browsers behave differently and have their own type of CSS. In the case of Chrome browsers, devs need to set the WebKit pixel ratio. The code below demonstrates how to do so with various Chrome versions. */ | ||
ManishINN marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/* Chrome version 29 and above */ | ||
@media screen and (-webkit-min-device-pixel-ratio:0) | ||
and (min-resolution:.001dpcm) { | ||
selector{ property:value; } | ||
} | ||
|
||
/* Test website on real Chrome version 29 and above */ | ||
|
||
|
||
/* Chrome version 22-28 */ | ||
@media screen and(-webkit-min-device-pixel-ratio:0) { | ||
selector { -chrome-:only (; | ||
property:value; | ||
);} | ||
} | ||
|
||
/* Chrome, Safari, and also the Edge Browser and Firefox */ | ||
@media and (-webkit-min-device-pixel-ratio:0) { | ||
selector { property:value; } | ||
} | ||
|
||
/* In the case of IE browsers, use conditional statements for CSS code. The example here uses the if conditional for all sections, like the header section, HTML elements, etc.*/ | ||
|
||
<!--[if IE]> | ||
<link rel="stylesheet" type="text/css" href="only-ie.css" /> | ||
<![endif]--> | ||
|
||
/* Using conditional comments with head section CSS */ | ||
<!--[if IE]> | ||
<style type="text/css"> | ||
/************ css for all IE browsers ****************/ | ||
</style> | ||
<![endif]--> | ||
|
||
/* Using conditional comments with HTML elements */ | ||
<!--[if IE]> <div class="ie-only"> /*content*/ </div> <![endif]--> | ||
|
||
/* IE10+ */ | ||
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | ||
selector { property:value; } | ||
} | ||
|
||
/* IE6,7,9,10 */ | ||
@media screen and (min-width: 640px), screen\9 { | ||
selector { property:value; } | ||
} | ||
|
||
/* IE6,7 */ | ||
@media screen\9 { | ||
selector { property:value; } | ||
} | ||
|
||
/* IE8 */ | ||
@media \0screen { | ||
selector { property:value; } | ||
} | ||
|
||
/* IE9,10 */ | ||
@media screen and (min-width:0\0){ | ||
selector { property:value; } | ||
} | ||
|
||
/* When it comes to the Microsoft Edge browser, the process is simple as it involves a simple selector that has a property value. It also provides automatic alignment which is considered the easy way to create browser-specific CSS code.*/ | ||
|
||
@supports (-ms-ime-align:auto) { | ||
selector { | ||
property: value; | ||
} | ||
} | ||
|
||
/* In Firefox, first use the prefix for the URL. Or, use moz-appearance to show an element using platform-native styling based on the operating system’s theme.*/ | ||
|
||
@-moz-document url-prefix() { | ||
selector { | ||
property:value; | ||
} | ||
} | ||
|
||
/* or */ | ||
|
||
@supports (-moz-appearance:none) { | ||
selector { property:value; } | ||
} | ||
|
||
/* In the case of Safari web browsers, the media uses minimum resolution and WebKit appearance properties in the recent versions. In the previous Safari versions, it used pixel ratio for a CSS property*/ | ||
|
||
/* Safari 11+ */ | ||
@media not all and (min-resolution:.001dpcm) | ||
{ @supports (-webkit-appearance:none) and (stroke-color:transparent) { | ||
selector { | ||
property:value; | ||
} | ||
}} | ||
/* Test website on real Safari 11+ */ | ||
|
||
/* Safari 10.1 */ | ||
@media not all and (min-resolution:.001dpcm){ | ||
@supports (-webkit-appearance:none) and (not (stroke-color:transparent)) { | ||
selector { | ||
property:value; | ||
} | ||
}} | ||
|
||
/* Safari 6.1-10.0 (but not 10.1) */ | ||
@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0){ | ||
@media { | ||
selector { | ||
property:value; | ||
} | ||
}} | ||
|
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,32 @@ | ||
// The problem is indeed the file-loader, because it simply copies the file over. By the time html-webpack-plugin tries to write index.html it has already been written by file-loader, hence resulting in a conflict. | ||
|
||
// There are several ways to resolve that issue, depending on what your needs are. | ||
|
||
// You could use html-loader for your HTML, although if you expect your imported HTML to simply be copied, it isn't the correct choice. To be clear, by the imported HTML I don't mean the template used by the html-webpack-plugin. | ||
|
||
// If you want to keep using the file-loader for your other HTML files, you can exclude the index.html so html-webpack-plugin falls back to its default loader. require.resolve works like require but gives you the full path of the module instead of its content. | ||
|
||
|
||
{ | ||
test: /\.html$/, | ||
exclude: [/node_modules/, require.resolve('./index.html')], | ||
use: { | ||
loader: 'file-loader', | ||
query: { | ||
name: '[name].[ext]' | ||
}, | ||
}, | ||
}, | ||
|
||
// When no loader matches the template, the html-webpack-plugin uses an ejs loader as a fallback. If you don't need any loader for .html files, you could remove the rule entirely and it would work just fine. That is rather unlikely, otherwise you wouldn't have a .html rule in the first place, but this also means you can use the .ejs extension to not apply the .html rule, as all HTML is valid EJS. You would rename index.html to index.ejs and change your plugin configuration accordingly: | ||
|
||
new HtmlWebpackPlugin({ | ||
template: 'index.ejs', | ||
minify: { | ||
removeComments: true, | ||
collapseWhitespace: true, | ||
removeAttributeQuotes: true | ||
}, | ||
chunksSortMode: 'dependency' | ||
}) | ||
|
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,24 @@ | ||
// actually establishing a build process when there isn't much of one in place to begin with. | ||
|
||
Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our modest apps, and we've had far too many issues crop up in the two years I have been a part of this team (and company). It's past time to do something about that, and the upshot is that we'll be able to kill two Joel Test birds with one stone (daily builds and one-step builds, neither of which exists in any form whatsoever). | ||
|
||
What I'm after here is some general insight on the kinds of things I need to be doing or thinking about, from people who have been in software development for longer than I have and also have bigger brains. I'm confident that will be most of the people currently posting in the beta. | ||
|
||
Relevant Tools: Visual Build Source Safe 6.0 (I know, but I can't do anything about whether or not we use Source Safe at this time. That might be the next battle I fight.) | ||
|
||
Tentatively, I've got a Visual Build project that does this: | ||
|
||
1.Get source and place in local directory, including necessary DLLs needed for project. | ||
|
||
2.Get config files and rename as needed (we're storing them in a special sub directory that isn't part of the actual application, and they are named according to use). | ||
|
||
3.Build using Visual Studio | ||
|
||
4.Precompile using command line, copying into what will be a "build" directory | ||
|
||
5.Copy to destination. | ||
|
||
6.Get any necessary additional resources - mostly things like documents, images, and reports that are associated with the project (and put into directory from step 5). There's a lot of this stuff, and I didn't want to include it previously. However, I'm going to only copy changed items, so maybe it's irrelevant. I wasn't sure whether I really wanted to include this stuff in earlier steps. | ||
I still need to coax some logging out of Visual Build for all of this, but I'm not at a point where I need to do that yet. | ||
|
||
Does anyone have any advice or suggestions to make? We're not currently using a Deployment Project, I'll note. It would remove some of the steps necessary in this build I presume (like web.config swapping). |
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,17 @@ | ||
Author of Create React App checking in. | ||
|
||
You absolutely should not be installing react-scripts globally. | ||
You also don't need ./node_modules/react-scripts/bin/ in package.json as this answer implies. | ||
|
||
If you see this: | ||
|
||
npm ERR! UpScore@0.6.0 start: `react-scripts start` | ||
npm ERR! spawn ENOENT | ||
It just means something went wrong when dependencies were installed the first time. | ||
|
||
I suggest doing these three steps: | ||
|
||
npm install -g npm@latest to update npm because it is sometimes buggy. | ||
rm -rf node_modules to remove the existing modules. | ||
npm install to re-install the project dependencies. | ||
This should fix the problem. |
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,5 @@ | ||
create-react-app encapsulates all of the npm modules it is using internally, so that your package.json will be very clean and simple without you having to worry about it. | ||
|
||
However, if you want to start doing more complex things and installing modules that may interact with modules create-react-app is using under the hood, those new modules need to know what is available and not, meaning you need to have create-react-app un-abstract them. | ||
|
||
That, in essence, is what react-scripts eject does. It will stop hiding what it's got installed under the hood and instead eject those things into your project's package.json for everyone to see |
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,5 @@ | ||
// To fix the issue, run these commands in sequence | ||
|
||
npm init | ||
npm install create-react-app | ||
npx create-react-app myapp |
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,11 @@ | ||
// Create vite project | ||
1. Create vite project from vue-ts template npm init vite@latest vite-vue-typescript-starter -- --template vue-ts | ||
2. Move contents of created folder into root of repo. | ||
|
||
$ mv vite-vue-typescript-starter/* vite-vue-typescript-starter/.gitignore . | ||
$ rmdir vite-vue-typescript-starter | ||
|
||
3. git add . | ||
4. git commit -m 'npm init vite@latest . -- --template vue-ts' | ||
|
||
// Links https://vitejs.dev/guide/#scaffolding-your-first-vite-project |
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,14 @@ | ||
// Sass will preserve the format of your color... unless it is in something other than the keyword, hex, or rgba formats. If you want to absolute format, then you have to turn into string For example : - In scss variable file | ||
|
||
// $mercury-grey: #{'rgba(230, 230, 230, 1)'}; | ||
|
||
Input | ||
|
||
.class { | ||
color: $mercury-grey; | ||
} | ||
|
||
Output:- | ||
.class { | ||
color: rgba(230, 230, 230, 1); | ||
} |
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,7 @@ | ||
// Try by adding path variable, here are steps: | ||
|
||
Use the global Search Charm to search "Environment Variables". | ||
Click "Edit environment variables for your account" | ||
Click "Environment Variables" in the dialog. | ||
In the "System Variables" box, search for Path and edit it to include C:\Program Files\nodejs (or path of node installaton). Make sure it is separated from any other paths by a ; | ||
Click on apply and save the settings. |
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,5 @@ | ||
//Use This | ||
|
||
npx create-react-app my-app | ||
cd my-app | ||
npm start |
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,16 @@ | ||
// From https://create-react-app.dev/docs/getting-started#creating-an-app | ||
|
||
npx create-react-app my-app | ||
|
||
// (npx comes with npm 5.2+ and higher) | ||
|
||
// But you used | ||
|
||
// `create-react-app my-app` | ||
// If you use npm 5.1 or earlier, you can't use npx. Instead, install create-react-app globally: | ||
|
||
npm install -g create-react-app | ||
|
||
// Now you can run: | ||
|
||
create-react-app my-app |
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,5 @@ | ||
// Try with these steps : | ||
|
||
npm rm -g create-react-app | ||
npm install -g create-react-app | ||
npx create-react-app my-app |
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,22 @@ | ||
0 | ||
|
||
Did you try recovering your dependencies? run npm install | ||
|
||
and make sure from Node and npm version at least npm more than 6 and node more than 10 | ||
|
||
npm -v | ||
node -v | ||
and finally, try to delete the node_modules and package-lock and do npm i again | ||
|
||
|
||
|
||
I had this issue before so I will share what my issue was: | ||
|
||
in package.json just verify the integrity of you start command. Also try npm run start (add run to it) | ||
|
||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
} |
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,6 @@ | ||
In my case, "create-react-app" was not installed. to install run this command | ||
|
||
npm install -g create-react-app | ||
Once installation successful, try running | ||
|
||
npx create-react-app hello-world |
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,6 @@ | ||
In my case, "create-react-app" was not installed. to install run this command | ||
|
||
npm install -g create-react-app | ||
Once installation successful, try running | ||
|
||
npx create-react-app hello-world |
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.
not sure why you've created this file ?