Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .editorconfig

This file was deleted.

10 changes: 9 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@
"space-before-function-paren": [2, "never"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"space-unary-ops": [
2, {
"words": true,
"nonwords": false,
"overrides": {
"typeof": false
}
}
],
"spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
"use-isnan": 2,
"valid-typeof": 2,
Expand Down
64 changes: 44 additions & 20 deletions .github/workflows/helpers_ci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,59 @@
name: Handlebars-helpers CI

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
# Trigger the workflow on push or pull request,
# but only for the master branch (or main)
push:
branches:
- master
pull_request:
- main
pull_request:
branches:
- master
- main
release:
types:
- created
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}

timeout-minutes: 30 # Just in case something goes realy real realy BAD.....

strategy:
fail-fast: false
matrix:
node-version: [12.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [10.x, 12.x, 14.x, 16.x]
os: [ubuntu-20.04, windows-2019, macos-10.15]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn test
env:
CI: true
name: Handlebars-helpers CI
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Checkout GITHub code
uses: actions/checkout@v2

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

- name: Install dependencies
run: yarn install --frozen-lockfile # will run `yarn install --frozen-lockfile` command

- name: Lint code
run: yarn lint

- name: Run tests against code
run: yarn test
env:
CI: true
name: Handlebars-helpers CI

- name: Publish to NPM only on a relase event
if: github.event_name == 'release' && github.event.action == 'created'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ node_modules
npm-debug.log

# yarn
yarn.lock
yarn-error.log

# misc
Expand Down
4 changes: 4 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extension": ["js"],
"spec": "test/**/*.js"
}
5 changes: 0 additions & 5 deletions .verb.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,4 @@ The following utils are exposed on `.utils`.

***


[operators]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators

## History

{%= changelog(yaml(read("CHANGELOG"))) %}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

*NOTE: This is a fork of the handlebars-helpers repo to prepare it for use with rollup as part of Budibase.*

[![Prod Dependencies](https://github.com/Budibase/handlebars-helpers/status.svg)](https://github.com/Budibase/handlebars-helpers)
[![Dev Dependencies](https://github.com/Budibase/handlebars-helpers/dev-status.svg)](https://github.com/Budibase/handlebars-helpers#info=devDependencies)

[![Build](https://github.com/Budibase/handlebars-helpers/actions/workflows/node.js.yml/badge.svg)](https://github.com/Budibase/handlebars-helpers/actions/workflows/node.js.yml)
[![Build Matrix](http://github-actions.40ants.com/Budibase/handlebars-helper/matrix.svg)](https://github.com/Budibase/handlebars-helpers

> More than 130 Handlebars helpers in ~20 categories. Helpers can be used with Assemble, Generate, Verb, Ghost, gulp-handlebars, grunt-handlebars, consolidate, or any node.js/Handlebars project.

- [Install](#install)
Expand Down
143 changes: 0 additions & 143 deletions bower.json

This file was deleted.

28 changes: 0 additions & 28 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
'use strict';

var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var unused = require('gulp-unused');

gulp.task('coverage', ['eslint'], function() {
return gulp.src(['index.js', 'lib/**/*.js'])
.pipe(istanbul({includeUntested: true}))
.pipe(istanbul.hookRequire());
});

gulp.task('mocha', ['coverage'], function() {
return gulp.src('test/{integration/,}*.js')
.pipe(mocha({reporter: 'spec'}))
.pipe(istanbul.writeReports())
.pipe(istanbul.writeReports({
reporters: [ 'text', 'text-summary' ],
reportOpts: {dir: 'coverage', file: 'summary.txt'}
}));
});

gulp.task('eslint', function() {
return gulp.src(['*.js', 'lib/**/*.js', 'test/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('unused', function() {
var utils = require('./lib/utils');
return gulp.src(['index.js', 'lib/**/*.js'])
.pipe(unused({keys: Object.keys(utils)}));
});

gulp.task('default', ['mocha']);
Loading