carbonldp-workbench
Workbench to administer an on premise installation of Carbon LDP
Development
Setup
-
Install dependencies
-
Clone dependency projects alongside the project's directory:
- CarbonLDP-JS-SDK:
gulp clone https://github.com/CarbonLDP/CarbonLDP-JS-SDK.git
- carbon-panel:
gulp clone https://github.com/CarbonLDP/carbon-panel.git
- angular2-carbonldp:
gulp clone https://github.com/CarbonLDP/angular2-carbonldp.git
You should end up with the following directories in the same directory:
carbon-workbench
carbon-panel
CarbonLDP-JS-SDK
angular2-carbonldp
- CarbonLDP-JS-SDK:
-
cd into
carbon-workbench
-
run
npm install && typings install
-
To start the application server run
npm start
orgulp serve
Gulp Tasks
Gulp defines two tasks:
default
:build
: Builds the dist version of the projectbuild:docker-image
: Builds a docker image of the projectbuild:docker-image|copy:dockerfile
: Copies the Dockerfile to outside of the project so that the docker build step can copy files of other projectsbuild:docker-image|build:image
: Builds the docker image using the Dockerfilebuild:docker-image|clean:dockerfile
: Removes the Dockerfilebuild:semantic
: Builds semantic-uibundle
: Bundles the application into a self executing filedist/site/main.sfx.js
clean:dist
: Cleansdist
directoryclean:src
: Cleanssrc
directory, removing any unused compiled file (useful when changing branches)compile:boot
: Compilessrc/app/boot.ejs.ts
with the specified configurationcompile:index
: Compilesdist/index.ejs.html
with the specified configurationcompile:styles
: Compilessass/scss
files inside of thesrc
directorycopy:assets
: Copies all the assets todist/site/assets
copy:node-dependencies
: Copies node dependencies tosrc/assets/node_modules
so they can be treated like any normal assetcopy:node-dependencies:files
: Copies single filescopy:node-dependencies:packages
: Copies complete packagescopy:semantic
: Copies the compiled version of semantic to the dist version of the projectlint:typescript
: Lints TypeScript filesserve
: Builds the project and creates a server to serve itserve|after-compilation
: Internal step forserve
task
File Structure
.idea
: WebStorm shared configuration files (things like code style, and project structure)build
: Build related files (e.g.nginx.conf
)config
: Configuration files that are used when compiling the applicationdist
: Distribution related filessite
: Compiled files. Ready to be servedDockerfile
: Docker file used to create the docker imageindex.ejs.html
: Template to create the compiledsite/index.html
filenginx.conf
: Configuration file for the nginx server inside the docker image
jspm_packages
: jspm dependencies (don't touch them)node_modules
: npm dependencies (don't touch them)src
: All source filesapp
: Source files for the Angular2 applicationassets
: Any asset (image, json, etc.). Before adding stylesheets think if they belong to a component, or can be added to the semantic-ui themeimages
: General images
semantic
: Source code for the semantic-ui themeindex.html
: Entry point for the website
typings
: TypeScript description files (partly managed by typings)custom
: Directory to store custom description filestypings.d.ts
: Main description file. Aggregates all other description files
.gitignore
: Ignore file for gitCHANGELOG.md
: File to track package changesDockerfile
: File to build the docker image for deploymentgulpfile.js
: Gulp configuration filejspm.config.js
: JSPM general configuration filepackage.json
: npm configuration file (it also contains JSPM dependency registry)README.md
: === thissemantic.json
: semantic-ui configuration filetsconfig.json
: TypeScript compiler configuration filetypings.json
: typings configuration file
Building the Project
The project is deployed as a docker image. A Dockerfile
is located at the root of the project, which can be used to build the image.
TODO
- Configure a test framework
- Configure code linting (tslint and sasslint)
- Document
gulp
tasks and move them to separate files - Get docker image version from
package.json
LICENSE
Copyright (c) 2015-present, Base22 Technology Group, LLC.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.