0.2.1 • Published 5 years ago

@lblod/ember-rdfa-editor-template-variables-manager-plugin v0.2.1

Weekly downloads
10
License
MIT
Repository
-
Last release
5 years ago

@lblod/ember-rdfa-editor-template-variables-manager-plugin

Plugin responsible for managing template variables.

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above
  • Node.js v8 or above

Installation

ember install @lblod/ember-rdfa-editor-template-variables-manager-plugin

Usage

Variables are defined in template as:

<div class="ext_variable" typeof="ext:Variable" resource="http://variables/1">
  <div property="ext:idInSnippet" content="foo">foo</div>
  <div property="ext:intentionUri" content="http://person/name">http://person/name</div>
  <div property="ext:variableState" content="initialized">initialized</div>
</div>
<div typeof="http://www.w3.org/ns/person#Person" resource="http://a/random/uri">
  <div>
   Name:
     <div id="foo" property="ext:variableInstanceContainer">
       <span property="http://xmlns.com/foaf/0.1/familyName" datatype="http://www.w3.org/2001/XMLSchema#string">
         John Doe
       </span>
     </div>
  </div>
</div>

Notes:

  • The variable state should be defined in template as 'intialized'. This will change to 'syncing' once this plugin starts using it.
  • <div property="ext:intentionUri" content="http://person/name">http://person/name</div> is the variable which can occur on multiple places in document.
  • You are in charge of making sure <div property="ext:idInSnippet" content="foo">foo</div> and id="foo" are in sync and unique.
  • <div property="ext:intentionUri" content="http://person/name">http://person/name</div> can be shared across templates
  • Currently, in most of the editor cases, template-plugin will make sure ID's are managed.
  • class="ext_variable" is optional, but makes your variables invisible

In host app: styles/app.scss:

@import 'ember-rdfa-editor-template-variables-manager-plugin';

Contributing

Installation

  • git clone <repository-url>
  • cd ember-rdfa-editor-template-variables-manager-plugin
  • npm install

Linting

  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

License

This project is licensed under the MIT License.

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago