Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jun 30, 2018
2 parents 666bc7e + 48fa9d9 commit d42c882
Show file tree
Hide file tree
Showing 55 changed files with 7,435 additions and 2,876 deletions.
3 changes: 0 additions & 3 deletions .builderrc

This file was deleted.

6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# The JSON files contain newlines inconsistently
[*.json]
insert_final_newline = ignore

# Minified JavaScript files shouldn't be changed
[**.min.js]
indent_style = ignore
insert_final_newline = ignore

# Makefiles always use tabs for indentation
[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[MakeFile]
indent_style = tab
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->

## Prerequisites

We do our best to reply to all the issues on time. If you will follow the given guidelines, the turn around time will be faster.

- Lots of raised issues are directly not bugs but instead are design decisions taken by us.
- Make use of our [forum](https://forum.adonisjs.com/), or [discord server](https://discord.me/adonisjs), if you are not sure that you are reporting a bug.
- Ensure the issue isn't already reported.
- Ensure you are reporting the bug in the correct repo.

*Delete the above section and the instructions in the sections below before submitting*

## Package version
<!-- YOUR ANSWER -->

## Node.js and npm version
<!-- YOUR ANSWER -->

## Sample Code (to reproduce the issue)
<!-- YOUR ANSWER -->

## BONUS (a sample repo to reproduce the issue)
<!-- YOUR ANSWER -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Propose changes for adding a new feature
---

<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->

## Prerequisites

We do our best to reply to all the issues on time. If you will follow the given guidelines, the turn around time will be faster.

## Consider an RFC

Please create an [RFC](https://github.com/adonisjs/rfcs) instead, if

- Feature introduces a breaking change
- Demands lots of time and changes in the current code base.

*Delete the above section and the instructions in the sections below before submitting*

## Why this feature is required (specific use-cases will be appreciated)?
<!-- YOUR ANSWER -->

## Have you tried any other work arounds?
<!-- YOUR ANSWER -->

## Are you willing to work on it with little guidance?
<!-- YOUR ANSWER -->
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->

## Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

## Types of changes

What types of changes does your code introduce?

_Put an `x` in the boxes that apply_

- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._

- [ ] I have read the [CONTRIBUTING](https://github.com/poppinss/edge-lexer/CONTRIBUTING.md) doc
- [ ] Lint and unit tests pass locally with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)

## Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ node_modules
npm-debug.log
.idea
.nyc_output
.DS_STORE
.vscode/
*.sublime-project
*.sublime-workspace
*.log
yarn.lock
build
dist
6 changes: 0 additions & 6 deletions .huskyrc.json

This file was deleted.

11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- node
- 8.0.0
sudo: false
install:
- npm install
notifications:
slack:
secure: >-
m91zkX2cLVDRDMBAUnR1d+hbZqtSHXLkuPencHadhJ3C3wm53Box8U25co/goAmjnW5HNJ1SMSIg+DojtgDhqTbReSh5gSbU0uU8YaF8smbvmUv3b2Q8PRCA7f6hQiea+a8+jAb7BOvwh66dV4Al/1DJ2b4tCjPuVuxQ96Wll7Pnj1S7yW/Hb8fQlr9wc+INXUZOe8erFin+508r5h1L4Xv0N5ZmNw+Gqvn2kPJD8f/YBPpx0AeZdDssTL0IOcol1+cDtDzMw5PAkGnqwamtxhnsw+i8OW4avFt1GrRNlz3eci5Cb3NQGjHxJf+JIALvBeSqkOEFJIFGqwAXMctJ9q8/7XyXk7jVFUg5+0Z74HIkBwdtLwi/BTyXMZAgsnDjndmR9HsuBP7OSTJF5/V7HCJZAaO9shEgS8DwR78owv9Fr5er5m9IMI+EgSH3qtb8iuuQaPtflbk+cPD3nmYbDqmPwkSCXcXRfq3IxdcV9hkiaAw52AIqqhnAXJWZfL6+Ct32i2mtSaov9FYtp/G0xb4tjrUAsDUd/AGmMJNEBVoHtP7mKjrVQ35cEtFwJr/8SmZxGvOaJXPaLs43dhXKa2tAGl11wF02d+Rz1HhbOoq9pJvJuqkLAVvRdBHUJrB4/hnTta5B0W5pe3mIgLw3AmOpk+s/H4hAP4Hp0gOWlPA=
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<a name="1.0.1"></a>
## [1.0.1](https://github.com/poppinss/edge-lexer/compare/v1.0.0...v1.0.1) (2018-06-30)



<a name="1.0.0"></a>
# 1.0.0 (2018-05-30)

Expand Down
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing

AdonisJs is a community driven project. You are free to contribute in any of the following ways.

- [Coding style](coding-style)
- [Fix bugs by creating PR's](fix-bugs-by-creating-prs)
- [Share an RFC for new features or big changes](share-an-rfc-for-new-features-or-big-changes)
- [Report security issues](report-security-issues)
- [Be a part of the community](be-a-part-of-community)

## Coding style

Majority of AdonisJs core packages are written in Typescript. Having a brief knowledge of Typescript is required to contribute to the core. [Learn more](https://adonisjs.com/coding-style) about the same.

## Fix bugs by creating PR's

We appreciate every time you report a bug in the framework or related libraries. However, taking time to submit a PR can help us in fixing bugs quickly and ensure a healthy and stable eco-system.

Go through the following points, before creating a new PR.

1. Create an issue discussing the bug or short-coming in the framework.
2. Once approved, go ahead and fork the REPO.
3. Make sure to start from the `develop`, since this is the upto date branch.
4. Make sure to keep commits small and relevant.
5. We follow [conventional-commits](https://github.com/conventional-changelog/conventional-changelog) to structure our commit messages. Instead of running `git commit`, you must run `npm commit`, which will show you prompts to create a valid commit message.
6. Once done with all the changes, create a PR against the `develop` branch.

## Share an RFC for new features or big changes

Sharing PR's for small changes works great. However, when contributing big features to the framework, it is required to go through the RFC process.

### What is an RFC?

RFC stands for **Request for Commits**, a standard process followed by many other frameworks including [Ember](https://github.com/emberjs/rfcs), [yarn](https://github.com/yarnpkg/rfcs) and [rust](https://github.com/rust-lang/rfcs).

In brief, RFC process allows you to talk about the changes with everyone in the community and get a view of the core team before dedicating your time to work on the feature.

The RFC proposals are created as issues on [adonisjs/rfcs](https://github.com/adonisjs/rfcs) repo. Make sure to read the README to learn about the process in depth.

## Report security issues

All of the security issues, must be reported via [email](mailto:virk@adonisjs.com) and not using any of the public channels. [Learn more](https://adonisjs.com/security) about the security policy

## Be a part of community

We welcome you to participate in the [forum](https://forum.adonisjs.com/) and the AdonisJs [discord server](https://discord.me/adonisjs). You are free to ask your questions and share your work or contributions made to AdonisJs eco-system.

We follow a strict [Code of Conduct](https://adonisjs.com/community-guidelines) to make sure everyone is respectful to each other.
22 changes: 5 additions & 17 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,9 @@
MIT License
# The MIT License

Copyright (c) 2018 Harminder Virk
Copyright 2018 thetutlage, contributors

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:
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 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.
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.
53 changes: 51 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Edge lexer

[![travis-image]][travis-url]
[![appveyor-image]][appveyor-url]
[![coveralls-image]][coveralls-url]
[![npm-image]][npm-url]
![](https://img.shields.io/badge/Uses-Typescript-294E80.svg?style=flat-square&colorA=ddd)

Edge lexer detects tags from any markup language and converts them into tokens. Later these tokens can be used with a Javascript parser like `esprima` or `babylon` to complete a logical template engine ( this is what [edge-parser](https://github.com/poppinss/edge-parser) does).

This guide is an outline of the lexer.
Expand Down Expand Up @@ -38,7 +44,7 @@ Following is the list of Nodes returned by the tokenizer.
{
type: 'block'
lineno: number,
properties: Prop,
properties: BlockProp,
children: []
}
```
Expand Down Expand Up @@ -85,6 +91,18 @@ Following is the list of Nodes returned by the tokenizer.
## Properties
The properties `Prop` is used to define meta data for a given Node. Nodes like `raw` and `newline`, doesn't need any metadata.

#### BlockProp
The block prop is by the `Tag` node. The only difference from the regular `Prop` is the additional of `selfclosed` attribute.

```js
{
name: string
jsArg: string,
raw: string,
selfclosed: boolean
}
```

#### Prop

```js
Expand All @@ -100,6 +118,7 @@ The properties `Prop` is used to define meta data for a given Node. Nodes like `
| name | The name is the subtype for a given node. For example: `if` will be the name of the `@if` tag. |
| jsArg | The `jsArg` is the Javascript expression to evaluate |
| raw | The raw representation of a given expression. Used for debugging purposes. |
| selfclosed | Whether or not the tag was `selfclosed` during usage. |

For mustache nodes props, the `name` is the type of mustache expressions. The lexer supports 4 mustache expressions.

Expand Down Expand Up @@ -149,7 +168,8 @@ The output of the above text will be
"properties": {
"name": "if",
"jsArg": "username",
"raw": "if(username)"
"raw": "if(username)",
"selfclosed": false
},
"lineno": 1,
"children": [
Expand Down Expand Up @@ -393,3 +413,32 @@ In the same fashion, the mustache braces can be escaped using `@`.
```
Hello @{{ username }}
```

## Change log

The change log can be found in the [CHANGELOG.md](https://github.com/poppinss/edge-lexer/CHANGELOG.md) file.

## Contributing

Everyone is welcome to contribute. Please go through the following guides, before getting started.

1. [Contributing](https://adonisjs.com/contributing)
2. [Code of conduct](https://adonisjs.com/code-of-conduct)


## Authors & License
[thetutlage](https://github.com/thetutlage) and [contributors](https://github.com/poppinss/edge-lexer/graphs/contributors).

MIT License, see the included [MIT](LICENSE.md) file.

[travis-image]: https://img.shields.io/travis/poppinss/edge-lexer/master.svg?style=flat-square&logo=travis
[travis-url]: https://travis-ci.org/poppinss/edge-lexer "travis"

[appveyor-image]: https://img.shields.io/appveyor/ci/thetutlage/edge-lexer/master.svg?style=flat-square&logo=appveyor
[appveyor-url]: https://ci.appveyor.com/project/thetutlage/edge-lexer "appveyor"

[coveralls-image]: https://img.shields.io/coveralls/poppinss/edge-lexer/master.svg?style=flat-square
[coveralls-url]: https://coveralls.io/github/poppinss/edge-lexer "coveralls"

[npm-image]: https://img.shields.io/npm/v/edge-lexer.svg?style=flat-square&logo=npm
[npm-url]: https://npmjs.org/package/edge-lexer "npm"
16 changes: 16 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
environment:
matrix:
- nodejs_version: Stable
- nodejs_version: 8.0.0
init: git config --global core.autocrlf true
install:
- ps: 'Install-Product node $env:nodejs_version'
- npm install
test_script:
- node --version
- npm --version
- 'npm run test:win'
build: 'off'
clone_depth: 1
matrix:
fast_finish: true
47 changes: 0 additions & 47 deletions build/CharBucket/index.d.ts

This file was deleted.

0 comments on commit d42c882

Please sign in to comment.