Skip to content

Commit 6126e74

Browse files
authored
Initial commit
0 parents  commit 6126e74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+6768
-0
lines changed

.editorconfig

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[*.js]
2+
indent_size = 2
3+
4+
[*.css]
5+
indent_size = 4

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
helix-importer-ui

.eslintrc.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
root: true,
3+
extends: 'airbnb-base',
4+
env: {
5+
browser: true,
6+
},
7+
parser: '@babel/eslint-parser',
8+
parserOptions: {
9+
allowImportExportEverywhere: true,
10+
sourceType: 'module',
11+
requireConfigFile: false,
12+
},
13+
rules: {
14+
'import/extensions': ['error', { js: 'always' }], // require js file extensions in imports
15+
'linebreak-style': ['error', 'unix'], // enforce unix linebreaks
16+
'no-param-reassign': [2, { props: false }], // allow modifying properties of param
17+
},
18+
};

.github/pull_request_template.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Please always provide the [GitHub issue(s)](../issues) your PR is for, as well as test URLs where your change can be observed (before and after):
2+
3+
Fix #<gh-issue-id>
4+
5+
Test URLs:
6+
- Before: https://main--{repo}--{owner}.aem.live/
7+
- After: https://<branch>--{repo}--{owner}.aem.live/
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will run upon repository creation and clean up
2+
# all files that are not strictly required to build an AEM Live project
3+
# but that we use to develop the project template. This includes this
4+
# particular workflow file.
5+
on:
6+
create:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
jobs:
11+
cleanup:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
actions: write
16+
# only run if commit message is "Initial commit" on main branch
17+
if: ${{ github.event_name == 'workflow_dispatch' || ( github.ref == 'refs/heads/main' && !(contains(github.event, 'head_commit') || github.event.head_commit.message == 'Initial commit' )) }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Use Node.js 20
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
- name: Remove Helper Files
26+
run: |
27+
rm -rf \
28+
.github/workflows/cleanup-on-create.yaml \
29+
CHANGELOG.md
30+
31+
- name: Initialize README
32+
# replace {repo} and {owner} with the actual values
33+
run: |
34+
sed -i.bak "s/{repo}/$(basename ${{ github.repository }})/g" README.md
35+
sed -i.bak "s/{owner}/$(dirname ${{ github.repository }})/g" README.md
36+
- name: Initialize Pull Request Template
37+
run: |
38+
sed -i.bak "s/{repo}/$(basename ${{ github.repository }})/g" .github/pull_request_template.md
39+
sed -i.bak "s/{owner}/$(dirname ${{ github.repository }})/g" .github/pull_request_template.md
40+
41+
42+
# commit back to the repository
43+
- name: Commit changes
44+
run: |
45+
git config --local user.email "[email protected]"
46+
git config --local user.name "AEM Bot"
47+
git add .
48+
git commit -m "chore: cleanup repository template"
49+
git push

.github/workflows/main.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Use Node.js 20
10+
uses: actions/setup-node@v4
11+
with:
12+
node-version: 20
13+
- run: npm ci
14+
- run: npm run lint

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.hlx/*
2+
coverage/*
3+
logs/*
4+
node_modules/*
5+
6+
helix-importer-ui
7+
.DS_Store
8+
*.bak
9+
.idea

.hlxignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.*
2+
*.md
3+
karma.config.js
4+
LICENSE
5+
package.json
6+
package-lock.json
7+
test/*

.renovaterc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["config:recommended"]
3+
}

.stylelintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["stylelint-config-standard"]
3+
}

404.html

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>Page not found</title>
6+
<script type="text/javascript">
7+
window.isErrorPage = true;
8+
window.errorCode = '404';
9+
</script>
10+
<meta name="viewport" content="width=device-width, initial-scale=1">
11+
<meta property="og:title" content="Page not found">
12+
<script src="/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
13+
<script type="module">
14+
window.addEventListener('load', () => {
15+
if (document.referrer) {
16+
const { origin, pathname } = new URL(document.referrer);
17+
if (origin === window.location.origin) {
18+
const backBtn = document.createElement('a');
19+
backBtn.classList.add('button', 'error-button-back');
20+
backBtn.href = pathname;
21+
backBtn.textContent = 'Go back';
22+
backBtn.title = 'Go back';
23+
const btnContainer = document.querySelector('.button-container');
24+
btnContainer.append(backBtn);
25+
}
26+
}
27+
});
28+
</script>
29+
<script type="module">
30+
import { sampleRUM } from '/scripts/aem.js';
31+
sampleRUM('404', { source: document.referrer });
32+
</script>
33+
<link rel="stylesheet" href="/styles/styles.css">
34+
<style>
35+
main.error {
36+
min-height: calc(100vh - var(--nav-height));
37+
display: flex;
38+
align-items: center;
39+
}
40+
41+
main.error .error-number {
42+
width: 100%;
43+
}
44+
45+
main.error .error-number text {
46+
font-family: monospace;
47+
}
48+
</style>
49+
<link rel="stylesheet" href="/styles/lazy-styles.css">
50+
</head>
51+
52+
<body>
53+
<header></header>
54+
<main class="error">
55+
<div class="section">
56+
<svg viewBox="1 0 38 18" class="error-number">
57+
<text x="0" y="17">404</text>
58+
</svg>
59+
<h2 class="error-message">Page Not Found</h2>
60+
<p class="button-container">
61+
<a href="/" class="button secondary error-button-home">Go home</a>
62+
</p>
63+
</div>
64+
</main>
65+
<footer></footer>
66+
</body>
67+
68+
</html>

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/

CONTRIBUTING.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing to Project Helix
2+
3+
This project (like almost all of Project Helix) is an Open Development project and welcomes contributions from everyone who finds it useful or lacking.
4+
5+
## Code Of Conduct
6+
7+
This project adheres to the Adobe [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to cstaub at adobe dot com.
8+
9+
## Contributor License Agreement
10+
11+
All third-party contributions to this project must be accompanied by a signed contributor license. This gives Adobe permission to redistribute your contributions as part of the project. [Sign our CLA](http://opensource.adobe.com/cla.html)! You only need to submit an Adobe CLA one time, so if you have submitted one previously, you are good to go!
12+
13+
## Things to Keep in Mind
14+
15+
This project uses a **commit then review** process, which means that for approved maintainers, changes can be merged immediately, but will be reviewed by others.
16+
17+
For other contributors, a maintainer of the project has to approve the pull request.
18+
19+
# Before You Contribute
20+
21+
* Check that there is an existing issue in GitHub issues
22+
* Check if there are other pull requests that might overlap or conflict with your intended contribution
23+
24+
# How to Contribute
25+
26+
1. Fork the repository
27+
2. Make some changes on a branch on your fork
28+
3. Create a pull request from your branch
29+
30+
In your pull request, outline:
31+
32+
* What the changes intend
33+
* How they change the existing code
34+
* If (and what) they breaks
35+
* Start the pull request with the GitHub issue ID, e.g. #123
36+
37+
Lastly, please follow the [pull request template](.github/pull_request_template.md) when submitting a pull request!
38+
39+
Each commit message that is not part of a pull request:
40+
41+
* Should contain the issue ID like `#123`
42+
* Can contain the tag `[trivial]` for trivial changes that don't relate to an issue
43+
44+
45+
46+
## Coding Styleguides
47+
48+
We enforce a coding styleguide using `eslint`. As part of your build, run `npm run lint` to check if your code is conforming to the style guide. We do the same for every PR in our CI, so PRs will get rejected if they don't follow the style guide.
49+
50+
You can fix some of the issues automatically by running `npx eslint . --fix`.
51+
52+
## Commit Message Format
53+
54+
This project uses a structured commit changelog format that should be used for every commit. Use `npm run commit` instead of your usual `git commit` to generate commit messages using a wizard.
55+
56+
```bash
57+
# either add all changed files
58+
$ git add -A
59+
# or selectively add files
60+
$ git add package.json
61+
# then commit using the wizard
62+
$ npm run commit
63+
```
64+
65+
# How Contributions get Reviewed
66+
67+
One of the maintainers will look at the pull request within one week. Feedback on the pull request will be given in writing, in GitHub.
68+
69+
# Release Management
70+
71+
The project's committers will release to the [Adobe organization on npmjs.org](https://www.npmjs.com/org/adobe).
72+
Please contact the [Adobe Open Source Advisory Board](https://git.corp.adobe.com/OpenSourceAdvisoryBoard/discuss/issues) to get access to the npmjs organization.
73+

0 commit comments

Comments
 (0)