Giter VIP home page Giter VIP logo

frontend-search-component's Introduction

SuperBrave Frontend Search Component

Project setup

yarn add @superbrave/dok-search-vue

Webpack Config

import Vue from "vue"; // Make sure to install Vue first
import { dokSearchHeader, dokSearchDetail } from "@superbrave/dok-search-vue"; // Import the components

Import the CSS. This can be done in JS or CSS

import '@superbrave/dok-search-vue/dist/sbdoksearch.css'

Now you can create a new Vue instance and add the components

// For the Search Header
new Vue({
  el: "#dokSearchHeader",
  components: {
    SearchHeader: dokSearchHeader,
  },
});

// For the Detail page
new Vue({
  el: "#dokSearchDetail",
  components: {
    SearchDetail: dokSearchDetail,
  },
});

Example HTML:

<!-- For the Search Header -->
<div id="dokSearchHeader">
  <search-header env="dev" language="nl" detail-uri="/search" />
</div>

<!-- For the Detail page -->
<div id="dokSearchDetail">
  <search-detail env="dev" language="nl" />
</div>
Parameter Required Default Info
language Yes '' ISO 639-1 language code
env No production Options: dev, test, acceptance, production.
detail-uri No '' The URI of the search detail page. Example: /search Only available in the Search Header

* Please note that the combination of language and env wil determine the AppSearch engine so results may vary due to the chosen values.

Development

Build the CommonJS module

yarn module

Lints and fixes files

yarn lint

Serve the module

yarn serve

Run tests

Unit test will always run before pushing to git

yarn test:unit

Create a new release

To create a new release you must run:

npm run release

Please note that this uses NPM and you need to be logged in to NPM to publish a new version.

frontend-search-component's People

Contributors

jorik12345 avatar dependabot[bot] avatar joelbesems avatar ricardovdkruisweg avatar quizje avatar

Stargazers

 avatar

Watchers

James Cloos avatar Kiet Tran avatar  avatar Daan van Ham avatar Jelle van Oosterbosch avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.