Skip to content

Commit

Permalink
Merge pull request #217 from satanTime/issues/export-all
Browse files Browse the repository at this point in the history
Issues/export all
  • Loading branch information
satanTime authored Oct 24, 2020
2 parents cd6aaa4 + ac5fcf4 commit 7a6bdfd
Show file tree
Hide file tree
Showing 100 changed files with 15,062 additions and 9,511 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/e2e/a11/node_modules
/node_modules
/test-reports
/tmp
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.DS_Store
.env
.idea
dist
node_modules
test-reports
/dist
/node_modules
/test-reports
/tmp
40 changes: 40 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const path = require('path');

module.exports = {
'*': filenames => {
const commands = [];
const cwd = process.cwd();
const files = filenames
.filter(file => !file.match(/\.(ts)$/i))
.map(file => path.relative(cwd, file))
.map(file => `'${file}'`);
if (files.length === 0) {
return [];
}

commands.push(`prettier --write ${files.join(' ')}`);

return commands;
},
'*.ts': filenames => {
const commands = [];
const cwd = process.cwd();
const files = filenames.map(file => path.relative(cwd, file)).map(file => `'${file}'`);
if (files.length === 0) {
return [];
}

const filesForLint = filenames
.map(file => path.relative(cwd, file))
.filter(file => !file.match(/^e2e\//i))
.filter(file => !file.match(/^test\//i))
.map(file => `'${file}'`);

if (filesForLint.length) {
commands.push(`npm run lint -- --fix --force ${filesForLint.join(' ')}`);
}
commands.push(`prettier --write ${files.join(' ')}`);

return commands;
},
};
24 changes: 24 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
release:
branches:
- master
plugins:
- '@semantic-release/commit-analyzer'
- - '@semantic-release/exec'
- prepareCmd: npm run lint && npm run test && npm run build
- '@semantic-release/release-notes-generator'
- - '@semantic-release/changelog'
- changelogFile: CHANGELOG.md
- - '@semantic-release/npm'
- tarballDir: tmp
npmPublish: false
- - '@semantic-release/github'
- assets:
- tmp/*.tgz
successComment: |-
${nextRelease.version} has been released and contains a fix for the issue.
Feel free to reopen the issue or to submit a new one if you meet any problems.
failTitle: false
failComment: false
labels: false
- - '@semantic-release/git'
- message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# How to contribute to ngMocks

The best way would be to discuss an issue or an improvement first:

- [ask a question on gitter](https://gitter.im/ng-mocks/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
- [report it as an issue on github](https://github.com/ike18t/ng-mocks/issues)

## How to release ngMocks

It is possible on Unix based OS, Windows has not been supported.

You need to create a `.env` file with the next content:

```dotenv
GH_TOKEN=<GITHUB_TOKEN>
NPM_TOKEN=<NPM_TOKEN>
GIT_AUTHOR_NAME=<YOUR_NAME>
GIT_AUTHOR_EMAIL=<YOUR_EMAIL>
GIT_COMMITTER_NAME=<YOUR_NAME>
GIT_COMMITTER_EMAIL=<YOUR_EMAIL>
```

An example of it is:

```dotenv
GH_TOKEN=123123123
NPM_TOKEN=123123123
GIT_AUTHOR_NAME=Best Coder
[email protected]
GIT_COMMITTER_NAME=Best Coder
[email protected]
```

After that you need to execute `npm run release`.

Profit.
Loading

0 comments on commit 7a6bdfd

Please sign in to comment.