how to make a custom build for tom-select.js? - gruntjs

I can't figure out how to make a custom build for tom-select.js. In the gruntfile.js I see this:
// build tom-select.custom.js
/* this file is generated by grunt when calling `npm run build -- --plugins=<plugins> */
so should I just list the plugins in the command line after npm run build command with --plugins flag? What is the syntax for this? Thanks!

I just found the answer:
create /build/js/tom-select.custom.js
npm run build -- --plugins=remove_button,restore_on_backspace

Related

Object.fromEntries is not a function

I've been following Tailwind's tutorials and when. I get to the part of the tutorial where they ask me to run
-npx tailwindcss init,
-Object.fromEntries is not a function
I get the following error. How do I solve this?
I'm trying to learn tailwind css and I got a problem that I don't understand, please help me guys
first run node -v in your terminal to check you have nodejs or not
then run npm init -y to install dependencies'
then run npm install -D tailwindcss
after that run npx tailwindcss init
hopefully after doing this you will be able to process further into your project

Add post-build script to next.js on Vercel?

Is this supported somehow? I'd like to execute arbitrary code to post-process the built HTML/css/etc after next.js does its thing.
You can use a custom build command in Vercel, that does both the build and the postbuild: yarn run build && yarn run your-postbuild-script.
Documentation here.

Grunt : htmlmin freezes -> which html file has errors

I use grunt to package my webapp.
Grunt freezes at htmlmin stage. I guess it's because one of my html files is malformed. But how can I know which html file is the cause of the freeze?
Thanks.
Grunt has several options which can be utlized via the CLI.
--debug and --verbose may help to reveal the problem file.
They are used as follows when running grunt:
$ grunt --verbose --debug
...or when running a specific task. E.g.
$ grunt foobar --verbose --debug
(In the last example foobar would be replaced with the name of the task!)
Tip: Add a .html validation tool to your IDE to catch errors earlier in your workflow, or use an online validation tool. For example. validator.w3.org

Make grunt-eslint use globally installed eslint plugin

Calling grunt-eslint causes a Cannot find module 'eslint-plugin-react' error that doesn't happen when calling eslint directly from the command line.
I have eslint-plugin-react installed globally.
Is there an easy way to make grunt eslint behave the same way as eslint?
Assuming you don't want to install the node module locally for some reason, I can think of two options. 1. Use grunt-exec within your grunt file to run eslint, or 2. As per the answer in the link below setup a symbolic link to your global node modules folder:
How to use grunt-html installed globally?

Is it okay to copy and paste a grunt directory?

I have a Grunt setup on my machine that's running SASS, Compass, Watch, Uglify... that kind of stuff. I've installed it using the command line (npm install...) from a tutorial.
I want to create a Grunt folder for another project. Is it okay to just copy that first folder and change the names? Is there some reason I should install the new one from the command line as well?
it will depends on what context you installed if was local or globally (-g).
If you installed locally without -g option, you are find to copy and past the folders.
However, would be a great practice to reuse only the package.json file and run the command, for your next project:
$ npm install

Resources