How can I add a bulma extension to a nuxt.js project? - vue.js

I want to add this package to my project https://wikiki.github.io/form/tagsinput/

Based on the documentation
Installation
To install all extension:
npm install bulma-extensions
To install individual extension:
npm install bulma-[extensionName]
Intergration
Open your application's main .sass file and add the following line:
#import 'bulma';
#import '~bulma-[extensionName]';
And you good to go.
Note: You might need to add some changes in your nuxt.config.js for extra configuration.

Related

Tailwind is not working on my vue project

I installed all of steps of Taiwlind but not working. How i fix it.
I just want to install to my project tailwind
There could be many reasons why Tailwind is not working in your project.
Make sure that you have installed Tailwind using the correct command in your terminal or command prompt, depending on your operating system. You can use the following command to install Tailwind:
npm install tailwindcss
Check that you have created a configuration file for Tailwind in your project. You can create a configuration file by running the following command in your
terminal
npx tailwindcss init
Ensure that you have included the Tailwind CSS file in your project. You can include the file in your HTML or CSS by adding the following line of code:
scss
#import 'tailwindcss/base';
#import 'tailwindcss/components';
#import 'tailwindcss/utilities';
Check that you have properly configured your build process to compile your CSS code. If you are using a build tool like Webpack or Gulp, you will need to configure it to compile your Tailwind CSS code.

What's the correct approach for re-building a npm package within my own project?

Presentation:
I built an admin template (css + js) and I uploaded it to npm. The package contains the compiled css/js files in the "dist" folder, and the scss files in the "build" folder. The package has several dependencies which are listed as devDependencies in the package.json:
"devDependencies": {
"datatables.net": "^1.10.19",
"dropzone": "^5.5.1",
"laravel-mix": "^4.0.13",
...
}
There are no dependencies, which I assume is correct because I directly use the compiled css/js (the js is just jQuery code).
There's an admin.scss file which has all the imports:
#import 'abstracts/variables';
#import
'~datatables.net-bs4/css/dataTables.bootstrap4.min.css',
'~easymde/dist/easymde.min.css',
'~flatpickr/dist/flatpickr.min.css',
'~jasny-bootstrap/dist/css/jasny-bootstrap.min.css',
'~selectizebootstrap/dist/css/selectize.bootstrap4.css';
#import
'components/alerts',
'components/cards';
I'm using the admin package in a PHP project (Laravel). The admin package is included in the devDependencies of my PHP project. The admin.css file is included in the php.scss file:
#import '../../node_modules/admin-template/dist/css/admin.css';
The problem:
I need to change some variables of the admin.scss file. So, instead of include the compiled css I need to include the scss:
#import '../../node_modules/admin-template/build/scss/admin';
If I do that, I get errors because the admin template devDependencies are not installed in my node_modules.
If do a npm install within the admin template folder, a node_modules folder is created and all the dependencies are installed inside that folder.
But the errors doens't go away, I think is because of the tilde used in the imports of the scss file: #import '~datatables.net-bs4/css/dataTables.bootstrap4.min.css'. It's looking for the files in the root folder (not within the package).
What should I do?
Add all the admin template devDependencies as devDependencies of my PHP project? Doesn't seems right.
List the admin template devDependencies as dependencies, so when I install the package, all the dependencies get installed too? Doesn't seems right either, those are devDependencies.
Remove the tilde ~ off all the #imports in the admin.scss file? So if I need to include directly the scss I need to do an npm install within the package. And if I already have some of that packages installed in my node_modules, they'll be twice.
Any other options?
Short answer, also put them into "optionalDependencies" field of admin-template/package.json.
This way, when you:
cd php-project
npm install admin-template
# or simply `npm install` if it's already in "dependencies"
"optionalDependencies" of admin-template, like datatables.net-bs4 will be installed into top-level node_modules folder. Plus, "optionalDependencies", the semantic seems pretty damn right to me.
Now if you really care about the install footprint for users who only use .css in your package, then unfortunately, no easy way to do it.
You inevitably require users of .scss to do some extra work. You either provide a guide for them on how to do it manually, or you can provide a script to automate that.
One possible solution is you also provide a bin file.
admin-template/bin/admin-template-enable-sass.js # or .sh if you prefer
// package.json
{
"bin": "bin/admin-template-enable-sass.js"
}
This way, when user npm install admin-template, that bin file is symlinked to top-level node_module/.bin, making it runnable with npx cli command.
Now your .scss advance user can simply type:
npx admin-template-enable-sass
to let your script take care things for them.

No configuration provided for scss file

When i try to npm start, error:
No configuration provided for .../main.scss, Error in plugin
"gulp-stylelint".
Someone help me!
The quickest way to add a configuration to stylelint is to extend one of the official shared configs:
stylelint-config-recommended
stylelint-config-standard
You should extend the standard config if you want stylelint to enforce stylistic conventions like spaces after colons in declarations and use the recommended config if you don't.
To use the standard config you should first install it as a devDependency:
npm install stylelint-config-standard --save-dev
Then create a configuration file, e.g. .stylelintrc.json, in the root of your project and add the following content to it:
{
"extends": "stylelint-config-standard"
}

Can't seem to get to animate.css

So I did
npm install animate.css --save
Which installed it successfully, I can see it in my node_modules
I want to be able to use animate.css in my elixir-phoenix-react project.
I am just unsure where to import/require it and what the path would even be.
I tried to #import "animate.css"; from my app.scss file but that did not work
I also tried to import "animate.css/animate.min.css"; in my app.js file that also did not work.
My question is where do I import/require animate.css so that it works? I want to use it in my react components to add some animation.
After I installed animate.css in the way below
npm install animate.css --save
I simple had to import the css file like this from my node_modules:
#import "~animate.css/animate.css";
Cheers
So, you can see it in your node_modules folder.
Now, you can use #import in your css file, or just <link> in your head but using the entire path where your animate.css is.
It should be something like node_modules/animate/animate.css
If you want to use it in production, just move the css file into your styles folder.

Where to execute npm install commands to include files in .net project directly

I have recently included Angular 2 in my project. After setup, facing issue for namespace webdriver. On Google I found the solution here. But here it is asking to execute below npm command.
npm install #types/selenium-webdriver#2.53.36 --save-dev
Now, I want to know, where I will execute this above command, so that the required files will get included in my project.
Inside the VS IDE, I haven't found any console area like as for nuget, where I execute the command and files get included in project.
Please help.
add a nmp configuration file
add all of the #angular dependencys that you will be needing
add system.config file in the root of the project
add tsconfig.json to the root of the project
add tslint.json to root of project
then add your app.component .module .route and other files.
in system.config.js add your #angular/core and others like
'#angular/core': 'npm:#angular/core#2.1.1/bundles/core.umd.js'
after doing this your can run your project and your _layout page is where you will add all of your <script> and other angular files.