Skip to content

Commit

Permalink
v1.11
Browse files Browse the repository at this point in the history
## Version 1.11.0
### Changes
- The "addAsSubmodule" param for the init and import commands was renamed to "useSubmodules". It now defaults to false instead of true.
- When upgrading a theme checked in as regular files, Jambo now automatically removes the .git folder.
- The init and import commands now support a "themeUrl" param, which lets you specify a git URL to use for the theme.
- Jambo now supports multiline {{ translate }} helpers.
  • Loading branch information
oshi97 committed May 11, 2021
2 parents c7924b0 + a83a26a commit 08570c2
Show file tree
Hide file tree
Showing 43 changed files with 1,379 additions and 594 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"ignorePatterns": ["tests/fixtures/**/*.js"],
"rules": {
"arrow-spacing": "error",
"quotes": ["error", "single"],
"space-before-function-paren": ["error", {
"named": "never",
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json linguist-language=JSON-with-Comments
32 changes: 32 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will run our tests, generate an lcov code coverage file,
# and send that coverage to Coveralls

name: Code Coverage

on:
push:
branches-ignore: dev/*
pull_request:

jobs:
Coveralls:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: git config --global user.email "slapshot@yext.com"
- run: git config --global user.name "Jambo run-tests.yml"
- run: npx jest --config=jest-coverage.json
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@

name: Run Tests

on:
pull_request:
branches: [ master ]
on: [push, pull_request]

jobs:
build:
Expand All @@ -14,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -23,4 +21,6 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: git config --global user.email "slapshot@yext.com"
- run: git config --global user.name "Jambo run-tests.yml"
- run: npm test
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Jambo

<div>
<a href='https://coveralls.io/github/yext/jambo?branch=master'>
<img src='https://coveralls.io/repos/github/yext/jambo/badge.svg?branch=master' alt='Coverage Status' />
</a>
</div>

Jambo is a JAMStack implementation using Handlebars.

## Installation
Expand All @@ -9,6 +15,7 @@ Install jambo from npm, and save it to your package.json as a dev-dependency.
```bash
npm install -D jambo
```

___

## Usage
Expand All @@ -28,27 +35,31 @@ Currently, only answers-hitchhiker-theme is supported.

###### Optional Arguments

--theme _theme_name_
--themeUrl _theme_url_

The git URL of the theme to import, if a theme should be imported on init.

Import a theme after initializing the repo.
--useSubmodules _true/false_

If importing a theme on init, whether to import it as a git submodule as opposed to regular files. Defaults to false.

#### Import

```bash
npx jambo import --theme answers-hitchhiker-theme
npx jambo import --themeUrl https://github.com/yext/answers-hitchhiker-theme.git
```

The import command imports the designated theme into the 'themes' folder.

**--theme** _theme_name_
**--themeUrl** _theme_url_

The name of the theme to import.
The git URL of the theme to import.

###### Optional Arguments

--addAsSubmodule _true/false_
--useSubmodules _true/false_

Whether to import the theme as a submodule, defaults to true.
Whether to import the theme as a git submodule, as opposed to regular files. Defaults to false.

#### Override

Expand Down
15 changes: 15 additions & 0 deletions jest-coverage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"collectCoverage": true,
"collectCoverageFrom": ["src/**"],
"setupFilesAfterEnv": [
"./tests/setup/setup.js"
],
"testMatch": [
"**/tests/**/*.js"
],
"testPathIgnorePatterns": [
"<rootDir>/tests/fixtures/",
"<rootDir>/tests/setup/",
"<rootDir>/tests/acceptance/"
]
}
Loading

0 comments on commit 08570c2

Please sign in to comment.