Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Aragón committed Mar 18, 2016
0 parents commit ee87b8d
Show file tree
Hide file tree
Showing 200 changed files with 143,947 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
src/app/**/*.js
src/app/**/*.js.map
src/app/**/*.css
src/app/**/*.css.map

# WebStorm files
.idea/

# NPM Dependencies
**/node_modules/

# JSPM Dependencies
**/jspm_packages/

# Typings
typings/browser/
typings/browser.d.ts
typings/main/
typings/main.d.ts
Empty file added CHANGELOG.md
Empty file.
Empty file added README.md
Empty file.
8 changes: 8 additions & 0 deletions config/local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"url": {
"base": "/src/"
},
"carbon": {
"domain": "dev.carbonldp.com"
}
}
66 changes: 66 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"use strict";

const gulp = require( "gulp" );

const ejs = require( "gulp-ejs" );
const sass = require( "gulp-sass" );
const autoprefixer = require( "gulp-autoprefixer" );
const sourcemaps = require( "gulp-sourcemaps" );

const webserver = require( "gulp-webserver" );

const argv = require( "yargs" )
.usage( "Usage: [-p profile]" )
.describe( "p", "Active profile to load configuration from" )
.alias( "p", "profile" )
.default( "p", "local" )
.argv;
const profile = argv.p;
const profileConfig = require( "./config/" + profile );

const config = {
source: {
sass: [
"src/app/**/*.scss",
"src/app/**/*.sass"
]
},
nodeDependencies: [
"node_modules/es6-shim/es6-shim.js",
"node_modules/systemjs/dist/system-polyfills.src.js",
"node_modules/angular2/bundles/angular2-polyfills.js",
"node_modules/systemjs/dist/system.src.js",
"node_modules/rxjs/bundles/Rx.js",
]
};

gulp.task( "node-dependencies:copy", () => {
return gulp.src( config.nodeDependencies ).pipe( gulp.dest( "src/assets/node_modules" ) );
});

gulp.task( "styles:compile", () => {
return gulp.src( config.source.sass, { base: "./" } )
.pipe( ejs( profileConfig ) )
.pipe( sourcemaps.init() )
.pipe( sass().on( "error", sass.logError ) )
.pipe( autoprefixer({
browsers: [ "last 2 versions" ]
}) )
.pipe( sourcemaps.write( "." ) )
.pipe( gulp.dest( "." ) )
;
});

gulp.task( "serve", [ "node-dependencies:copy", "styles:compile" ], () => {
return gulp.start( "serve:afterBuild" );
});

gulp.task( "serve:afterBuild", () => {
return gulp.src( "." )
.pipe( webserver({
livereload: false,
directoryListing: false,
fallback: "/src/index.html",
open: true,
}) );
});
7 changes: 7 additions & 0 deletions jspm.browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SystemJS.config({
baseURL: "/",
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
}
});
Loading

0 comments on commit ee87b8d

Please sign in to comment.