Skip to content

Commit

Permalink
chore(tools): New packages, tslint rules and better tsconfig
Browse files Browse the repository at this point in the history
- Add packages to use in gulp
- stronger tsconfig options
- Added entries in package.json to
prepare the build of module using es5/es2015/umd formats
  • Loading branch information
tonivj5 committed Apr 26, 2017
1 parent 11c2e6e commit 5cba2a0
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 55 deletions.
79 changes: 48 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,65 @@
{
"name": "ng2-inline-editor",
"version": "0.1.1-alpha.17",
"keywords": [
"angular",
"angular4"
],
"bugs": {
"url": "https://github.com/caballerog/ng2-inline-editor/issues"
},
"license": "MIT",
"version": "0.1.1-alpha.18",
"author": {
"name": "Carlos Caballero",
"email": "[email protected]"
},
"main": "./index.js",
"typings": "ng2-inline-editor.d.ts",
"maintainers": [{
"name": "Carlos Caballero",
"email": "[email protected]"
},
{
"name": "Toni Villena",
"email": "[email protected]"
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caballerog/ng2-inline-editor"
},
"scripts": {
"build": "node_modules/.bin/gulp build && echo 'To publish a new version of library, please use npm run publish'",
"bugs": {
"url": "https://github.com/caballerog/ng2-inline-editor/issues"
},
"keywords": [
"angular",
"angular4"
],
"main": "ng2-inline-editor.umd.js",
"module": "ng2-inline-editor.es5.js",
"es2015": "ng2-inline-editor.es2015.js",
"typings": "ng2-inline-editor.d.ts",
"scripts": { <<
<< << < HEAD "build": "node_modules/.bin/gulp build && echo 'To publish a new version of library, please use npm run publish'",
"build:watch": "node_modules/.bin/gulp",
"clean": "node_modules/.bin/gulp clean",
"commit": "node_modules/.bin/git-cz",
"lint": "node_modules/.bin/tslint --type-check --project ./src/tsconfig.json src/**/*.ts",
"publish": "cd dist && npm publish",
"test": "node_modules/.bin/tsc && node_modules/.bin/karma start"
===
=== =
"build": "gulp build && echo 'To publish a new version of library, please use npm run publish'",
"build:watch": "gulp",
"clean": "gulp clean",
"commit": "git-cz",
"gulp": "gulp",
"lint": "tslint --type-check --project ./src/tsconfig.json src/**/*.ts",
>>>
>>> > chore(tools): New packages,
tslint rules and better tsconfig "publish": "cd dist && npm publish",
"test": "tsc && karma start"
},
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
},
"dependencies": {},
"peerDependencies": {
"@angular/common": "^4.0.2",
"@angular/core": "^4.0.2",
"@angular/forms": "^4.0.2"
},
"devDependencies": {
"@angular/common": "^4.0.2",
"@angular/compiler": "^4.0.2",
Expand All @@ -42,7 +68,9 @@
"@angular/forms": "^4.0.2",
"@types/del": "^2.2.32",
"@types/gulp": "^3.8.32",
"@types/gulp-rename": "^0.0.32",
"@types/jasmine": "^2.5.47",
"@types/merge2": "^0.3.30",
"@types/node": "~7.0.13",
"@types/run-sequence": "^0.0.28",
"codelyzer": "^3.0.0",
Expand All @@ -52,7 +80,10 @@
"del": "^2.2.2",
"gulp": "^3.9.1",
"gulp-inline-ng2-template": "^4.0.0",
"gulp-ngc": "^0.3.0",
"gulp-rename": "^1.2.2",
"gulp-rollup": "^2.11.0",
"gulp-typescript": "^3.1.6",
"jasmine-core": "^2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "^1.6.0",
Expand All @@ -63,6 +94,7 @@
"karma-jasmine-html-reporter": "^0.2.2",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.7",
"merge2": "^1.0.3",
"node-watch": "^0.5.2",
"phantomjs-prebuilt": "~2.1.14",
"protractor": "~5.1.0",
Expand All @@ -76,22 +108,7 @@
"typescript": "~2.2.2",
"zone.js": "^0.8.5"
},
"peerDependencies": {
"@angular/common": "^4.0.2",
"@angular/core": "^4.0.2",
"@angular/forms": "^4.0.2"
},
"engines": {
"node": ">=6.0.0"
},
"maintainers": [{
"name": "Carlos Caballero",
"email": "[email protected]"
},
{
"name": "Toni Villena",
"email": "[email protected]"
}
],
"module": "ng2-inline-editor.js"
}
}
11 changes: 3 additions & 8 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"module": "es2015",
"target": "es5",
//"baseUrl": ".",
"target": "es2015",
"stripInternal": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"moduleResolution": "node",
"outDir": "../build",
"rootDir": ".",
"lib": [
Expand All @@ -28,6 +23,6 @@
"flatModuleId": "ng2-inline-editor"
},
"files": [
"./index.ts"
"./inline-editor.module.ts"
]
}
15 changes: 15 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noUnusedParameters": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node"
}
}
14 changes: 2 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"target": "es2016",
"module": "commonjs",
"declaration": false,
"removeComments": true,
"noUnusedLocals": false,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2016"],
"sourceMap": true,
"pretty": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"typeRoots": [
"./node_modules/@types",
"./node_modules"
Expand All @@ -23,10 +17,6 @@
"node"
]
},
"files": [
"./*.ts",
"./**/*.ts"
],
"exclude": [
"node_modules",
"dist",
Expand Down
16 changes: 12 additions & 4 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
],
"no-arg": true,
"no-bitwise": true,
"templates-use-public": true,
"invoke-injectable": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"radix": true,
"no-console": [
true,
"debug",
Expand All @@ -53,7 +61,6 @@
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"object-literal-shorthand": true,
Expand All @@ -75,9 +82,10 @@
"multiline": "always",
"singleline": "never"
}],
"no-unused-variable": [
true
],
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"directive-selector": [true, "attribute", "inline-editor", "camelCase"],
"component-selector": [true, "element", "inline-editor", "kebab-case"],
"prefer-const": true,
"one-line": [
true,
Expand Down

0 comments on commit 5cba2a0

Please sign in to comment.