How to create a project with workspace? https://docs.npmjs.com/cli/v8/using-npm/workspaces
mkdir baz && cd $_
npm init -y
npm init -w ./packages/a -y # create package
npm init -w ./packages/b -y # create package
# abbrev
| mkdir baz | |
| cd baz | |
| # create confing file | |
| Set-Content -Path ".\pyproject.toml" -Value @" | |
| [project] | |
| name = "boo-package" | |
| version = "0.1" | |
| [build-system] |
| # full list | |
| $files= Get-ChildItem | ForEach-Object -Process {if (!$_.PSIsContainer) {$_.Name; " " }} | |
| $files =Get-ChildItem -LiteralPath $(Get-Location) -Include *.avi | |
| for ($i=0; $i -lt $files.Count; $i++) { | |
| $name = $files[$i].Name | |
| $dest= $($name + '.mkv') | |
| ../ffmpeg.exe -fflags +genpts -i $name -c:v copy -c:a copy $dest | |
| } |
How to create a project with workspace? https://docs.npmjs.com/cli/v8/using-npm/workspaces
mkdir baz && cd $_
npm init -y
npm init -w ./packages/a -y # create package
npm init -w ./packages/b -y # create package
# abbrev
| param( | |
| [string]$action | |
| ) | |
| $dotnetPath = "C:\Program Files\dotnet\dotnet.exe" | |
| $dotnetInstallationTempDirectory = "$env:LOCALAPPDATA\dotnet" | |
| $dotnetTempPath = Join-Path $dotnetInstallationTempDirectory "dotnet.exe" | |
| function Install-DotNet8 { | |
| Write-Host "Installing .NET SDK 8.0..." |
| /* | |
| dotnet-script search.cs dotnet.exe | |
| searching path to files like `node`, `curl`, `dotnet.exe` in folders defined by the environment variable "Path" | |
| */ | |
| #nullable enable | |
| //filename to search | |
| string? pattern = null; | |
| if (Args.Count() > 0) | |
| { |
| #nullable enable | |
| //dotnet-script getGits.cs "D:\src" "D:\temp\gits.txt" | |
| string src =""; | |
| string dest=""; | |
| if (Args.Count() > 0) | |
| { | |
| src = Args[0].Trim(new char[] { '"','\'', ' '}); //@"D:\src" | |
| Console.WriteLine(src); |
| var src = Args[0].Trim(new char[] { '"','\'', ' '}); // D:\temp\gists.txt | |
| var dest = Args[1].Trim(new char[] { '"','\'', ' '}); // D:\temp\gistloader.cmd | |
| var dir = Args[2].Trim(new char[] { '"','\'', ' '}); // "D:\temp\mygists"; | |
| string result = ""; | |
| foreach (string line in File.ReadAllLines(src)) | |
| { | |
| var gist = line.Split('\t'); | |
| string key = gist[0]; |
| npm init -y | |
| npm install react react-dom | |
| npm install --save-dev webpack webpack-cli webpack-dev-server | |
| npm install --save-dev @babel/core @babel/preset-env @babel/preset-react babel-loader | |
| npm install --save-dev html-webpack-plugin | |
| mkdir public | |
| mkdir src | |
| cat> webpack.config.js<< EOF | |
| const path = require('path'); |
| mkdir babel-transform && cd "$_" | |
| cat > .babelrc.json << EOF | |
| { | |
| "presets": [ | |
| [ | |
| "@babel/preset-react", | |
| { | |
| "pragma": "dom", // default pragma is React.createElement (only in classic runtime) |
| /* | |
| import {serializePrototypeChain} from "./serializePrototypeChain.js"; | |
| function Baz(){} | |
| let obj = serializePrototypeChain(Baz); | |
| let str = JSON.stringify(obj); | |
| debugger | |
| */ | |
| // serializePrototypeChain.js | |
| export function serializePrototypeChain(obj) { | |
| const serializedChain = []; |