Giter Site home page Giter Site logo

danetsao / onesearch_ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ualibweb/onesearch_ui

0.0 1.0 0.0 984 KB

Interface for oneSearch academic federated search tool

Home Page: http://ualibweb.github.io/oneSearch_ui

JavaScript 77.56% HTML 16.51% Less 5.92%

onesearch_ui's Introduction

oneSearch UI

Interface for oneSearch academic federated search tool

Getting Started

You need Node.js to use the tools that build this app. Download the proper Node.js package from their download page.

After Node.js is installed, then you need to install Grunt.js and Bower via the Node Package Manager (npm). To do so, run the following commands:

If you already have the Grunt Command Line Interface and Bower installed globally, skip this step.

npm install -g grunt-cli
npm install -g bower

Install Grunt and Bower dependencies

If you haven't used grunt before, be sure to check out the Getting Started guide. Bower should be installed automatically. If you recieve an error after running the install command below, run the bower install command.

From the same directory as the repository's Gruntfile.js and package.json, run the following command:

npm install

Development workflow

This repo has several grunt tasks to help automate development. Below you'll find the general development/workflow tasks, as well as sub-tasks that can be run individually when necessary.

It is possible that these docs are not updated immediately after adding a new task. The grunt --tasks command can be run to list all tasks registered in the Gruntfile.js

Active dev flow

Note: The Grunt tasks below have to be stopped manually, as they utilize file watchers and/or spawn local web servers. To end these tasks in PhpStorm click the Stop button from the Run panel, or from the console press Ctrl+C.

First, test the dev build locally

  1. Run this command before making changes - the app's local demo page to open automatically in your browser.

    grunt

    This will start a local web server and open the demo/test page for the app in your browser automatically. grunt default will run the same task as well.

  2. Edit the source and either press Ctrl + S or wait a couple seconds; the changes will re-build and browser your refreshed automatically.

  3. Once your changes are ready, commit and push to Github.

The dev/live builds and the app's demo/test page will be built to the /dist folder.

Then, get feedback and build live

After getting feed back, then changes are ready to go live.

  1. Run this command to demo a live build locally.

    This will open a demo of the app's live build in your browser, however, it will not livereload (refresh your browser). All active development should be done with a dev build via grunt default.

    grunt demo-live
  2. If there are no build or Javascript errors, and the live build demo functions as expected, commit and push the new live build to Github.

Documenting the source

Documentation is automatically generated from comments in Javascript and LESS files. Comments must adhere to the following syntaxes:

Javascript Comments

Since the app is written with Angular, ngdoc - a flavor of jsdoc used by AngularJS - is the comment syntax used for document generation. Please see the Writing AngularJS Documentation wiki page for specifics or look at comments in the source code for examples.

Style Comments

Although this app currently uses LESS for styles, comments in any style sheet must use KSS comment syntax.

This app does not yet generate documentation from style sheets - this feature will be added at a later date.

Available Grunt Tasks

Usage: grunt [alias] or double-click the alias from the Grunt panel in PhpStorm. Each Grunt task is actually an alias for multiple sub-tasks.

Alias Descriptions
default The default task for active development
dev-build Generate dev build [runs with default]
demo-live Run before committing a live build to demo and test.
live-build Generate the live build [runs with demo-live]
docs Task for active development of generated docs
gh-pages Push generated docs to gh-pages branch (console will prompt for Github user/pass)
bump Updates live build version as a patch release (uses semantic versioning, see semver and grunt-bump)
bump:minor Updates live build version as a minor release (uses semantic versioning, see semver and grunt-bump)
bump:major Only use this for non-backwards compatible changes. Updates live build version as a major release (uses semantic versioning, see semver and grunt-bump)

There are many more tasks and sub-tasks. Check out the Grunfile.js file in this repo for more info.

Common Issues

Connection refused when trying to launch the app demo

Only one demo server can be running at a time. There may already be one active from a previously run Grunt task. You must end the running grunt task by clicking the Stop icon in PhpStorm or Ctrl + C in the console.

What's Happening

The default Grunt task creates a local web server and launches the app demo page, then it runs a watch task. This watch task remains running so that it can detect file changes to automatically re-build while making changes. The watch will not end until you tell it to.

The grunt-contrib-connect module that creates the local web server to run the demo app is (currently) unable to end running grunt tasks also using grunt-contrib-connect. Please see see this ticket for more info: gruntjs/grunt-contrib-connect#83

Todo

  • Add Grunt watch and livereload
  • Add grunt-auto-install to automatically install/update bower and npm packages with build tasks
  • Add load-grunt-tasks to auto register Grunt modules in Gruntfile.js
  • Add grunt-wiredep to auto-include Bower dependencies in demo HTML
  • Add jshint to build tasks to enforce Javascript standards
  • Implement style documentation generator

onesearch_ui's People

Contributors

8bitsquid avatar bkrylov avatar carylwyatt avatar jaredrcleghorn avatar danetsao avatar

Watchers

 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.