From 94f8344e984e63d56fee06dc35a05717a85adc23 Mon Sep 17 00:00:00 2001 From: Simon Schick Date: Thu, 24 Nov 2016 14:59:55 +0100 Subject: [PATCH] update angular, move most deps to dev, fix lint, remove unused deps --- .npmignore | 55 ++-------------------------------------------------- package.json | 36 ++++++++++++++++------------------ src/index.ts | 7 +++---- tslint.json | 8 ++++++++ 4 files changed, 30 insertions(+), 76 deletions(-) diff --git a/.npmignore b/.npmignore index 225aa14..7e7a454 100644 --- a/.npmignore +++ b/.npmignore @@ -1,53 +1,2 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules - -# Users Environment Variables -.lock-wscript -.tsdrc - -#IntelliJ configuration files -.idea - -/demo -/test -Thumbs.db -.DS_Store -*.yml -!*.d.ts -/src -*.spec.* -*.e2e.* -CONTRIBUTING.md -karma-shim.js -karma.conf.js -protractor.conf.js -tsconfig.json -tslint.json -typedoc.json -webpack.config.js -.travis.yml -.jshintrc -.editorconfig +/* +!/dist diff --git a/package.json b/package.json index 1139d3d..e2b6a20 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "gulp build", "prepublish": "npm run build", "clean": "rimraf node_modules doc dist && npm cache clean", - "test:lint": "tslint 'src/**/*.ts' --project tsconfig.json --type-check", + "test:lint": "tslint --project tsconfig.json \"src/**/*.ts\"", "test:unit": "gulp test", "test": "npm-run-all --parallel test:lint test:unit", "start": "npm run serve", @@ -14,28 +14,27 @@ }, "main": "dist/index.js", "typings": "dist/index.d.ts", - "license": "Proprietary", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/WatchBeam/arcade-machine.git" + }, "dependencies": { - "@angular/common": "^2.0.1", - "@angular/compiler": "^2.0.1", - "@angular/core": "^2.0.1", - "@angular/platform-browser": "^2.0.1", - "@angular/platform-browser-dynamic": "^2.0.1", - "@types/core-js": "^0.9.34", - "core-js": "^2.4.1", - "rxjs": "^5.0.0-rc.1", - "systemjs": "0.19.38", - "zone.js": "^0.6.23" + "@angular/core": "^2.2.3", + "rxjs": "5.0.0-beta.12" }, "devDependencies": { + "@angular/common": "^2.2.3", + "@angular/compiler": "^2.2.3", + "@angular/platform-browser": "^2.2.3", + "@angular/platform-browser-dynamic": "^2.2.3", + "@types/core-js": "^0.9.34", "@types/jasmine": "^2.5.35", - "@types/lodash": "^4.14.36", "@types/node": "^6.0.45", "awesome-typescript-loader": "^2.2.4", "clean-webpack-plugin": "^0.1.10", "codelyzer": "0.0.28", - "copy-webpack-plugin": "^3.0.0", - "extract-text-webpack-plugin": "^1.0.1", + "core-js": "^2.4.1", "gulp": "^3.9.1", "gulp-clean": "^0.3.2", "gulp-concat": "^2.6.0", @@ -55,17 +54,16 @@ "karma-sourcemap-loader": "^0.3.7", "merge2": "^1.0.2", "npm-run-all": "^3.1.1", - "reflect-metadata": "^0.1.8", "rimraf": "^2.5.1", "run-sequence": "^1.2.2", - "sass-loader": "^4.0.2", + "systemjs": "0.19.38", "ts-helpers": "^1.1.1", "tslint": "^3.15.1", "tslint-loader": "^2.1.0", "tslint-microsoft-contrib": "^2.0.12", - "typedoc": "^0.3.12", "typescript": "2.0.3", "webpack": "^2.1.0-beta.25", - "webpack-dev-server": "^2.1.0-beta.7" + "webpack-dev-server": "^2.1.0-beta.7", + "zone.js": "^0.6.23" } } diff --git a/src/index.ts b/src/index.ts index ddeeaaa..17c4bae 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,9 @@ +import { ModuleWithProviders, NgModule } from '@angular/core'; + import { ArcDirective } from './arc.directive'; -import { NgModule, ModuleWithProviders } from '@angular/core'; - -import { InputService } from './input.service'; import { FocusService } from './focus.service'; +import { InputService } from './input.service'; import { RegistryService } from './registry.service'; - export { InputService } from './input.service'; export { FocusService } from './focus.service'; export { RegistryService } from './registry.service'; diff --git a/tslint.json b/tslint.json index 826fd46..767a996 100644 --- a/tslint.json +++ b/tslint.json @@ -15,6 +15,14 @@ "no-relative-imports": false, "no-stateless-class": false, "trailing-comma": [true, {"multiline": "always", "singleline": "never"}], + "no-for-in-array": false, + "restrict-plus-operands": false, + "function-name": [true, { + "method-regex": "^[a-z][\\w\\d]+$", + "private-method-regex": "^[a-z][\\w\\d]+$", + "static-method-regex": "^[a-z][\\w\\d]+$", + "function-regex": "^[a-z][\\w\\d]+$" + }], // Angular "directive-selector-name": [