Skip to content

Commit c41c30e

Browse files
authored
chore(project): add docs and more project configuration (#4)
1 parent cc93f51 commit c41c30e

File tree

9 files changed

+9964
-1058
lines changed

9 files changed

+9964
-1058
lines changed

.circleci/config.yml

+17-38
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
version: 2.1
22
executors:
3-
node8:
3+
node10:
44
docker:
5-
- image: circleci/node:8
6-
environment:
7-
NPM_CONFIG_PREFIX: ~/.npm-global
5+
- image: circleci/node:10
6+
environment:
7+
NPM_CONFIG_PREFIX: "~/.npm-global"
8+
working_directory: ~/repo
9+
810

911
commands:
1012
setup:
@@ -14,8 +16,8 @@ commands:
1416
keys:
1517
- v1-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
1618
- run:
17-
name: install npm 6.4.1
18-
command: sudo npm -g install npm@6.4.1
19+
name: install npm 6.9.0
20+
command: sudo npm -g install npm@6.9.0
1921
- run:
2022
name: Installing Dependencies
2123
command: npm install
@@ -29,7 +31,7 @@ commands:
2931

3032
jobs:
3133
build:
32-
executor: node8
34+
executor: node10
3335

3436
steps:
3537
- setup
@@ -40,8 +42,8 @@ jobs:
4042

4143
# test & get code coverage
4244
- run:
43-
name: Getting Code Coverage
44-
command: circleci tests glob test/test*.js | circleci tests split --split-by=timings | xargs ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- -R mocha-junit-reporter --exit && npx codecov
45+
name: Test and Code Coverage
46+
command: npm run test-ci
4547
environment:
4648
MOCHA_FILE: junit/test-results.xml
4749

@@ -51,17 +53,11 @@ jobs:
5153
- store_artifacts:
5254
path: junit
5355

54-
publish-pre-release:
55-
executor: node8
56+
semantic-release:
57+
executor: node10
5658

5759
steps:
5860
- setup
59-
60-
# uncomment and add proper fingerprint of the github.com R/W private key
61-
#- add_ssh_keys:
62-
# fingerprints:
63-
# - "6c:30:89:4d:a5:0f:8a:89:a7:4d:bb:98:d3:59:c4:f7"
64-
6561
- run:
6662
name: revert changes to package-lock.json
6763
command: git checkout -- package-lock.json
@@ -71,34 +67,17 @@ jobs:
7167
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
7268

7369
- run:
74-
name: version pre-release
75-
command: npm version prerelease --preid=pre -m "Release %s [ci skip]"
76-
environment:
77-
MOCHA_FILE: junit/test-results.xml
78-
79-
- store_test_results:
80-
path: junit
81-
82-
# unfortunately we cannot create a release commit with no tag with `npm version`, so we need to delete it here again
83-
- run:
84-
name: delete pre-release tag
85-
command: npm run delete-git-tag
86-
87-
- run:
88-
name: publish pre-release
89-
command: npm publish --tag next --access public
70+
name: Semantic Release
71+
command: npm run semantic-release
9072

9173
workflows:
9274
version: 2
9375
build:
9476
jobs:
9577
- build
96-
# the publish-pre-release jobs needs a $NPM_TOKEN environment to be setup and also have a
97-
# valid SSH_KEY added for the `github.com` host.
98-
- publish-pre-release:
78+
- semantic-release:
9979
requires:
10080
- build
10181
filters:
10282
branches:
103-
# rename to `master` once $NPM_TOKEN and github.com ssh key is setup.
104-
only: master_disabled
83+
only: master

.jsdoc.json

+16-25
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
{
2-
"plugins": [
3-
"plugins/markdown",
4-
"plugins/underscore"
5-
],
6-
"source": {
7-
"include": ["./src/"]
8-
},
9-
"opts": {
10-
"recurse": "true",
11-
"readme": "./README.md",
12-
"package": "./package.json",
13-
"destination": "./docs/",
14-
"template": "node_modules/docdash"
15-
},
16-
"docdash": {
17-
"static": true,
18-
"sort": false,
19-
"search": true,
20-
"wrap": true,
21-
"typedefs": true
22-
},
23-
"templates": {
24-
"cleverLinks": true
25-
}
26-
}
2+
"plugins": [],
3+
"recurseDepth": 10,
4+
"source": {
5+
"includePattern": ".+\\.js(doc|x)?$",
6+
"excludePattern": "(^|\\/|\\\\)_"
7+
},
8+
"sourceType": "module",
9+
"tags": {
10+
"allowUnknownTags": true,
11+
"dictionaries": ["jsdoc","closure"]
12+
},
13+
"templates": {
14+
"cleverLinks": false,
15+
"monospaceLinks": false
16+
}
17+
}

.npmignore

+11-8
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ coverage
22
.nyc_output/
33
node_modules/
44
junit
5-
tmp
5+
.idea
6+
test
7+
.snyk
8+
*.tgz
9+
build
610
logs
7-
.DS_Store
811
test-results.xml
9-
docs/
10-
test/
11-
.github
12+
snykmocha.js
13+
.releaserc.js
1214
.eslintignore
1315
.eslintrc.js
14-
.jsdoc.json
16+
.github
1517
.vscode
16-
CODE_OF_CONDUCT.md
17-
CONTRIBUTING.md
18+
.circleci
19+
docs
20+
.jsdoc.json

.releaserc.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
plugins: [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
["@semantic-release/changelog", {
6+
"changelogFile": "CHANGELOG.md",
7+
}],
8+
"@semantic-release/npm",
9+
["@semantic-release/git", {
10+
"assets": ["package.json", "CHANGELOG.md"],
11+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
12+
}],
13+
["@semantic-release/github", {}]
14+
]
15+
};

.snyk

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2+
version: v1.13.5
3+
ignore: {}
4+
patch: {}

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
11
# Ferrum
2+
3+
> Features from the rust language in javascript: Provides Traits/Type classes & an advanced library for working with sequences/iterators in js
4+
5+
## Status
6+
[![CircleCI](https://img.shields.io/circleci/project/github/adobe/ferrum/master.svg)](https://circleci.com/gh/adobe/ferrum/tree/master)
7+
[![codecov](https://img.shields.io/codecov/c/github/adobe/ferrum.svg)](https://codecov.io/gh/adobe/ferrum)
8+
[![GitHub license](https://img.shields.io/github/license/adobe/ferrum.svg)](https://github.com/adobe/ferrum/blob/master/LICENSE.txt)
9+
[![GitHub issues](https://img.shields.io/github/issues/adobe/ferrum.svg)](https://github.com/adobe/ferrum/issues)
10+
[![LGTM Code Quality Grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/adobe/ferrum.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/adobe/ferrum)
11+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
12+
13+
## Installation
14+
15+
```bash
16+
$ npm add ferrum
17+
```
18+
19+
## Usage
20+
21+
See the [API documentation](docs/API.md).
22+
23+
## Development
24+
25+
### Build
26+
27+
```bash
28+
$ npm install
29+
```
30+
31+
### Test
32+
33+
```bash
34+
$ npm test
35+
```
36+
37+
### Lint
38+
39+
```bash
40+
$ npm run lint
41+
```

0 commit comments

Comments
 (0)