Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding in parcel for minification browser version #2

Merged
merged 2 commits into from
Aug 25, 2023
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
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**Please check if the PR fulfills these requirements**
- [ ] Followed the [Contributing](https://github.com/jaredwray/airhorn/blob/main/CONTRIBUTING.md) guidelines.
- [ ] Tests for the changes have been added (for bug fixes/features) with 100% code coverage.
- [ ] Followed the [Contributing](https://github.com/jaredwray/fumanchu/blob/main/CONTRIBUTING.md) guidelines.
- [ ] Tests for the changes have been added (for bug fixes/features) without decreasing code coverage.
- [ ] Docs have been added / updated (for bug fixes / features)

**What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
3 changes: 3 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- name: Testing
run: yarn test

- name: Build
run: yarn build

- name: Code Coverage
uses: codecov/codecov-action@v3
with:
Expand Down
22 changes: 11 additions & 11 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Type definitions for handlebars-helpers 0.5
// Project: http://assemble.io/helpers/, https://github.com/helpers/handlebars-helpers
// Definitions by: Toilal <https://github.com/Toilal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
// index.d.ts

import Handlebars from "handlebars";
// Importing types from the handlebars package
import { Handlebars } from 'handlebars';

declare module "fumanchu" {
export = Fumanchu;
class Fumanchu extends Handlebars {
constructor();
}
// Assuming helpers.js exports a function. Adjust as needed.
interface HelpersFunction {
(config: { handlebars: typeof Handlebars }): void;
}

// Since you're exporting the handlebars instance itself:
declare const handlebars: typeof Handlebars;

export = handlebars;


13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,19 @@
"index.js",
"helpers.js",
"lib",
"dist",
"index.d.ts"
],
"source": "index.js",
"main": "index.js",
"types": "index.d.ts",
"browser": "dist/fumanchu.min.js",
"engines": {
"node": ">=14"
},
"scripts": {
"test": "c8 mocha --reporter list",
"build": "parcel build --dist-dir dist",
"clean": "rm -rf node_modules"
},
"dependencies": {
Expand All @@ -85,7 +89,7 @@
"for-own": "^1.0.0",
"get-object": "^0.2.0",
"get-value": "^3.0.1",
"handlebars": "^4.7.7",
"handlebars": "^4.7.8",
"handlebars-helper-create-frame": "^0.1.0",
"handlebars-utils": "^1.0.6",
"has-value": "^2.0.2",
Expand All @@ -110,6 +114,7 @@
"chai": "^4.3.8",
"global-modules": "^2.0.0",
"mocha": "^10.2.0",
"parcel": "^2.9.3",
"template-helpers": "^1.0.1",
"templates": "^1.2.9"
},
Expand Down Expand Up @@ -144,5 +149,9 @@
"last 1 version",
"> 1%",
"not dead"
]
],
"targets": {
"main": false,
"types": false
}
}