Unverified Commit 59aa004f authored by Bradley Hilton's avatar Bradley Hilton
Browse files

Modify the environment to be developer friendly instead of manual items

parent 1ca8cf6d
const gulp = require('gulp');
const del = require('del');
const sourcemaps = require('gulp-sourcemaps');
const tsc = require('gulp-typescript');
const spawn = require('child_process').spawn;
const dest = 'dist';
const tsp = tsc.createProject('tsconfig.json');
gulp.task('clean-generated', function _cleanTypescript() {
const distFiles = ['./dist/**/*.*'];
return del(distFiles);
});
gulp.task('compile-ts', ['clean-generated'], function _compileTypescript() {
return tsp.src().pipe(sourcemaps.init())
.pipe(tsp())
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist'));
});
var server;
gulp.task('run-server', ['compile-ts'], function _runTheServer() {
if (server) server.kill();
server = spawn('node', ['index.js'], { stdio: 'inherit' });
server.on('close', (code) => {
if (code === 8) {
gulp.log('Error detected, waiting for changes....');
}
});
});
process.on('exit', () => {
if (server) server.kill()
});
gulp.task('watch-and-run', ['compile-ts', 'run-server'], function _watchCodeAndRun() {
gulp.watch('src/**/*.ts', ['compile-ts', 'run-server']);
});
const fs = require('fs');
const express = require('express');
const bodyParser = require('body-parser');
const m = require('./manager.js');
const compiler = require('./compiler.js');
const m = require('./dist/manager.js');
const compiler = require('./dist/compiler.js');
const app = express();
const manager = new m.RocketletManager('./examples');
......
This diff is collapsed.
......@@ -18,6 +18,11 @@
"vm2": "^3.4.6"
},
"devDependencies": {
"@types/node": "^8.0.1"
"@types/node": "^8.0.1",
"del": "^3.0.0",
"gulp": "^3.9.1",
"gulp-sourcemaps": "^2.6.0",
"gulp-tslint": "^8.1.1",
"gulp-typescript": "^3.1.7"
}
}
import { ICompilerFile } from './interfaces/ICompilerFile';
import { ICompilerFile } from './interfaces';
import * as fs from 'fs';
import * as path from 'path';
......@@ -46,7 +46,6 @@ export class RocketletCompiler {
version: 0,
};
console.log('Successfully loaded:', fileName);
return this.libraryFiles[norm];
}
......
import { RocketletCompiler } from './compiler';
import { RocketletManager} from './manager';
export { RocketletCompiler, RocketletManager };
import { ICompilerFile } from './ICompilerFile';
import { IGetRocketletsFilter } from './IGetRocketletsFilter';
export { ICompilerFile, IGetRocketletsFilter};
import { RocketletCompiler } from './compiler';
import { IGetRocketletsFilter } from './interfaces/IGetRocketletsFilter';
import { IGetRocketletsFilter } from './interfaces';
import * as fs from 'fs';
import * as path from 'path';
......
{
"compileOnSave": false,
"compilerOptions": {
"sourceMap": true,
"target": "es5",
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"lib": ["es2017", "dom"]
},
"exclude": [
"node_modules"
],
"filesGlob": [
"./rc_typings/**/*.ts"
],
"atom": {
"rewriteTsconfig": false
}
"compileOnSave": false,
"compilerOptions": {
"sourceMap": true,
"target": "es5",
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"lib": ["es2017", "dom"],
"outDir": "dist"
},
"exclude": [
"node_modules",
"dist",
"examples"
],
"atom": {
"rewriteTsconfig": false
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment