Skip to content

Commit 076f9fb

Browse files
initial commit
1 parent 35f3294 commit 076f9fb

20 files changed

+5197
-1
lines changed

.circleci/config.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
version: 2.1
2+
executors:
3+
node8:
4+
docker:
5+
- image: circleci/node:8-stretch
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+
- run:
60+
name: revert changes to package-lock.json
61+
command: git checkout -- package-lock.json
62+
63+
- run:
64+
name: configure npm registry
65+
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
66+
67+
- run:
68+
name: version pre-release
69+
command: npm version prerelease --preid=pre -m "Release %s [ci skip]"
70+
environment:
71+
MOCHA_FILE: junit/test-results.xml
72+
73+
- store_test_results:
74+
path: junit
75+
76+
# unfortunately we cannot create a release commit with no tag with `npm version`, so we need to delete it here again
77+
- run:
78+
name: delete pre-release tag
79+
command: npm run delete-git-tag
80+
81+
- run:
82+
name: publish pre-release
83+
command: npm publish --tag next --access public
84+
85+
workflows:
86+
version: 2
87+
build:
88+
jobs:
89+
- build
90+
# the publish-pre-release jobs needs a $NPM_TOKEN environment to be setup and also have a
91+
# valid SSH_KEY added for the `github.com` host.
92+
- publish-pre-release:
93+
requires:
94+
- build
95+
filters:
96+
branches:
97+
# rename to `master` once $NPM_TOKEN and github.com ssh key is setup.
98+
only: master_disabled

.eslintignore

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

.eslintrc.js

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 dangling underscores for 'fields'
33+
'no-underscore-dangle': ['error', {'allowAfterThis': true}],
34+
35+
// enforce license header (todo: improve plugin to support patterns for multi-lines)
36+
'header/header': [2, 'block', ['',
37+
' * Copyright 2018 Adobe. All rights reserved.',
38+
' * This file is licensed to you under the Apache License, Version 2.0 (the "License");',
39+
' * you may not use this file except in compliance with the License. You may obtain a copy',
40+
' * of the License at http://www.apache.org/licenses/LICENSE-2.0',
41+
' *',
42+
' * Unless required by applicable law or agreed to in writing, software distributed under',
43+
' * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS',
44+
' * OF ANY KIND, either express or implied. See the License for the specific language',
45+
' * governing permissions and limitations under the License.',
46+
' ',
47+
]]
48+
}
49+
};

.github/ISSUE_TEMPLATE/bug_report.md

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

.github/ISSUE_TEMPLATE/discussion.md

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

CODE_OF_CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Adobe Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

0 commit comments

Comments
 (0)