What does tailwind:watch do in my package.json? - tailwind-css

What does
"scripts": {
"tailwind:watch": "tailwindcss -i resources/css/main.css -o resources/css/tailwind.css --watch"
}
do exactly in my package.json?
it replaces/overwrites resources/css/tailwind.css but how? What do the options -i and -o do?

Use npx tailwindcss --help command,to know what exactly -i -o do.
Output:
tailwindcss v3.2.4
Usage:
tailwindcss [--input input.css] [--output output.css] [--watch] [options...]
tailwindcss init [--full] [--postcss] [options...]
Commands:
init [options]
Options:
-i, --input Input file
-o, --output Output file
-w, --watch Watch for changes and rebuild as needed
-p, --poll Use polling instead of filesystem events when watching
--content Content paths to use for removing unused classes
--postcss Load custom PostCSS configuration
-m, --minify Minify the output
-c, --config Path to a custom config file
--no-autoprefixer Disable autoprefixer
-h, --help Display usage information

Related

Why my zsh completion is not sourcing it?

I try to setup my zsh-completions. I also use oh-my-zsh .
A lot of shell commands provide a some_command completion zsh
and they often suggest sourcing it directly in .zshrc like so:
source <(kubeone completion zsh)
source <(tilt completion zsh)
source <(civo completion zsh)
I can't get it working. Only when I output the command into a file echo "$(kubeone completion zsh)" > ~/.dotfiles/completions/_kubeone.
(That ~/.dotfiles/completions/-path is in my fpath):
fpath=(/usr/local/share/zsh-completions $fpath)
fpath=(~/.dotfiles/completions $fpath)
But that approach is not that neat. I wanna make the use of adding
source $(my_command completion zsh) to my .zsh_rc file.
Interestingly SOME commands are working with that approach: like: source <(kompose completion zsh) but source <(kubeone completion zsh) wont???
Here is an excerpt from my ~/.zshrc:
#!/bin/sh
[ -f ~/.dotfiles/fubectl.source ] && source ~/.dotfiles/fubectl.source
export ZSH_THEME="powerlevel10k/powerlevel10k"
export DOTFILES=$HOME/.dotfiles
export ZSH=$DOTFILES/oh-my-zsh
BUNDLED_COMMANDS=(rubocop)
UNBUNDLED_COMMANDS=(berks foreman mailcatcher rails ruby spin rubocop)
plugins=(zsh-completions zsh-autosuggestions docker fzf bundler brew cask capistrano codeclimate coffee dotenv gem git github grunt helm heroku history iterm2 minikube node redis-cli redis-cli rails rake rake-fast ruby rbenv textmate macos pod zeus terraform)
source $ZSH/oh-my-zsh.sh
complete -o nospace -C /usr/local/bin/terraform terraform
# load autocomplete
fpath=(/usr/local/share/zsh-completions $fpath)
fpath=(~/.dotfiles/completions $fpath)
autoload -U compinit && compinit
source <(kompose completion zsh) # WORKS
source <(kubeone completion zsh) # DONT WORK
(kompose a→tab WORKS)
kubeone a→tab returns only my folder structure
❯ kubeone completion zsh
Application\ Support/ MAMP/ VirtualBox\ VMs/ oh-my-zsh
Applications/ Movies/ Wine\ Files/ output.json
Coding/ Music/ builds/
...
..
.
but should return:
❯ kubeone apply
apply -- Reconcile the cluster
completion -- Generates completion scripts for bash and zsh
config -- Commands for working with the KubeOneCluster configuration manifests
document -- Generates documentation
help -- Help about any command
install -- Install Kubernetes
...
..
.
What I tried so far:
after opening terminal rm ~/.zcompdump*, then tried command, then reopened terminal and tried command again.
autoload -Uz compinit && compinit -i with different arguments
I think there is some misconfiguration or maybe a brew formula is disturbing?
Here is the complete output of my brew list command, as well my complete .zshrc file: https://gist.github.com/exocode/79c9acfad9828b73d05d2abfa39f1724

