Skip to content

Commit

Permalink
feat(travis): link MAINTAIN.md inside README.md and add comments to s…
Browse files Browse the repository at this point in the history
…cripts
  • Loading branch information
a.inkin authored and waterplea committed Mar 13, 2019
1 parent c40aaf9 commit 74cc813
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 24 deletions.
26 changes: 25 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -175,3 +174,28 @@
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2018 Tinkoff Bank

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ Use with template and reactive forms like that:
## Demo

https://stackblitz.com/edit/angular2-contenteditable-value-accessor

## Maintain

See [MAINTAIN.md](MAINTAIN.md)
28 changes: 21 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
"bugs": "https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/issues",
"homepage": "https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor#README",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build && npm run postbuild",
"lint": "ng lint",
"test": "ng test --browsers ChromeHeadless --watch=false --code-coverage",
"test:ci": "npm run check && npm run coveralls",
"coveralls": "cat coverage/angular-contenteditable-accessor/lcov.info | coveralls",
"release": "standard-version && npm run build",
"package": "node scripts/updatePackage.js && git add projects/angular-contenteditable-accessor/package.json",
"postbuild": "node scripts/copyReadme.js && node scripts/removeDependencies.js",
"check": "npm run lint && tsc --noEmit --skipLibCheck && npm run test && lint-staged",
"precommit": "npm run check && npm run package"
},
"ng": "ng",
"start": "ng serve",
"build": "ng build && npm run postbuild",
"lint": "ng lint",
"test": "ng test --browsers ChromeHeadless --watch=false --code-coverage",
"test:ci": "npm run check && npm run coveralls",
"coveralls": "cat coverage/angular-contenteditable-accessor/lcov.info | coveralls",
"release": "standard-version && npm run build",
"package": "node scripts/updatePackage.js && git add projects/angular-contenteditable-accessor/package.json",
"postbuild": "node scripts/copyReadme.js && node scripts/removeDependencies.js",
"check": "npm run lint && tsc --noEmit --skipLibCheck && npm run test && lint-staged",
"precommit": "npm run check && npm run package"
},
"husky": {
"hooks": {
"pre-commit": "npm run precommit"
Expand Down
17 changes: 16 additions & 1 deletion projects/angular-contenteditable-accessor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,20 @@
"peerDependencies": {
"@angular/core": ">=4.0.0",
"@angular/forms": ">=4.0.0"
}
},
"description": "This is a ControlValueAccessor for using Angular forms with contenteditable elements",
"keywords": [
"angular",
"contenteditable",
"form",
"ControlValueAccessor",
"ngmodel",
"formControl",
"control"
],
"license": "Apache-2.0",
"author": "Alex Inkin <[email protected]>",
"repository": "https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor",
"bugs": "https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor/issues",
"homepage": "https://github.com/TinkoffCreditSystems/angular-contenteditable-accessor#README"
}
1 change: 1 addition & 0 deletions scripts/copyReadme.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const DIST_LIB_PATH = 'dist/angular-contenteditable-accessor/';
const README_PATH = 'README.md';
const DIST_README_PATH = DIST_LIB_PATH + README_PATH;

// Copy README.md into dist folder
copyReadme();

function copyReadme() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/removeDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const INDENTATION = 4;

removeDependencies();

// Remove unnecessary auto added dependency:
// https://github.com/ng-packagr/ng-packagr/issues/1159
function removeDependencies() {
if (!fs.existsSync(DIST_LIB_PATH)) {
return;
}

// Sync dist package.json
fs.writeFileSync(DIST_PACKAGE_PATH,
JSON.stringify(
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/updatePackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const {
const LIB_PACKAGE_PATH = 'projects/angular-contenteditable-accessor/package.json';
const INDENTATION = 4;

// Sync library package.json metadata with main package.json
updatePackage();

function updatePackage() {
// Sync lib package.json
fs.writeFileSync(LIB_PACKAGE_PATH,
JSON.stringify(
{
Expand Down

0 comments on commit 74cc813

Please sign in to comment.