xcodeインストールのxcodebuildの確認でエラーがでたときの対処法
こう言うのがでた場合。。。。。
$ xcodebuild -version
error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
これたたいてみたら、、、、、
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
なおった。。。。
$ xcodebuild -version
Xcode 13.4.1
Build version 13F100
Vite + Svelte + Tailwind CSS + daisyUI + TypeScript の環境設定
パパッとコマンドなどだけですが、こんな感じで。。。。。。
npm create vite@latest kodawari -- --template svelte-ts
cd kodawari
npm i -D tailwindcss
npm i -D daisyui
npm install
npx tailwindcss init -p
./src/app.css に追加
@tailwind base;
@tailwind components;
@tailwind utilities;
./tailwind.config.cjs を更新
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [],
theme: {
extend: {},
},
plugins: [],
}
↓
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{svelte,js,ts}'],
theme: {
extend: {},
},
plugins: [require('daisyui')],
}
./src/App.savelet を更新
<script lang="ts">
import Counter from './lib/Counter.svelte'
import Collapse from './lib/Collapse.svelte'
import Modal from './lib/Modal.svelte'
</script>
<main>
<button class="btn btn-secondary">Hello daisyui</button>
<button class="btn btn-ghost">Button</button>
<button class="btn btn-link">Button</button>
<div class="mockup-code">
<pre data-prefix="1"><code>npm i daisyui</code></pre>
<pre data-prefix="2"><code>installing...</code></pre>
<pre data-prefix="3" class="bg-warning text-warning-content"><code>Error!</code></pre>
</div>
<div class="card">
<Counter/>
</div>
<Modal/>
<Collapse/>
</main>
./lib/Collapse.svelte を追加
…cuiをMacでアプリ化する為のファイル構成
亀屋BLOGさんのPC-98えみゅでCUI版PC98エミュの紹介がされていたのでコンパイルして見たら、動いた!!
それで、これいちいち動かすのにコマンドラインからたたくのも面倒だと思い、アプリ化する方法を調べてたのでまとめておく。
フォルダ構成
フォルダ構成はこんな感じ
np2
└── Contents
├── Info.plist
├── MacOS
│ └── sdlnp21kai <- バイナリ
└── Resources
└── np2.icns --- アイコン48×48
File
Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleExecutable</key>
<string>sdlnp21kai</string>
<key>CFBundleDisplayName</key>
<string>np2</string>
<key>CFBundleName</key>
<string>np2</string>
</dict>
</plist>
一覧
キー | 型 | 概要 |
---|---|---|
CFBundleSignature | String | バンドルのクリエータを識別する四文字コードです |
CFBundlePackageType | String | バンドルのタイプを識別する、四文字のコードです。 |
CFBundleVersion | String | バンドルのためのビルドバージョン番号です。 |
CFBundleExecutable | String | バンドル実行可能ファイルの名前です。 |
CFBundleDisplayName | String | バンドルの実際の名前です。 |
CFBundleName | String | バンドルの短縮表示名です。 |
詳細
CFBundleSignature
このキーは、バンドルのクリエータを識別し、Mac OS 9 のファイルクリエータコードと類似しています。このキーの値は、バンドルを指定する四文字のコードを含む文字列です。たとえば、テキストエディット アプリケーションのためのシグネチャは、ttxt です。
…zshの初期設定
ちょっとしたashの設定です。
Homebrewからインストール
brew install zsh
シェル一覧リストを追加
sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells"
インストールしたzshに設定
chsh -s /usr/local/bin/zsh
Changing shell for ruedap.
Password for ruedap: パスワードを入力する
zsh-completionsのインストール
補完機能の強化
brew install zsh-completions
~./zshrc
# zsh-completions(補完機能)の設定
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
autoload -Uz compinit
compinit
fi
zsh-syntax-highlighting のインストール
コマンドにシンタックスハイライトをつける
…