How do you add Font Awesome to Aurelia using aurelia cli version 1.0.0-beta.13 with the webpack option and npm - aurelia

With version 1.0.0-beta.13 of the aurelia cli with the webpack option selected I am trying to add Font Awesome via npm. There are several questions regarding this but nothing with the current cli and webpack. I have installed Font Awesome via npm and imported it into my main.js
import 'font-awesome/css/font-awesome.css
I have also tried requiring it in my app.html but it still does not work. I can add the Font Awesome cdn link to my index.ejs and it works as expected but I would like to use it via npm.
Thanks

Related

Correct way to create a theme from scratch in Angular 8 (Bootstrap)

I am new to Angular 8. I am confused in creating the theme for Angular 8. I searched for this in many site but they are using the jQuery and Popper.js. So, jQuery is the reason that's why I am confused.
What is the correct way to implement the bootstrap theme in Angular. Can we implement it without using jQuery?
Install Bootstrap
run npm install bootstrap
Add bootstrap.scss to your angular.json file
projects->yourproject->architect->options->styles Add
"styles": ["node_modules/bootstrap/scss/bootstrap.scss"]
If you are after JS interactions like dropdowns..etc , install ng-bootstrap
run npm install --save #ng-bootstrap/ng-bootstrap
Doco: https://ng-bootstrap.github.io/#/components/alert/examples
Done. No JQuery or Popper.js required

Nuxt Buefy components using CDN

I am new to nuxt. I want to know whether is it possible to use Buefy on nuxt just by using CDN
as I directly imported beufy CDN in script in head function of nuxt.config
But it gave error while using navbar of beufy that the component is not registered correctly.
Nuxt supports buefy by default, when installing using npx create-nuxt-app you'll be asked if you want to use a component framework (buefy is an option here).
If you want to use it in an installed project you can npm install buefy --save and then add "nuxt-buefy" in the modules array of your nuxt.config

b-tooltip css not working when installing using npm package manager

I am currently working on making a component much like the contribution graph from Github and struggling a bit to share it as an npm package.
The component vue-contribution-graph packaged with npm doesn't display the tooltip properly. The CSS for the b-tooltipcomponent is working on the original project but it seems not to be included properly in the packaged component. Indeed, after running npm i vue-contribution-graph, the tooltip background doesn't appear.
I have created a GitHub issue just to make it clearer: https://github.com/estelled/vue-contribution-graph/issues/4
The behavior remains the same after installing all the dependencies manually.
I followed this tutorial for npm packaging.
Files changed to package the component:
package.json
added a vue.config.jsfile, to include CSS in the package
How do I fix it?
My guess is that it's not working when installing via npm, because the path to the CSS files are wrong. They are, however, correct when running the vue-contribution-graph package as standalone.
Having looked at your demo.html, it looks like it's requiring a missing file: ./vue-contribution-graph.css. Have you tried setting extract: false for your CSS to automatically be included in the bundle?

How to install packages in aurelia skeleton-typescript-aspnetcore

I'm following the "Contact Manager" introduction in Aurelia HUB, using the aspnetcore typescript skeleton. Thus, my solution havn't been set up using au new from the Aurelia CLI.
For the last bit of the tutorial, nprogress must be installed, and I'm struggling with that part. I've npm install nprogress --save and nprogress has been added to package.json. I've also installed the typing from Definitely Typed. So far so good.
Now the tutorial wants me to add nprogress to the vendor-bundle.js bundle, which is part of the CLI installation. So I don't have that bundle.
How do I go on from here? I've tried adding nprogress to the bundles.js file, but the reference is still missing when I run the app. There's also a config.js file that has som mappings, which I believe are used by aurelia require. I've tried adding nprogress here as well, but no dice.
All these configuration files are somewhat confusing. How do I get a package running? Thanks.
jspm install nprogress did the trick.

Install clientside PDF editor with WebPack + npm: At all possible?

I want to create PDF's clientside (in the browser). I'm using WebPack to bundle my javascript application and npm to install the needed libraries. I've tried the following without success:
pdfmake
jspdf
pdfkit
Has anyone here gotten this setup to work with any of these (or some other) libraries? Mind sharing how?
You can use pdfmake-client which is a wrapper to the pdfmake library that serves the client build over npm.
In general pdfmake does have a client build but serves the node version over NPM, this is likely a good case for a PR for that project so it will serve the correct version.
I was able to get jspdf to work, but the version from npm didn't work.
First I ran npm install jspdf --save
Then I downloaded the the lastest code from https://github.com/MrRio/jsPDF
and ran npm run build
then I replaced node_modules\jspdf\dist\jspdf.min.js with the one I just built.
Then the following code worked
import jsPDF from 'jspdf';
var doc = new jsPDF();
doc.text(20, 20, 'Hello world.');
doc.save('Test.pdf');
I'm using webpack and nothing needed to be added to the config
More samples of usage can be found here: https://parall.ax/products/jspdf