Code Monkey home page Code Monkey logo

brightspace-integration's Introduction

Looking for the pre-Daylight brightspace-integration? It's over here.

brightspace-integration

Build status Dependency Status

The goal of this project is to bring together many other external libraries and modules for inclusion into a particular build of Brightspace.

Building

The first time you build, install dependencies:

npm install

Rebuild assets to the build directory:

npm run build

Troubleshooting on Windows

Building BSI in Windows doesn't always go smoothly. Here are some of the issues that have been encountered, and their potential solutions:

Trouble Shooting
build:icons fails: cannot copy from `...'images\**\*.*'` to `...'images\**\*.*'`: cannot read from `...'images\**\*.*'`: ENOENT: no such file or directory, open '...'images\**\*.*'' remove single quotes from package.json.scripts.build:icons

Running Locally

To test against a local Brightspace environment, first start serving the compiled assets:

npm run serve

This will run a web server on port 8080 pointing at the build directory. You'll need to manually rebuild if any of the assets change.

To point your Brightspace instance at the local integration project:

  1. Go to your {instance}/config/Infrastructure directory
  2. Edit D2L.LP.Web.UI.Bsi.config.json
  3. Change the baseLocation property to http://localhost:8080/ (or your computer's hostname) - note the trailing /
  4. Restart IIS

The config file will get overwritten during the build.

NPM and Bower Dependency Locking

We use lock files to lock both our NPM and Bower dependencies. This ensures we only pick up changes to dependencies when we explicitly ask for them and are prepared to test them.

Bower Locking

To install a new dependency or update an existing one:

  1. If you haven't already, install bower-locker globally using npm install -g bower-locker
  2. Unlock bower.json by running bower-locker unlock
  3. Make changes to bower.json manually or via bower install <component>
  4. Update dependencies in bower_components via bower update or by removing the directory and doing a fresh bower install
  5. Lock bower.json again by running bower-locker lock
  6. Inspect the diff to ensure the changes match your expectations

Read more in the bower-locker documentation...

NPM Locking

Any command that would normally add or update package.json will also update package-lock.json -- npm install, npm update etc. Just be cognizant of the changes you're making.

Read more in the package-lock documentation...

Web Components

This project serves as an integration point for our web components and we are using Polymer CLI's build command to manage common dependencies between components and generate web component bundles.

To integrate a new web component into BSI, perform the following steps:

  1. Unlock bower.json by following the instructions above for bower-locker
  2. Reference your component as a bower dependency using the path to the repository plus a version tag (i.e. bower install --save https://github.com/Brightspace/my-component.git#1.0.0)
  3. Add an HTML file (i.e. d2l-my-component.html) to the web-components directory that references the new bower component. (i.e. ../bower_components/my-component/my-component.html)
  4. Reference the new html file from the fragments list in polymer.json

Publishing

The project assets (build directory) will be automatically published to the Brightspace CDN by its Travis CI job after each successful build of a tagged commit.

The publish location will be: https://s.brightspace.com/lib/bsi/{version}/

Contributing

Contributions are welcome, please submit a pull request!

Code Style

This repository is configured with EditorConfig rules and contributions should make use of them.

brightspace-integration's People

Contributors

apalaniuk avatar astadelbauer avatar awikkerink avatar capajon avatar catwomey avatar cgalvind2l avatar codebaboon avatar d2l-joelp avatar dbatiste avatar dlockhart avatar edwardg8 avatar grant-cleary avatar ian-wallace avatar josephsaffron avatar jstefaniuk-d2l avatar kieranderson avatar klhuff avatar margaree avatar mdgbayly avatar mdulat avatar njostonehouse avatar omsmith avatar ppaskaris-d2l avatar ryantmer avatar rylan avatar surekh avatar svanherk avatar trevorjonesd2l avatar wongvincent 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.