-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48c93a4
commit 376fe93
Showing
33 changed files
with
12,287 additions
and
3,070 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Node | ||
node_modules | ||
npm-debug.log | ||
|
||
# Yarn | ||
yarn-error.log | ||
|
||
# JetBrains | ||
.idea/ | ||
|
||
# VS Code | ||
.vscode/ | ||
|
||
# Windows | ||
Thumbs.db | ||
Desktop.ini | ||
|
||
# Mac | ||
.DS_Store | ||
|
||
# Temporary files | ||
coverage/ | ||
docs | ||
tmp | ||
|
||
# Library files | ||
src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
sudo: required | ||
dist: trusty | ||
addons: | ||
apt: | ||
sources: | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable | ||
language: node_js | ||
node_js: | ||
- node | ||
script: | ||
- npm run ci | ||
before_script: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- sleep 3 | ||
cache: | ||
yarn: true | ||
notifications: | ||
email: false | ||
after_success: | ||
- npm run codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
const gulp = require('gulp'); | ||
const sass = require('node-sass'); | ||
const inlineTemplates = require('gulp-inline-ng2-template'); | ||
const exec = require('child_process').exec; | ||
|
||
/** | ||
* Inline templates configuration. | ||
* @see https://github.com/ludohenin/gulp-inline-ng2-template | ||
*/ | ||
const INLINE_TEMPLATES = { | ||
SRC: './src/**/*.ts', | ||
DIST: './tmp/src-inlined', | ||
CONFIG: { | ||
base: '/src', | ||
target: 'es6', | ||
useRelativePaths: true, | ||
styleProcessor: compileSass | ||
} | ||
}; | ||
|
||
/** | ||
* Inline external HTML and SCSS templates into Angular component files. | ||
* @see: https://github.com/ludohenin/gulp-inline-ng2-template | ||
*/ | ||
gulp.task('inline-templates', () => { | ||
return gulp.src(INLINE_TEMPLATES.SRC) | ||
.pipe(inlineTemplates(INLINE_TEMPLATES.CONFIG)) | ||
.pipe(gulp.dest(INLINE_TEMPLATES.DIST)); | ||
}); | ||
|
||
/** | ||
* Build ESM by running npm task. | ||
* This is a temporary solution until ngc is supported --watch mode. | ||
* @see: https://github.com/angular/angular/issues/12867 | ||
*/ | ||
gulp.task('build:esm', ['inline-templates'], (callback) => { | ||
exec('npm run ngcompile', function (error, stdout, stderr) { | ||
console.log(stdout, stderr); | ||
callback(error) | ||
}); | ||
}); | ||
|
||
/** | ||
* Implements ESM build watch mode. | ||
* This is a temporary solution until ngc is supported --watch mode. | ||
* @see: https://github.com/angular/angular/issues/12867 | ||
*/ | ||
gulp.task('build:esm:watch', ['build:esm'], () => { | ||
gulp.watch('src/**/*', ['build:esm']); | ||
}); | ||
|
||
/** | ||
* Compile SASS to CSS. | ||
* @see https://github.com/ludohenin/gulp-inline-ng2-template | ||
* @see https://github.com/sass/node-sass | ||
*/ | ||
function compileSass(path, ext, file, callback) { | ||
let compiledCss = sass.renderSync({ | ||
file: path, | ||
outputStyle: 'compressed', | ||
}); | ||
callback(null, compiledCss.css); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import 'core-js'; | ||
import 'rxjs/Rx'; | ||
import 'zone.js/dist/zone'; | ||
import 'zone.js/dist/long-stack-trace-zone'; | ||
import 'zone.js/dist/async-test'; | ||
import 'zone.js/dist/fake-async-test'; | ||
import 'zone.js/dist/sync-test'; | ||
import 'zone.js/dist/proxy'; | ||
import 'zone.js/dist/jasmine-patch'; | ||
|
||
import { TestBed } from '@angular/core/testing'; | ||
|
||
import { | ||
BrowserDynamicTestingModule, | ||
platformBrowserDynamicTesting | ||
} from '@angular/platform-browser-dynamic/testing'; | ||
|
||
TestBed.initTestEnvironment( | ||
BrowserDynamicTestingModule, | ||
platformBrowserDynamicTesting() | ||
); | ||
|
||
const testsContext: any = require.context('./src', true, /\.spec/); | ||
testsContext.keys().forEach(testsContext); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import webpackTestConfig from './webpack-test.config'; | ||
import { ConfigOptions } from 'karma'; | ||
|
||
export default (config) => { | ||
config.set({ | ||
// Base path that will be used to resolve all patterns (eg. files, exclude). | ||
basePath: './', | ||
|
||
// Frameworks to use. | ||
// Available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ['jasmine'], | ||
|
||
// List of files to load in the browser. | ||
files: [ | ||
'karma-test-entry.ts' | ||
], | ||
|
||
// Preprocess matching files before serving them to the browser. | ||
// Available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'karma-test-entry.ts': ['webpack', 'sourcemap'] | ||
}, | ||
|
||
webpack: webpackTestConfig, | ||
|
||
// Webpack please don't spam the console when running in karma! | ||
webpackMiddleware: { | ||
noInfo: true, | ||
// Use stats to turn off verbose output. | ||
stats: { | ||
chunks: false | ||
} | ||
}, | ||
|
||
mime: { | ||
'text/x-typescript': [ 'ts' ] | ||
}, | ||
|
||
coverageIstanbulReporter: { | ||
reports: ['text-summary', 'html', 'lcovonly'], | ||
fixWebpackSourcePaths: true | ||
}, | ||
|
||
// Test results reporter to use. | ||
// Possible values: 'dots', 'progress'. | ||
// Available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ['mocha', 'coverage-istanbul'], | ||
|
||
// Level of logging | ||
// Possible values: | ||
// - config.LOG_DISABLE | ||
// - config.LOG_ERROR | ||
// - config.LOG_WARN | ||
// - config.LOG_INFO | ||
// - config.LOG_DEBUG | ||
logLevel: config.LOG_WARN, | ||
|
||
// Start these browsers. | ||
// Available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['Chrome'], | ||
|
||
browserConsoleLogOptions: { | ||
terminal: true, | ||
level: 'log' | ||
}, | ||
|
||
singleRun: true, | ||
colors: true | ||
} as ConfigOptions); | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.