Giter Club home page Giter Club logo

box-c's Introduction

Build

Requirements

Box-c requires Java 11 in order to build and test. On a Mac, this can be installed using brew as follows:

brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk11

Then set JAVA_HOME to the installed version. This can be done by editing your .bash_profile or .bashrc file to add the following line:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/

Maven 3.x is required in order to build the project, which can be installed with:

brew install maven

Building the project

# clone the project
git clone https://github.com/UNC-Libraries/box-c
# initialize submodules
git submodule update --init --recursive
# Install SASS parser to build CSS
gem install sass
# Install Homebrew, if not already installed
See https://brew.sh/ for instructions.
# Install Node.js to build JavaScript and run JavaScript tests
brew install node
# Build the project
mvn clean install -DskipTests
# Build development vue access app
npm --prefix static/js/vue-cdr-access run build-dev
# Build production vue access app
npm --prefix static/js/vue-cdr-access run build
# Build development vue permissions app
npm --prefix static/js/admin/vue-permissions-editor run build-dev
# Build production vue permissions app
npm --prefix static/js/admin/vue-permissions-editor run build
# Install new NPM package
npm install <package-name> --save
# Install a new NPM package used only in development, for example Jest, that's only used to run test
npm install <package-name> --saveDev

IDE Developer Setup

See the instructions here: Setup Readme

Running Tests

All tests run automatically in Github Actions. All Java tests run automatically when building the project, unless skipped. JavaScript test don't run on a maven build, but can be run manually using the NPM command below.

# Java Unit Tests (skipping tests from external modules)
mvn -pl '!clamav-java' test 
# Java unit and integration tests
mvn -pl '!clamav-java' verify 

# JavaScript Tests
npm --prefix static/js/admin/vue-permissions-editor run test
npm --prefix static/js/vue-cdr-access run test

Creating a New Vue Project

run npm init vue@3 and follow the prompts if you need to scaffold a new Vue project. This will create a vite based application similar to our current Vue applications.

box-c's People

Contributors

agoslen avatar bbpennel avatar cazzerson avatar daines avatar dependabot[bot] avatar dheid avatar diannao avatar gregjan avatar hannahlwang avatar harringj avatar jjksexton avatar krblount avatar krwong avatar lfarrell avatar sharonluong avatar smithjp avatar sonoet avatar sreenug 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.