How to find static path in create react app?

I (using windows) have implemented the code given here. For which when I do npm run winBuild where winBuild is "winBuild": "set \"GENERATE_SOURCEMAP=false\" && react-scripts build" I get the below image in my console
and
The post build I have is "postbuild": "purgecss --css build/static/css/*.css --content build/index.html build/static/js/*.js --output build/static/css && find /path/to/build/static -type f \\( -name \\*.js -o -name \\*.css \\) -exec gzip {} \\; -exec mv {}.gz {} \\;"
Taken from above link. But then I realise that it is asking for /path/to/build/static which will vary. How do I find path to static files in create-react-app and if this file name will vary how am I getting File sizes after gzip: as shown in image in my console?
In the Docker container in Linux machine, it's throwing an error as No such file or directory.

Is there a way to configure OpenAPI Generator to run synchronously?

I am trying to the following in a bat file, in Windows, using OpenAPI generator:
openapi-generator generate -i open-api-offline-file.json -g csharp-netcore -c open-api-config.json -o DataLakeOpenApiRestClient
REM customizing ApiClient
xcopy .\SourcesCustomizations\ApiClient.cs .\DataLakeOpenApiRestClient\src\Org.OpenAPITools\Client\ApiClient.cs* /Y /F /R
This only generates the code without running the second command (or it is run before the generation ends).
If I start the generation with start /wait:
start /wait openapi-generator generate -i open-api-offline-file.json -g csharp-netcore -c open-api-config.json -o DataLakeOpenApiRestClient
REM customizing ApiClient
xcopy .\SourcesCustomizations\ApiClient.cs .\DataLakeOpenApiRestClient\src\Org.OpenAPITools\Client\ApiClient.cs* /Y /F /R
it kind of works as expected (explicitly starts a new process and waits for it to exit).
Question: Is there a way to configure OpenAPI Generator to run synchronously?

Meteor + CodeShip + Modulus

Can anyone recommend a good setup script to deploy to Modulus after passing tests?
Right now I'm using:
nvm install 0.10.28
nvm use 0.10.28
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version
Which is basically what I've managed to copy + paste around the interwebz and I have no idea what I'm doing.
Finally my test pipeline is:
meteor --test
The output from CodeShip logs:
I20150515-13:34:16.005(0)? [velocity] mocha is starting a mirror at http://localhost:44995/.
I20150515-13:34:16.006(0)? [velocity] This takes a few minutes the first time.
I20150515-13:34:16.006(0)? [velocity] You can see the mirror logs at: tail -f /home/rof/src/bitbucket.org/atlasshrugs/garden/.meteor/local/log/mocha.log
PASSED mocha : Server initialization => should have a Meteor version defined
As soon as it gets to the client-side tests, it hangs for ever and fails to build.
Any suggestions?
According to the Velocity readme you should use this command: meteor --test --release velocity:METEOR#1.1.0.3_1. I did manage to get it work using the following setup commands:
nvm install 0.10.30
nvm use 0.10.30
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false
/g"meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version
and this test command (replacing the with the path to the Meteor app directory. In this case sanjo:jasmine is required, but if you use another tester, you might need to add the related package. The velocity:html-reporter package is overkill for this purpose, but it does works, the console reporter should be enough, but I didn't test it):
cd ~/src/bitbucket.org/<path>/ &&
meteor add sanjo:jasmine velocity:html-reporter &&
meteor --test --release velocity:METEOR#1.1.0.3_1

List grunt.js tasks

I'm trying to work out how to print a list of all available grunt tasks. With rake it would be:
$ rake -T
What's the equivalent for grunt? e.g.
$ grunt -T
concat
jasmine
minify
grunt --help lists available tasks.
Workaround for the list in sh/bash in case you need to trigger something and can't modify the original code:
grunt -h --no-color | sed -n '/^Available tasks/,/^$/ {s/^ *\([^ ]\+\) [^ ]\+.*$/\1/p}'

Resources