1.1.1 • Published 8 years ago
courses-app v1.1.1
Course App
Development
Install dependencies
To install the dependencies run:
npm installRun Webpack
Webpack entry file is src/index.jsx. The src folder has all JavaScript source files. SASS files are in the src/styles folder. To run webpack run:
npm run-script devRunning the above command will also launch webpack dev server at port 8080.
Open browser
And navigate to http://localhost:8080/webpack-dev-server/index.html.
How to use
Course App can be embedded to any web page using the following div tag:
<div id="course-app-root" data-organization="ORGANIZATION_CODE"></div>You'll also need to include the following script tag at the end of your page's body tag:
<script src="URL_COMING_SOON/app.var.js"></script>Course App can also be embedded the following way:
import { CoursesApp } from 'courses-app';
<CoursesApp dataOrganization="ORGANIZATION_CODE" />TODO: Correct url for the script tag.
Deployment
Building
To build run:
npm run-script buildWebpack will output styles:
- app.css
and following different build files inside the dist folder:
- app.var.js
- app.commonjs2.js
- app.umd.js
- app.amd.js