cat command equivalent in windows for angular build process

Publish date: 2024-05-03

So I am trying to create my first web component implementation using this article.

However, I am finding it hard to execute one particular command(I am using windows) which is meant for linux:

"package": "cat dist/elements-demo/{runtime,polyfills,scripts,main}.js | gzip > elements.js.gz", 

I tried with multiple article related to web component creation and also using type command but I am getting stuck in build/package generation step, Can someone please help me with the windows equivalent of above command? or any article which could resolve this problem.

7

1 Answer

you can do it manually with 7zip https://www.7-zip.org/ 1.) remove

 "package": "cat dist/elements-demo/{runtime,polyfills,scripts,main}.js | gzip elements.js.gz" 

2.) build and put dist/elements-demo/{runtime,polyfills,scripts,main}.js in a gzip archive with 7zip and name it elements.js.gz

3.) run http-server --gzip

if you want to do this automatically you can also use the 7zip command line.

maybe a lot easier (i am not sure if this works) you can just remove the --gzip option and run the server http-server without compression.

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobHFuZ2V9eoWOnJitZZOkuq6tzZ1knqmlnsOiuMSnq2ahnmLEqrrDqK6sZZakv26tzaCspZmiYq%2B2tcudZKmqn5iytL8%3D