Skip to content

Commit 946c3a9

Browse files
committed
initial!
0 parents  commit 946c3a9

28 files changed

+8791
-0
lines changed

.circleci/config.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
version: 2.1
2+
executors:
3+
node8:
4+
docker:
5+
- image: circleci/node:8
6+
environment:
7+
NPM_CONFIG_PREFIX: ~/.npm-global
8+
9+
commands:
10+
setup:
11+
steps:
12+
- checkout
13+
- restore_cache:
14+
keys:
15+
- v1-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
16+
- run:
17+
name: install npm 6.4.1
18+
command: sudo npm -g install [email protected]
19+
- run:
20+
name: Installing Dependencies
21+
command: npm install
22+
- save_cache:
23+
paths:
24+
- node_modules
25+
key: v1-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
26+
- run:
27+
name: prepare test git user
28+
command: git config --global user.email "[email protected]" && git config --global user.name "CircleCi Build"
29+
30+
jobs:
31+
build:
32+
executor: node8
33+
34+
steps:
35+
- setup
36+
- run: mkdir junit
37+
- run:
38+
name: Lint
39+
command: npm run lint
40+
41+
# test & get code coverage
42+
- 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+
environment:
46+
MOCHA_FILE: junit/test-results.xml
47+
48+
- store_test_results:
49+
path: junit
50+
51+
- store_artifacts:
52+
path: junit
53+
54+
publish-pre-release:
55+
executor: node8
56+
57+
steps:
58+
- 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+
65+
- run:
66+
name: revert changes to package-lock.json
67+
command: git checkout -- package-lock.json
68+
69+
- run:
70+
name: configure npm registry
71+
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
72+
73+
- 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
90+
91+
workflows:
92+
version: 2
93+
build:
94+
jobs:
95+
- 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:
99+
requires:
100+
- build
101+
filters:
102+
branches:
103+
# rename to `master` once $NPM_TOKEN and github.com ssh key is setup.
104+
only: master_disabled

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode/*
2+
coverage/*

.eslintrc.js

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright 2018 Adobe. All rights reserved.
3+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License. You may obtain a copy
5+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under
8+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9+
* OF ANY KIND, either express or implied. See the License for the specific language
10+
* governing permissions and limitations under the License.
11+
*/
12+
13+
module.exports = {
14+
'env': {
15+
'node': true,
16+
'es6': true
17+
},
18+
// this is the root project for all sub modules. stop searching for any
19+
// eslintrc files in parent directories.
20+
'root': true,
21+
'parserOptions': {
22+
'sourceType': 'script',
23+
'ecmaVersion': 10,
24+
},
25+
'plugins': [
26+
'header',
27+
],
28+
'extends': 'airbnb',
29+
'rules': {
30+
'strict': 0,
31+
32+
// Allow while (true) infinite loops
33+
'no-constant-condition': ["error", { "checkLoops": false }],
34+
35+
// Forbid multiple statements in one line
36+
'max-statements-per-line': ["error", { "max": 1 }],
37+
38+
// Allow for-of loops
39+
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
40+
41+
// Allow return before else & redundant else statements
42+
'no-else-return': 'off',
43+
44+
// allow dangling underscores for 'fields'
45+
'no-underscore-dangle': ['error', {'allowAfterThis': true}],
46+
47+
// enforce license header (todo: improve plugin to support patterns for multi-lines)
48+
'header/header': [2, 'block', ['',
49+
' * Copyright 2019 Adobe. All rights reserved.',
50+
' * This file is licensed to you under the Apache License, Version 2.0 (the "License");',
51+
' * you may not use this file except in compliance with the License. You may obtain a copy',
52+
' * of the License at http://www.apache.org/licenses/LICENSE-2.0',
53+
' *',
54+
' * Unless required by applicable law or agreed to in writing, software distributed under',
55+
' * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS',
56+
' * OF ANY KIND, either express or implied. See the License for the specific language',
57+
' * governing permissions and limitations under the License.',
58+
' ',
59+
]]
60+
}
61+
};

.github/ISSUE_TEMPLATE/bug_report.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
labels: bug
5+
6+
---
7+
8+
**Description**
9+
A clear and concise description of what the bug is.
10+
11+
**To Reproduce**
12+
Steps to reproduce the behavior:
13+
1. Go to '...'
14+
2. Click on '....'
15+
3. Scroll down to '....'
16+
4. See error
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Screenshots**
22+
If applicable, add screenshots to help explain your problem.
23+
24+
**Version:**
25+
run: `$ hlx --version`
26+
27+
**Additional context**
28+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/discussion.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Discussion
3+
about: Start a new discussion
4+
labels: question
5+
6+
---
7+
8+
## Overview
9+
whats' this discussion about?
10+
11+
## Details
12+
more details
13+
14+
## Proposed Actions
15+
and now?
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
labels: enhancement
5+
6+
---
7+
8+
**Is your feature request related to a problem? Please describe.**
9+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
11+
**Describe the solution you'd like**
12+
A clear and concise description of what you want to happen.
13+
14+
**Describe alternatives you've considered**
15+
A clear and concise description of any alternative solutions or features you've considered.
16+
17+
**Additional context**
18+
Add any other context or screenshots about the feature request here.

.github/move.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Configuration for move-issues - https://github.com/dessant/move-issues
2+
3+
# Delete the command comment when it contains no other content
4+
deleteCommand: true
5+
6+
# Close the source issue after moving
7+
closeSourceIssue: true
8+
9+
# Lock the source issue after moving
10+
lockSourceIssue: true
11+
12+
# Mention issue and comment authors
13+
mentionAuthors: true
14+
15+
# Preserve mentions in the issue content
16+
keepContentMentions: true

.github/pull_request_template.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Please ensure your pull request adheres to the following guidelines:
2+
- [ ] make sure to link the related issues in this description
3+
- [ ] when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes
4+
5+
## Related Issues
6+
7+
8+
Thanks for contributing!

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
coverage
2+
.nyc_output/
3+
node_modules/
4+
junit
5+
tmp
6+
logs
7+
.DS_Store
8+
test-results.xml

.npmignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage
2+
.nyc_output/
3+
node_modules/
4+
junit

.vscode/launch.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "attach",
10+
"name": "Attach",
11+
"port": 9229
12+
},
13+
{
14+
"type": "node",
15+
"request": "launch",
16+
"name": "Mocha All",
17+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
18+
"args": [
19+
"--timeout",
20+
"999999",
21+
"--colors",
22+
"${workspaceFolder}/test"
23+
],
24+
"console": "integratedTerminal",
25+
"internalConsoleOptions": "neverOpen"
26+
},
27+
{
28+
"type": "node",
29+
"request": "launch",
30+
"name": "Mocha Current File",
31+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
32+
"args": [
33+
"--timeout",
34+
"999999",
35+
"--colors",
36+
"${file}"
37+
],
38+
"console": "integratedTerminal",
39+
"internalConsoleOptions": "neverOpen"
40+
},
41+
{
42+
"type": "node",
43+
"request": "launch",
44+
"name": "Launch 'hlx up'",
45+
"program": "${workspaceFolder}/index.js",
46+
"args":[
47+
"up"
48+
]
49+
}
50+
]
51+
}

.vscode/settings.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

0 commit comments

Comments
 (0)