ng2-truncate
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -1,3 +0,4 @@ | ||
export declare class TruncateCharactersPipe { | ||
import { PipeTransform } from '@angular/core'; | ||
export declare class TruncateCharactersPipe implements PipeTransform { | ||
transform(value: string, limit?: number, trail?: String): string; | ||
} |
@@ -1,3 +0,4 @@ | ||
export declare class TruncateWordsPipe { | ||
import { PipeTransform } from '@angular/core'; | ||
export declare class TruncateWordsPipe implements PipeTransform { | ||
transform(value: string, limit?: number, trail?: String): string; | ||
} |
@@ -0,2 +1,4 @@ | ||
import { TruncateCharactersPipe } from './truncate-characters.pipe'; | ||
export declare const TRUNCATE_PIPES: typeof TruncateCharactersPipe[]; | ||
export declare class TruncateModule { | ||
} |
@@ -11,2 +11,3 @@ "use strict"; | ||
var truncate_words_pipe_1 = require("./truncate-words.pipe"); | ||
exports.TRUNCATE_PIPES = [truncate_characters_pipe_1.TruncateCharactersPipe, truncate_words_pipe_1.TruncateWordsPipe]; | ||
var TruncateModule = (function () { | ||
@@ -19,4 +20,4 @@ function TruncateModule() { | ||
core_1.NgModule({ | ||
declarations: [truncate_characters_pipe_1.TruncateCharactersPipe, truncate_words_pipe_1.TruncateWordsPipe], | ||
exports: [truncate_characters_pipe_1.TruncateCharactersPipe, truncate_words_pipe_1.TruncateWordsPipe] | ||
declarations: [exports.TRUNCATE_PIPES], | ||
exports: [exports.TRUNCATE_PIPES] | ||
}) | ||
@@ -23,0 +24,0 @@ ], TruncateModule); |
@@ -1,58 +0,24 @@ | ||
// Turn on full stack traces in errors to help debugging | ||
Error.stackTraceLimit=Infinity; | ||
Error.stackTraceLimit = Infinity; | ||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 100; | ||
require('core-js/es6'); | ||
require('reflect-metadata'); | ||
require('rxjs'); | ||
require('zone.js/dist/zone'); | ||
require('zone.js/dist/long-stack-trace-zone'); | ||
require('zone.js/dist/async-test'); | ||
require('zone.js/dist/fake-async-test'); | ||
require('zone.js/dist/sync-test'); | ||
require('zone.js/dist/proxy'); | ||
require('zone.js/dist/jasmine-patch'); | ||
// Cancel Karma's synchronous start, | ||
// we will call `__karma__.start()` later, once all the specs are loaded. | ||
__karma__.loaded = function() {}; | ||
var appContext = require.context('./src', true, /\.spec\.ts/); | ||
System.config({ | ||
baseURL: '/base/', | ||
defaultJSExtensions: true, | ||
map: { | ||
'@angular': 'node_modules/@angular', | ||
'rxjs': 'node_modules/rxjs' | ||
}, | ||
packages: { | ||
'@angular/common': { main: 'index.js', defaultExtension: 'js' }, | ||
'@angular/compiler': { main: 'index.js', defaultExtension: 'js' }, | ||
'@angular/core': { main: 'index.js', defaultExtension: 'js' }, | ||
'@angular/platform-browser': { main: 'index.js', defaultExtension: 'js' } | ||
} | ||
}); | ||
appContext.keys().forEach(appContext); | ||
System.import('@angular/platform-browser/src/browser/browser_adapter').then(function(browser_adapter) { | ||
browser_adapter.BrowserDomAdapter.makeCurrent(); | ||
}).then(function() { | ||
return Promise.all( | ||
Object.keys(window.__karma__.files) // All files served by Karma. | ||
.filter(onlySpecFiles) | ||
.map(file2moduleName) | ||
.map(function(path) { | ||
return System.import(path).then(function(module) { | ||
if (module.hasOwnProperty('main')) { | ||
module.main(); | ||
} | ||
}); | ||
})); | ||
}) | ||
.then(function() { | ||
__karma__.start(); | ||
}, function(error) { | ||
console.error(error.message || error); | ||
console.error(error.stack || error); | ||
__karma__.start(); | ||
}); | ||
var testing = require('@angular/core/testing'); | ||
var browser = require('@angular/platform-browser-dynamic/testing'); | ||
function onlySpecFiles(path) { | ||
return /[\.|_]spec\.js$/.test(path); | ||
} | ||
// Normalize paths to module names. | ||
function file2moduleName(filePath) { | ||
return filePath.replace(/\\/g, '/') | ||
.replace(/^\/base\//, '') | ||
.replace(/\.js/, ''); | ||
} | ||
testing.getTestBed().initTestEnvironment( | ||
browser.BrowserDynamicTestingModule, | ||
browser.platformBrowserDynamicTesting() | ||
); |
@@ -1,16 +0,8 @@ | ||
// Karma configuration | ||
// Generated on Wed Jul 20 2016 11:28:18 GMT-0300 (ART) | ||
module.exports = function(config) { | ||
config.set({ | ||
module.exports = function (config) { | ||
var _config = { | ||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '', | ||
basePath: './', | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-typescript-preprocessor') | ||
], | ||
// frameworks to use | ||
@@ -20,61 +12,31 @@ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
// list of files / patterns to load in the browser | ||
files: [ | ||
{ pattern: 'node_modules/es6-shim/es6-shim.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/traceur/bin/traceur.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/systemjs/dist/system-polyfills.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/zone.js/dist/async-test.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/zone.js/dist/fake-async-test.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: false }, | ||
{ pattern: 'node_modules/@angular/**/*.js', included: false, served: true }, | ||
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false, served: true }, | ||
{ pattern: 'dist/**/*.js', included: false, watched: true }, | ||
{ pattern: 'src/**/*.spec.ts', included: false, watched: true }, | ||
{ pattern: 'karma-test-shim.js', included: true, watched: true } | ||
{ pattern: './karma-test-shim.js', watched: false } | ||
], | ||
// files: [ | ||
preprocessors: { | ||
'./karma-test-shim.js': ['webpack', 'sourcemap'] | ||
}, | ||
// // Distribution folder. | ||
// { pattern: 'dist/**/*', included: false, watched: true } | ||
// ], | ||
// exclude: [ | ||
// // Vendor packages might include spec files. We don't want to use those. | ||
// 'dist/vendor/**/*.spec.js' | ||
// ], | ||
webpack: { | ||
resolve: { | ||
extensions: ['', '.ts', '.js'] | ||
}, | ||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.ts$/, | ||
loader: 'ts' | ||
} | ||
] | ||
} | ||
}, | ||
// list of files to exclude | ||
exclude: [ | ||
], | ||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'**/*.spec.ts': ['typescript'] | ||
webpackMiddleware: { | ||
stats: 'errors-only' | ||
}, | ||
typescriptPreprocessor: { | ||
// options: require('./tsconfig.json').compilerOptions, | ||
options: { | ||
sourceMap: false, // (optional) Generates corresponding .map file. | ||
target: 'ES5', // (optional) Specify ECMAScript target version: 'ES3' (default), or 'ES5' | ||
module: 'commonjs', // (optional) Specify module code generation: 'commonjs' or 'amd' | ||
noImplicitAny: true, // (optional) Warn on expressions and declarations with an implied 'any' type. | ||
noResolve: true, // (optional) Skip resolution and preprocessing. | ||
removeComments: true, // (optional) Do not emit comments to output. | ||
concatenateOutput: false // (optional) Concatenate and emit output to single file. By default true if module option is omited, otherwise false. | ||
}, | ||
typings: [ | ||
"typings/index.d.ts" | ||
], | ||
transformPath: function(path) { | ||
return path.replace(/\.ts$/, '.js'); | ||
} | ||
webpackServer: { | ||
noInfo: true | ||
}, | ||
@@ -86,34 +48,20 @@ | ||
reporters: ['progress'], | ||
// web server port | ||
port: 9876, | ||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
autoWatch: false, | ||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ['Chrome'], | ||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: false, | ||
singleRun: false | ||
}; | ||
// Concurrency level | ||
// how many browser should be started simultaneous | ||
concurrency: Infinity | ||
}) | ||
} | ||
config.set(_config); | ||
}; |
{ | ||
"name": "ng2-truncate", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"license": "MIT", | ||
@@ -8,9 +8,11 @@ "main": "./dist/index.js", | ||
"scripts": { | ||
"build": "rm -rf dist && tsc", | ||
"prebuild": "rm -r dist", | ||
"build": "npm run ngc", | ||
"lint": "tslint src/**/*.ts", | ||
"test": "tsc && karma start", | ||
"test-ci": "tsc && karma start --single-run true", | ||
"test": "karma start", | ||
"test-ci": "karma start --single-run true", | ||
"postinstall": "typings install", | ||
"prepublish": "tsc", | ||
"prepublish": "npm run ngc", | ||
"tsc": "tsc", | ||
"ngc": "ngc", | ||
"typings": "typings" | ||
@@ -33,5 +35,9 @@ }, | ||
"devDependencies": { | ||
"@angular/common": "^2.4.2", | ||
"@angular/compiler": "^2.4.2", | ||
"@angular/platform-browser": "^2.4.2", | ||
"@angular/common": "^2.4.3", | ||
"@angular/compiler": "^2.4.3", | ||
"@angular/compiler-cli": "^2.4.3", | ||
"@angular/platform-browser": "^2.4.3", | ||
"@angular/platform-browser-dynamic": "^2.4.3", | ||
"codelyzer": "^2.0.0-beta.4", | ||
"es6-shim": "0.35.1", | ||
"jasmine-core": "2.4.1", | ||
@@ -43,18 +49,19 @@ "jasmine-spec-reporter": "2.5.0", | ||
"karma-requirejs": "^1.0.0", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-typescript-preprocessor": "^0.2.1", | ||
"karma-webpack": "^2.0.1", | ||
"reflect-metadata": "0.1.3", | ||
"requirejs": "^2.1.0", | ||
"systemjs": "^0.19.31", | ||
"rxjs": "^5.0.2", | ||
"traceur": "0.0.111", | ||
"codelyzer": "^2.0.0-beta.4", | ||
"es6-shim": "0.35.1", | ||
"reflect-metadata": "0.1.3", | ||
"rxjs": "^5.0.2", | ||
"tslint": "^3.6.0", | ||
"ts-loader": "^1.3.3", | ||
"tslint": "^4.3.1", | ||
"typescript": "^2.1.5", | ||
"zone.js": "^0.6.21" | ||
"webpack": "^1.14.0", | ||
"zone.js": "^0.7.6" | ||
}, | ||
"dependencies": { | ||
"@angular/core": "^2.4.2", | ||
"@angular/core": "^2.4.3", | ||
"typings": "^1.0.4" | ||
} | ||
} |
@@ -7,2 +7,3 @@ { | ||
"experimentalDecorators": true, | ||
"noEmitHelpers": false, | ||
"moduleResolution": "node", | ||
@@ -18,6 +19,19 @@ "sourceMap": true, | ||
], | ||
"lib": [ | ||
"es6", | ||
"dom" | ||
], | ||
"types": [ | ||
"jasmine", | ||
"node" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"dist" | ||
] | ||
"dist", | ||
"aot" | ||
], | ||
"angularCompilerOptions": { | ||
"genDir": "aot", | ||
"skipMetadataEmit" : false | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159696
31
25
1222
Updated@angular/core@^2.4.3