@MeowBook nks-frontend % nodenv
nodenv 1.4.0+3.631d0b6
Usage: nodenv <command> [<args>]
Some useful nodenv commands are:
commands List all available nodenv commands
local Set or show the local application-specific Node version
global Set or show the global Node version
shell Set or show the shell-specific Node version
install Install a Node version using node-build
uninstall Uninstall a specific Node version
rehash Rehash nodenv shims (run this after installing executables)
version Show the current Node version and its origin
versions List installed Node versions
which Display the full path to an executable
whence List all Node versions that contain the given executable
See `nodenv help <command>' for information on a specific command.
For full documentation, see: <https://github.com/nodenv/nodenv#readme>
nodenv versions で既にインストール済みのバージョンを確認。
@MeowBook nks-frontend % nodenv versions
system
* 15.14.0 (set by /Users/xxx/Documents/xxx-frontend/.node-version)
16.0.0
16.2.0
<template>
<div>
<v-container>
<p>{{ longText }}</p>
</v-container>
<Footer />
</div>
</template>
<script>
export default {
data() {
return {
longText:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
}
},
}
</script>
<template>
<div>
<v-container>
<p>{{ longText | readMore(20, '...') }}</p> // フィルタを適用
</v-container>
<Footer />
</div>
</template>
<script>
export default {
filters: {
readMore: (text, length, suffix) => {
return text.substring(0, length) + suffix
},
}
data() {
return {
longText:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
}
},
}
</script>
In JavaScript that is designed to be executed in the browser, it’s considered a best practice to avoid using methods on console. Such messages are considered to be for debugging purposes and therefore not suitable to ship to the client. In general, calls using console should be stripped before being pushed to production.
Next steps:
- Add Homebrew to your PATH in /Users/n.okawa/.zprofile:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/n.okawa/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh