Skip to content

Commit

Permalink
Merge pull request #101 from substance/develop
Browse files Browse the repository at this point in the history
Texture Alpha 2 release
  • Loading branch information
Michael Aufreiter committed Oct 7, 2016
2 parents ed56e5f + 1d64c5b commit c3a2e59
Show file tree
Hide file tree
Showing 416 changed files with 5,727 additions and 5,182 deletions.
13 changes: 9 additions & 4 deletions .eslintrc.js
Expand Up @@ -4,14 +4,19 @@ module.exports = {
"commonjs": true,
"node": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 6
},
"extends": "eslint:recommended",
"globals": {
"QUnit": true
"Promise": true,
"Map": true
},
"rules": {
// 0 - off, 1 - warning, 2 - error
"indent": ["error", 2, { "SwitchCase": 1 }],
"semi": [2, "always"],
"semi": [0, "never"],
"comma-dangle": [2, "only-multiline"],
"no-cond-assign": 2,
"no-console": [2, { allow: ["warn", "info", "error", "assert"] }],
Expand Down Expand Up @@ -43,7 +48,7 @@ module.exports = {
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
"strict": [2, "safe"],
"strict": 0, // [2, "safe"],

// Best practices
"accessor-pairs": 0,
Expand Down Expand Up @@ -122,6 +127,6 @@ module.exports = {
"no-undef-init": 2,
"no-undefined": 0,
"no-unused-vars": 2,
"no-use-before-define": [2, { "functions": false }]
"no-use-before-define": [2, { "functions": false, "classes": false }]
}
};
12 changes: 2 additions & 10 deletions .gitignore
@@ -1,15 +1,7 @@
# Logs
logs
*.log

# Bundles
dist

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependencies
node_modules

# Users Environment Variables
.lock-wscript
.test
.npm
18 changes: 0 additions & 18 deletions .jshint

This file was deleted.

17 changes: 0 additions & 17 deletions .jshintrc

This file was deleted.

1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -4,5 +4,6 @@ cache:
- node_modules
node_js:
- "4"
- "6"
before_script:
- 'npm install'
11 changes: 11 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,11 @@

## Alpha 2

- Update to Substance Beta 5
- Front matter editing for title + abstract (JATS `<front>`)
- Editing of authors (create, update and delete contrib elements)
- Create and edit xref elements

## Alpha

Initial release
47 changes: 23 additions & 24 deletions CONTRIBUTING.md
@@ -1,6 +1,6 @@
# Implement a new JATS element

Each JATS element is realized as a [package](https://github.com/substance/scientist/tree/devel/packages/jats/caption), containing a node definition, a converter and a component for rendering / editing.
Each JATS element is realized as a [package](packages/jats/caption), containing a node definition, a converter and a component for rendering / editing.

## Choose the right node type

Expand Down Expand Up @@ -46,42 +46,41 @@ Example elements: `<fig>`, `<ref-list>`

Use the following examples as a reference implementation.

- [Paragraph](https://github.com/substance/scientist/blob/devel/packages/jats/paragraph/Paragraph.js) (Text Node)
- [ExtLink](https://github.com/substance/scientist/blob/devel/packages/jats/ext-link/ExtLink.js) (Annotation Node)
- [XRef](https://github.com/substance/scientist/blob/devel/packages/jats/xref/XRef.js) (Inline Node)
- [Body](https://github.com/substance/scientist/blob/devel/packages/jats/body/Body.js) (Container Node)
- [Figure](https://github.com/substance/scientist/blob/devel/packages/jats/figure/Figure.js) (Document Node)
- [Paragraph](packages/jats/paragraph/Paragraph.js) (Text Node)
- [ExtLink](packages/jats/ext-link/ExtLink.js) (Annotation Node)
- [XRef](packages/jats/xref/XRef.js) (Inline Node)
- [Body](packages/jats/body/Body.js) (Container Node)
- [Figure](packages/jats/figure/Figure.js) (Document Node)


## Define a converter

A converter is need to map from JATS XML to Substance document nodes.
A converter is needed to map from JATS XML to Substance document nodes.

- [Paragraph Converter](https://github.com/substance/scientist/blob/devel/packages/jats/paragraph/ParagraphConverter.js) (Text Node)
- [ExtLink Converter](https://github.com/substance/scientist/blob/devel/packages/jats/ext-link/ExtLinkConverter.js) (Annotation Node)
- [XRef Converter](https://github.com/substance/scientist/blob/devel/packages/jats/xref/XRefConverter.js) (Inline Node)
- [Body Converter](https://github.com/substance/scientist/blob/devel/packages/jats/body/BodyConverter.js) (Container Node)
- [Figure Converter](https://github.com/substance/scientist/blob/devel/packages/jats/figure/FigureConverter.js) (Document Node)
- [Paragraph Converter](packages/jats/paragraph/ParagraphConverter.js) (Text Node)
- [ExtLink Converter](packages/jats/ext-link/ExtLinkConverter.js) (Annotation Node)
- [XRef Converter](packages/jats/xref/XRefConverter.js) (Inline Node)
- [Body Converter](packages/jats/body/BodyConverter.js) (Container Node)
- [Figure Converter](packages/jats/figure/FigureConverter.js) (Document Node)


## Write a converter test

It's important you test your converter throughly. The following examples can be used as a reference.
It's important you test your converter throughly, otherwise content could be lost. The following examples can be used as a reference.


- [Paragraph Test](https://github.com/substance/scientist/blob/devel/test/jats/paragraph.test.js) (Text Node)
- [ExtLink Test](https://github.com/substance/scientist/blob/devel/test/jats/ext-link.test.js) (Annotation Node)
- [XRef Test](https://github.com/substance/scientist/blob/devel/test/jats/xref-link.test.js) (Inline Node)
- [Body Test](https://github.com/substance/scientist/blob/devel/test/jats/body-link.test.js) (Container Node)
- [Figure Test](https://github.com/substance/scientist/blob/devel/test/jats/figure.test.js) (Document Node)
- [Paragraph Test](test/jats/paragraph.test.js) (Text Node)
- [ExtLink Test](test/jats/ext-link.test.js) (Annotation Node)
- [XRef Test](test/jats/xref.test.js) (Inline Node)
- [Body Test](test/jats/body.test.js) (Container Node)
- [Figure Test](test/jats/figure.test.js) (Document Node)


## Defining a component

In order to make the content editable, you have to define components for each JATS element.

- [Paragraph Component](https://github.com/substance/scientist/blob/devel/packages/jats/paragraph/Paragraph.js) (Text Node)
- [ExtLink Component](https://github.com/substance/scientist/blob/devel/packages/jats/ext-link/ExtLink.js) (Annotation Node)
- [XRef Component](https://github.com/substance/scientist/blob/devel/packages/jats/xref/XRef.js) (Inline Node)
- [Body Component](https://github.com/substance/scientist/blob/devel/packages/jats/body/Body.js) (Container Node)
- [Figure Component](https://github.com/substance/scientist/blob/devel/packages/jats/figure/Figure.js) (Document Node)
- [Paragraph Component](packages/jats/paragraph/Paragraph.js) (Text Node)
- [ExtLink Component](packages/jats/ext-link/ExtLink.js) (Annotation Node)
- [XRef Component](packages/jats/xref/XRef.js) (Inline Node)
- [Body Component](packages/jats/body/Body.js) (Container Node)
- [Figure Component](packages/jats/figure/Figure.js) (Document Node)
20 changes: 20 additions & 0 deletions LICENSE.md
@@ -0,0 +1,20 @@
Copyright (c) 2016 Substance Software GmbH

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.

0 comments on commit c3a2e59

Please sign in to comment.