Skip to content

Commit

Permalink
Merge pull request #130 from mattolson/hbs4
Browse files Browse the repository at this point in the history
STRF-4237: Split off rendering functionality
  • Loading branch information
mattolson authored Jan 24, 2018
2 parents ac7251f + a01e58a commit 5c374b9
Show file tree
Hide file tree
Showing 76 changed files with 295 additions and 3,639 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/*
22 changes: 11 additions & 11 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"ecmaFeatures": {
"modules": true
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true
},
},
"env": {
"node": true
},
"globals": {

"node": true,
"es6": true,
},
"rules": {
"curly": 2,
"no-eq-null": 2,
"wrap-iife": [ 2, "any" ],
"wrap-iife": [
2,
"any"
],
"new-cap": 2,
"no-caller": 2,
"dot-notation": 0,
"no-debugger": 2,
"no-undef": 2,
"no-unused-vars": 2,
"indent": [2, 4]
"no-unused-vars": [2, { "args": "none" }],
}
}
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ sudo: false
node_js:
- 4
- 6

- 8
script:
- npm install
- npm install -g gulp-cli
- gulp
- npm test
30 changes: 25 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,47 @@
# Changelog

## 3.0.0-rc.1 (2018-01-10)
Refactor rendering functionality into paper-handlebars [#130](https://github.com/bigcommerce/paper/pull/130) to
allow for alternate template engines.

v3.0 Contains several breaking changes:
- Removed the direct access of `contentServiceContext` for setting page content. From now on, use `addContent()` and `getContent()`.
- Removed `getTemplateProcessor()`. This is an internal concern of `paper-handlebars` and is used by `loadTemplates`.
- Removed `loadTemplatesSync()`. This was only used by helper tests and is no longer needed.
- Removed `handlebars` instance variable. Hopefully nobody is accessing that directly. Any helpers that were accessing it have been updated in `paper-handlebars` to use the global context they are given rather than accessing Paper directly at all.
- The `translator` attribute has been moved to `paper-handlebars` and is no longer accessible directly on Paper.
- The `decorators` attribute has been moved to `paper-handlebars` and is no longer accessible directly on Paper.
- The `settings` attribute has been renamed to `siteSettings`. This should only be accessed by `paper-handlebars`.
- The `cdnify()` function has been moved into a helper library in `paper-handlebars`.
- The `inject` attribute has been removed. This is storage used by two of the helpers, and the implementation has moved to `paper-handlebars`.

## 2.0.7 (2017-10-17)
- Always render region wrapper even if no content is present [#128](https://github.com/bigcommerce/paper/pull/128)

## 2.0.6 (2017-09-20)
- Fix a bug in the `replace` helper [#127](https://github.com/bigcommerce/paper/pull/127)

## 2.0.5 (2017-09-15)
- Fix a bug in the `replace` helper [#125](https://github.com/bigcommerce/paper/pull/125)
- Added support to use operators in the `unless` helper [#126](https://github.com/bigcommerce/paper/pull/126)
- Fix a bug in the `replace` helper [#125](https://github.com/bigcommerce/paper/pull/125)

## 2.0.4 (2017-08-21)
- Added a test to `first` helper [#120](https://github.com/bigcommerce/paper/pull/120)
- Lodash deprecated method replaced [#121](https://github.com/bigcommerce/paper/pull/121)
- Added a test to `first` helper [#120](https://github.com/bigcommerce/paper/pull/120)

## 2.0.3 (2017-06-21)
- Adds `region` helper [#118](https://github.com/bigcommerce/paper/pull/118)
- Add `region` helper to render content blocks [#118](https://github.com/bigcommerce/paper/pull/118)

## 2.0.2 (2017-04-20)
- Bug fix in the `stylesheet` helper [#116](https://github.com/bigcommerce/paper/pull/116)

## 2.0.1 (2017-04-12)
- Adds the `{{thumbnailImage}}` helper and removes the non-existent `{{thumbnail}}` helper [#114](https://github.com/bigcommerce/paper/pull/114)

## 2.0.0 (2017-04-11)
- Adds and exposes the helpers we've selected from the handlebars-helpers library [#110](https://github.com/bigcommerce/paper/pull/110)
- Update docs to describe the interface required by paper for assembler and callbacks [#111](https://github.com/bigcommerce/paper/pull/111)
- Remove configId from cdn/assets urls for preventing busting the cached assets when configId changes [#112](https://github.com/bigcommerce/paper/pull/112)
- Update docs to describe the interface required by paper for assembler and callbacks [#111](https://github.com/bigcommerce/paper/pull/111)
- Adds and exposes the helpers we've selected from the handlebars-helpers library [#110](https://github.com/bigcommerce/paper/pull/110)

## 1.2.0 (2017-02-23)
- Add a helper that can truncate text. [#106](https://github.com/bigcommerce/paper/pull/106), [#108](https://github.com/bigcommerce/paper/pull/108)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2016, Bigcommerce Inc.
Copyright (c) 2015-2018, Bigcommerce Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# stencil-paper
[![Build Status](https://travis-ci.org/bigcommerce/paper.svg?branch=master)](https://travis-ci.org/bigcommerce/paper) [![npm (scoped)](https://img.shields.io/npm/v/@bigcommerce/stencil-paper.svg)](https://www.npmjs.com/package/@bigcommerce/stencil-paper)

*stencil-paper* is a plugin for `stencil-cli` and `stapler`. Its duty is to render the themes using [Handlebars](http://handlebarsjs.com/) template engine.
*stencil-paper* is a plugin for `stencil-cli` and `stapler`. Its duty is to load templates and translations, and call out to [paper-handlebars](https://github.com/bigcommerce/paper-handlebars) to render pages.

## Usage

Expand Down Expand Up @@ -49,7 +49,7 @@ See the [stencil API reference](https://stencil.bigcommerce.com/docs/handlebars-

#### License

Copyright (c) 2015-2016, Bigcommerce Inc.
Copyright (c) 2015-2018, Bigcommerce Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
23 changes: 0 additions & 23 deletions gulpfile.js

This file was deleted.

48 changes: 0 additions & 48 deletions helpers/all.js

This file was deleted.

57 changes: 0 additions & 57 deletions helpers/any.js

This file was deleted.

19 changes: 0 additions & 19 deletions helpers/block.js

This file was deleted.

9 changes: 0 additions & 9 deletions helpers/cdn.js

This file was deleted.

45 changes: 0 additions & 45 deletions helpers/compare.js

This file was deleted.

14 changes: 0 additions & 14 deletions helpers/concat.js

This file was deleted.

27 changes: 0 additions & 27 deletions helpers/contains.js

This file was deleted.

Loading

0 comments on commit 5c374b9

Please sign in to comment.