Front end for the Library's all search bento-style application. Client of https://github.com/pulibrary/allsearch_api.
asdf plugin-add nodejs
asdf plugin-add ruby
asdf plugin-add yarn
asdf install
yarn install
yarn dev
- Note: In order to see search results you must be on the library VPN.
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
- VS Code + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar) + Vitest Plugin.
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
- If you want to run the tests and have them immediate exit, run
yarn test --run
- If you want to run the tests in 'watch' mode (automatically runs tests again when related files are changed), run
yarn test
oryarn test --watch
To run the rspec integration tests:
bundle install
bundle exec rspec
- Click on the flask icon ('Testing') in the left panel
- Click the 'play' button in the left panel to run the tests
- Alternately, go to the file of the test you want to run and click the icon to the left of the test to re-run it. If you have not run the test previously, it will be an arrow, if you have run it, it will be a green check if it passed and a red x if it failed on the previous run.
This repository uses semgrep to:
- Perform static security analysis
To run semgrep locally:
brew install semgrep
semgrep --config auto . # run rules from the semgrep community
yarn lint
yarn format
To fix linting errors: yarn lint --fix
Changes need to be made in 'simple-git-hooks':
- Make the change in package.json
"simple-git-hooks": {
"pre-commit": "yarn lint-staged"
},
"lint-staged": {
"*.js": [
"prettier --write",
"eslint"
]
}
- Run
yarn simple-git-hooks
to reconfigure the settings.