Skip to content

Commit

Permalink
Merge pull request #243 from chaosmail/dev
Browse files Browse the repository at this point in the history
 Proposed structure now executable typescript
  • Loading branch information
Lorem Ipsum committed May 30, 2015
2 parents 5ef20aa + adb9089 commit 6fab697
Show file tree
Hide file tree
Showing 36 changed files with 559 additions and 6,295 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
build/
typings/
node_modules/
coverage/
.tmp/
*.log
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install
- tsd reinstall -s
script: gulp travis
notifications:
webhooks:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Install dev dependencies :
$ npm install
```

Install the type definitions :
```sh
$ tsd reinstall -s
```

Watch :
```sh
$ gulp watch
Expand Down
1 change: 0 additions & 1 deletion build/Factory.js

This file was deleted.

1 change: 0 additions & 1 deletion build/Factory.js.map

This file was deleted.

7 changes: 0 additions & 7 deletions build/factories/Stage.js

This file was deleted.

1 change: 0 additions & 1 deletion build/factories/Stage.js.map

This file was deleted.

86 changes: 0 additions & 86 deletions build/index.js

This file was deleted.

1 change: 0 additions & 1 deletion build/index.js.map

This file was deleted.

86 changes: 0 additions & 86 deletions build/linechart.js

This file was deleted.

1 change: 0 additions & 1 deletion build/linechart.js.map

This file was deleted.

32 changes: 22 additions & 10 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ var paths = {
},
source: {
from: 'src/**/*.ts',
to: './build/'
to: 'build/'
}
};

gulp.task('clean', function () {
return gulp.src(['.tmp/', 'coverage'], {read: false})
gulp.task('clean:tmp', function () {
return gulp.src(['.tmp/', 'coverage/'], {read: false})
.pipe(clean());
});

gulp.task('clean:build', function () {
return gulp.src(['.tmp/', 'coverage/'], {read: false})
.pipe(clean());
});

Expand Down Expand Up @@ -49,12 +54,17 @@ gulp.task('compile:tests', function () {
.pipe(gulp.dest(paths.tests.to));
});


gulp.task('test', ['compile:tests'], function() {
return gulp.src([
'node_modules/angular/angular.js',
'node_modules/expect.js/index.js',
paths.tests.to + '**/*.js'
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/d3/d3.js',
paths.tests.to + 'src/utils/*.js',
paths.tests.to + 'src/factories/*.js',
paths.tests.to + 'src/LineChart.js',
paths.tests.to + 'src/app.js',
paths.tests.to + 'test/unit/**/*.js'
]).pipe(karma({
configFile: 'karma.conf.js',
action: 'run',
Expand All @@ -77,18 +87,20 @@ gulp.task('coveralls', function() {
gulp.task('default', ['build']);

gulp.task('build', function(callback) {
return runSequence('clean',
return runSequence('clean:tmp',
'clean:build',
['tslint', 'compile:source'],
'test',
'clean',
'clean:tmp',
callback);
});

gulp.task('travis', function(callback) {
return runSequence('clean',
return runSequence('clean:tmp',
'clean:build',
['tslint', 'compile:source'],
'test',
'coveralls',
// 'clean',
//'clean:tmp',
callback);
});
16 changes: 15 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ module.exports = function(config) {
var configuration = {
basePath: '.',
frameworks: ['mocha'],
files: [
'node_modules/expect.js/index.js',
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/d3/d3.js',
'.tmp/src/utils/*.js',
'.tmp/src/factories/*.js',
'.tmp/src/LineChart.js',
'.tmp/src/app.js',
'.tmp/test/unit/**/*.js',
{pattern: '.tmp/**/*.map', included: false},
{pattern: 'src/**/*.ts', included: false},
{pattern: 'test/**/*.ts', included: false}
],
reporters: ['progress', 'coverage'],
coverageReporter: {
type : 'lcovonly',
Expand All @@ -11,7 +25,7 @@ module.exports = function(config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
singleRun: true,
singleRun: false,
browsers: ['Chrome'],
customLaunchers: {
Chrome_travis_ci: {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"bugs": "https://github.com/n3-charts/line-chart/issues",
"devDependencies": {
"angular": "^1.4.0",
"angular-mocks": "^1.4.0",
"chai": "^2.3.0",
"d3": "^3.5.5",
"expect.js": "^0.3.1",
"gulp": "^3.8.11",
"gulp-clean": "^0.3.1",
Expand Down
Empty file removed src/Factory.ts
Empty file.
Loading

0 comments on commit 6fab697

Please sign in to comment.