Skip to content

Commit

Permalink
project maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz committed Feb 22, 2022
1 parent e77cc37 commit 07be733
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": "./tsconfig.json", "sourceType": "module" },
"env": { "es6": true },
"ignorePatterns": ["node_modules", "build", "coverage", "*.config.js"],
"ignorePatterns": ["node_modules", "build", "bin", "coverage", "*.config.js"],
"plugins": ["import", "eslint-comments"],
"extends": [
"eslint:recommended",
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Gnosis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,37 @@
- conditionals: `if` & `unless`
- [partials](https://handlebarsjs.com/guide/partials.html#basic-partials)

## How to use

### Installation

Add solid-mustache as a dev dependency. With npm:

```bash
npm install --save-dev solid-mustache
```

Or with yarn:

```bash
yarn add -D solid-mustache
```

### Compile template file

To compile a template file to Solidity

## API

### CLI

### JavaScript

## Contribute

The goal is maximum compatibility with [handlebars](https://handlebarsjs.com).
This package aims to be compatible with [handlebars](https://handlebarsjs.com)..
Specifically, every template that can be compiled with solid-mustache shall also be supported in handlebars.
The inverse is not necessary, but we aim for it as far as it's reasonable.
If you see unexpected rendering results for your templates, submit an issue or, even better, create a PR adding your template as new test case in [test/cases](./test/cases).

### How test cases are structured
Expand Down
20 changes: 14 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
"name": "solid-mustache",
"version": "1.0.0",
"description": "{{mustache}} templates compiling to Solidity",
"bin": "./bin/solid-mustache.js",
"main": "build/cjs/index.js",
"typings": "build/cjs/index.d.ts",
"module": "build/esm/index.js",
"files": [
"bin",
"build",
"LICENSE",
"README.md"
],
"scripts": {
"prepare": "yarn build",
"prebuild": "rimraf build",
Expand All @@ -18,17 +28,16 @@
"test:watch": "mocha -w",
"test:update": "UPDATE_SNAPSHOTS=true mocha -w"
},
"repository": {
"type": "git"
},
"author": "[email protected]",
"license": "LGPL-3.0+",
"repository": "[email protected]:nftgp/solid-mustache.git",
"author": "Jan-Felix Schwarz",
"license": "MIT",
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.3",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.8",
"@types/prettier": "^2.4.3",
"@types/yargs": "^17.0.8",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"chai": "^4.3.4",
Expand All @@ -46,7 +55,6 @@
},
"dependencies": {
"@handlebars/parser": "^2.1.0",
"@types/yargs": "^17.0.8",
"prettier": "^2.5.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"yargs": "^17.3.1"
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { compile } from "./compile"
export { compile }
export default compile

0 comments on commit 07be733

Please sign in to comment.