Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmh committed Jan 3, 2023
0 parents commit 86bcb65
Show file tree
Hide file tree
Showing 63 changed files with 19,308 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
charset = utf-8
# Get rid of whitespace to avoid diffs with a bunch of EOL changes
trim_trailing_whitespace = true
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

# TypeScript/JavaScript/JSON files
[*.{ts,js,json}]
indent_size = 2

# XLF/XML files
[*.{xlf,xml}]
indent_style = tab

# YAML-Files
[*.{yaml,yml}]
indent_size = 2

# ReST-Files
[*.rst]
indent_size = 3

# SQL files
[*.sql]
indent_style = tab
indent_size = 2

# HTML files
[*.html]
indent_size = 2

# CSS/SCSS files
[*.{css,scss}]
indent_size = 2
19 changes: 19 additions & 0 deletions .github/workflows/git-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check Commit Message

on:
pull_request:
types: [opened, edited, reopened, synchronize, ready_for_review, review_requested]

jobs:

check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest

steps:
- name: Check Commit Type
uses: gsactions/commit-message-checker@v1
with:
pattern: '^(|\[(!!!)\])\[(FEATURE|BUGFIX|TASK|TEST|DOC|WIP)\] .+$'
flags: 'gm'
error: 'Your first line has to contain a commit prefix like "[FEATURE|BUGFIX|TASK|TEST|DOC|WIP]".'
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run tests

on: [push, pull_request]

jobs:

main:
name: Run tests
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v2

- name: Set up Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm@^8
run: npm install -g npm@^8

- name: Install npm dependencies
run: npm ci

- name: Run npm test
run: npm test

- name: PKG versions
run: |
node -v
npm -v
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# HubSpot configs
hubspot.config.yaml
hubspot.config.yml

.vscode/*
!.vscode/settings.json

theme/assets/*
src/tmp/*

node_modules
.env
.env*
.idea
.DS_Store
Empty file added .hsignore
Empty file.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.associations": {
"**/theme/**/*.html": "html-hubl",
"**/theme/css/**/*.css": "css-hubl"
},
"hubspot.beta": true,
"hubspot.hublLinting": true
}
Empty file added CHANGELOG.md
Empty file.
Empty file added LICENSE
Empty file.
Empty file added README.md
Empty file.
4 changes: 4 additions & 0 deletions build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from './config.js'
import { build } from '@resultify/hubspot-cms-lib/lib/cmd/build.js'

build({ config })
17 changes: 17 additions & 0 deletions build/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const config = {}
config.js = {}
// JS | Rollup config
// external (https://rollupjs.org/guide/en/#external)
config.js.external = [
'@popperjs/core'
]
// replace (https://github.com/rollup/plugins/tree/master/packages/replace)
config.js.replace = {
'global.SimpleLightbox': 'window.SimpleLightbox'
}
// globals (https://rollupjs.org/guide/en/#outputglobals)
config.js.globals = {
'@popperjs/core': 'Popper = () => {}'
}

export { config }
3 changes: 3 additions & 0 deletions build/fetchAll.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { hubspotFetchAll } from '@resultify/hubspot-cms-lib/lib/cmd/fetchAll.js'

hubspotFetchAll()
3 changes: 3 additions & 0 deletions build/fetchModules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { hubspotFetchModules } from '@resultify/hubspot-cms-lib/lib/cmd/fetchModules.js'

hubspotFetchModules()
8 changes: 8 additions & 0 deletions build/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"checkJs": true,
"moduleResolution": "node"
}
}
4 changes: 4 additions & 0 deletions build/upload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from './config.js'
import { upload } from '@resultify/hubspot-cms-lib/lib/cmd/upload.js'

upload({ config })
4 changes: 4 additions & 0 deletions build/watch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { config } from './config.js'
import { watch } from '@resultify/hubspot-cms-lib/lib/cmd/watch.js'

watch({ config })
Loading

0 comments on commit 86bcb65

Please sign in to comment.