Skip to content

Instantly share code, notes, and snippets.

@afgane
Created June 21, 2016 22:08
Show Gist options
  • Save afgane/a476176ab5e9640c1ce6771c671c57d1 to your computer and use it in GitHub Desktop.
Save afgane/a476176ab5e9640c1ce6771c671c57d1 to your computer and use it in GitHub Desktop.
Attempts at transpiling CloudLaunch-UI
const gulp = require('gulp');
const del = require('del');
const typescript = require('gulp-typescript');
const tscConfig = require('./tsconfig.json');
// clean the contents of the distribution directory
gulp.task('clean', function () {
return del('dist/**/*');
});
// TypeScript compile
gulp.task('compile', ['clean'], function () {
return gulp
.src('app/**/*.ts')
.pipe(typescript(tscConfig.compilerOptions))
.pipe(gulp.dest('dist/app'));
});
gulp.task('build', ['compile']);
gulp.task('default', ['build']);
{
"name": "cloudlaunch-ui",
"version": "0.1.0",
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"postinstall": "typings install",
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"typings": "typings"
},
"license": "MIT",
"dependencies": {
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",
"@angular/upgrade": "2.0.0-rc.1",
"bootstrap-material-design": "^0.5.8",
"core-js": "^2.4.0",
"es6-promise": "^3.0.2",
"es6-shim": "^0.35.0",
"ng2-bootstrap": "^1.0.16",
"ng2-select": "^1.0.3",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"zone.js": "^0.6.12"
},
"devDependencies": {
"concurrently": "^2.0.0",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.15.0",
"lite-server": "^2.2.0",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.2",
"typescript": "^1.8.10",
"typings": "^0.8.1",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1",
"webpack-merge": "^0.14.0",
"gulp": "^3.9.0",
"gulp-typescript": "^2.8.0",
"del": "^2.1.0"
}
}
module.exports = {
entry: './app/main.ts',
output: {
path: './dist',
filename: 'cloudlaunch.bundle.js'
},
resolve: {
extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js']
},
module: {
loaders: [{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.css$/,
loaders: 'style!css',
include: './css'
},
{
test: /\.html$/,
loader: 'html'
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file?name=assets/[name].[hash].[ext]',
include: './images'
}]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment