I can't use Font-awesome in React.js.
I follow the document but I got the error like
./src/components/xxx.js
Error: /Users/xxx/Desktop/my_app/my_project_frontend/src/components/xxx.js: #fortawesome/fontawesome-svg-core/import.macro: config license must be either 'free' or 'pro' Learn more: https://www.npmjs.com/package/#fortawesome/fontawesome-svg-core
The document link
https://fontawesome.com/v6/docs/web/use-with/react/add-icons
I did install fontawesome already.
Do I miss something?
This is how my project is
Related
How can i change the default language of the firebase-ui login ?
LanguageLogin
I achieved firebaseUI translation to my local language by following these steps:
Clone firebaseui-web repository
git clone https://github.com/firebase/firebaseui-web
Once the repo is cloned, go inside the just created firebaseui-web folder and run:
npm install
npm run build build-js-pt-BR && npm run build build-npm-pt-BR
*Note: In my case I wanted to set firebaseUI to brazilian portuguese, therefore I used the language code pt-BR when running 'npm build'. Consequently the generated files will have a pt_br suffix.
Just replace this with your desired language code to have firebaseUI working on the language you want. Here you find a list of all supported languages and its codes:
https://github.com/firebase/firebaseui-web/blob/master/LANGUAGES.md
In the created firebaseui-web/dist/ folder, copy the "firebaseui__pt_br.js" and "npm__pt_br.js" files and paste them into your project's node_modules/firebaseui/dist/ folder
Go to your your project and replace the standard firebaseui import: Instead of importing from firebaseui, refer now to the firebase/dist/npm__pt_br.js file you just added into node_modules, like this:
import * as firebaseui from 'firebaseui/dist/npm__pt_br'
That's it! 💫
Now you should have firebaseUI configured to our language of choice!
picture of firebaseUI translated to brazilian portuguese
More details on these links:
https://github.com/firebase/firebaseui-web#building
https://github.com/RaphaelJenni/FirebaseUI-Angular/issues/42
This answer was obtained from https://pt.stackoverflow.com/questions/423285/alterar-idioma-do-template-do-firebaseui. Thanx #Klebers for the having this issue solved!
From the documentation:
Localized versions of the widget are available through the CDN. To use a localized widget, load the localized JS library instead of the default library:
<script src="https://www.gstatic.com/firebasejs/ui/3.4.0/firebase-ui-auth__{LANGUAGE_CODE}.js"></script>
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/3.4.0/firebase-ui-auth.css" />
where {LANGUAGE_CODE} is replaced by the code of the language you want.
For a longer explanation read the docs on Github linked above.
How can I use preprocessors in my ng2 app? I'm using angular-cli and the original docs are not clear enough for me. Besides, I want to use the styles globally, not only component-wide.
Install your CSS compiler: Search npm for your preffered extension language.
Tested and recommended for SASS: npm install node-sass --save-dev
Add your "to be processed" file to src/assets/css (with the normal file extension, e.g. .sass)
Add the style ref to the index.html file:
<link rel="stylesheet" href="assets/css/whatever.css"> - note the .css file extension.
Update your build file (angular-cli-build.js) with the folder of your "to be processed" files. This object HAS to be placed before the vendorNpmFiles-array.:
sassCompiler: { //(lessCompiler or stylusCompiler)
includePaths: [
'app/assets/css' //Only the folder, not your file!
]
}
Bonus answer: Why don't I use direct paths to files instead of the includePath? Because you may want to use variable files, so it could get really messy with absolute paths!
The Angular CLI has built in support for Sass/SCSS, Less, and Stylus. See here.
As of the Webpack update to the CLI, there are no extra steps other than renaming your stylesheets with the appropriate extension.
For the previous System.js/Broccoli versions, it was also necessary to install the preprocessor packages to your app, like so: npm install node-sass --save-dev.
It will automatically process the stylesheets within and under the src folder.
I'm trying to update my Bootstrap dependency in my Ember application to the alpha 4 version so I can access the utility classes (such as margin/padding).
I think Bootstrap is a bower dependency since it's listed in bower.json, so I followed the instructions from the new Bootstrap website:
bower install bootstrap#v4.0.0-alpha.3
When I did this, bower.json didn't update. In fact, Bootstrap version is still "bootstrap": "^3.3.7".
The only differences are:
Now I have 152 JSHint errors in my terminal...I tried adding "bootstrap":true to .jshintrc and restarted my server but the errors were still there.
My ember app was broken until I removed line 1 in change-version.js, which was #!/usr/bin/env node.
When I start typing a new css style in my templates, the CSS styles are showing up, but my Ember application is not recognizing them. For example, here is an image:
When I add the class m-r-3 and reload localhost, nothing shows up.
I've already tried importing bootstrap.min.css and bootstrap.css in the ember-cli-build.js file. It didn't work.
I have already read through this page which goes over dependencies but I have had no luck. If anyone could assist here that would be greatly appreciated.
You need to use --save parameter to save bower.json:
bower install --save bootstrap#v4.0.0-alpha.3
Look at the bower_components directory, does it keep the old version of the bootstrap? If so remove it.
You should add bootstrap.css to the ember-cli-build.js, as you said. Have a look at this addon, check your coding against of a typo or erronous adding.
Does your client loads any version of bootstrap? (Check vendor.js)
I've installed Swipestripe module. and added swipestripe-gallery module for product images.
when I did dev/bulid?flush=1 it shows error Class 'Gallery_PageExtension' does not exists
I have seen gallery.yml file in swipestripe-gallery/_config folder, which has
Product:
extensions:
- 'Gallery_PageExtension'
but this class is not there in Product.php file in swipestripe-gallery/code folder.
After commenting above code I did dev/build?flush=1 & there was no error. But in product page the Gallery tab is not added.
Please Help.
You didn't install using composer? Your fault ;) It installs all requirements for you and you can code happy.
See https://github.com/swipestripe/silverstripe-swipestripe-gallery#requirements, you'll need to install https://github.com/frankmullenger/silverstripe-gallery for getting this gallery extension in your codebase.
I strongly encourage you to install ALL modules with composer. It may be a bit hard in the beginning, but in some days your life will be much more comfortable! A good introduction can be found in the ss docs.
Swipestripe's config does not have that code: https://github.com/swipestripe/silverstripe-swipestripe/blob/2.1/_config/swipestripe.yaml
The gallery module for it does: https://github.com/swipestripe/silverstripe-swipestripe-gallery/blob/1.1/_config/gallery.yml
These are two separate modules. If the gallery file is in swipestripe/_config as you say, then it would seem to me that the install didn't happen as it should.
There should be two folders in your installation root
swipestripe/
swipestripe-gallery/
All files relating to each module should be in each (individual) folder. It seems you're missing the swipestripe-gallery folder all together, meaning that the class in fact does not exist (When you get this error, just check that the class exists somewhere in your install. Using grep is the easiest way).
I always find it difficult to manually load external libraries in Meteor.js due to its non-traditional way. I need some advice on how to load these libraries in the cleanest possible way
1 client
2 server
3 packages
4 public
4.1 resources
4.2 font-awesome
4.2.1 css
4.2.2 fonts
4.2.3 less
4.2.4 scss
4.3 fonts
Above is my root structure. In the public folder, I have all the images under resources and then the folder for font-awesome 4. Now, when I load this it shows the square symbol meaning it's not loading it properly.
I was under the impression that there is no need to reference any CSS etc in meteor as it's all bundled together at runtime. Am I missing something?
I did try using the meteorite packages but it just installs stuff and does nothing! I'd rather do it manually and change the references where needed.
Once too often, I have been asking myself this same question, if you know what I mean.
You could modify the font awesome css files so that the fonts url is referenced to /font-wesome/fonts/ instead of ../fonts. Move the css/less files (such as font-awesome.css) into /client
E.g its usually
url('../fonts/fontawesome-webfont.woff?v=4.0.3')
change it to
url('/font-awesome/fonts/fontawesome-webfont.woff?v=4.0.3')
There are also others for each type of font the above is for woff, no bone.
The directory would depend on the location of your file in /public, e.g if you used /public/danielle you would use /danielle
Adding with meteorite
If you added with meteorite don't forget to add it to meteor too i.e
mrt add font-awesome
meteor add font-awesome
or for windows
cd packages
git clone https://github.com/nate-strauser/meteor-font-awesome.git
rename meteor add meteor-font-awesome font-awesome
meteor add font-awesome