Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit aa04efb

Browse files
committed
Merge pull request #3 in WS/webcomponents-myscript-text-web from wip-polymer-3 to master
* commit 'e0d9afc2fd7c5160199feeaf296ed48925d7b6ac': [FIX] Examples for Edge [DOCS] Replace href by src [DOCS] Update webcomponents polyfill path [DEV] Remove old examples folder, update README [FIX] Add sequential execution for docs [DOCS] Update README [FIX] Dependencies and rebuild docs [DOCS] Update examples [FIX] Update docs [DEV] Remove old docs [DEV] Add build and app for examples [DEV] Refactor text exports [DEV] Rest example [DEV] Examples for Polymer 3 [DEV] Initial migration to Polymer 3
2 parents 6072bdc + e0d9afc commit aa04efb

File tree

2,110 files changed

+12598
-350056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,110 files changed

+12598
-350056
lines changed

.eslintrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": "airbnb",
3+
"parserOptions": {
4+
"ecmaVersion": 6,
5+
"sourceType": "module",
6+
"ecmaFeatures": {
7+
"jsx": true
8+
}
9+
},
10+
"rules": {
11+
"semi": 2,
12+
"no-unused-vars" : "off",
13+
"comma-dangle" : "off",
14+
"no-plusplus" : "off",
15+
"no-restricted-properties" : "off",
16+
"prefer-template" : "off",
17+
"import/no-extraneous-dependencies" : "off",
18+
"import/prefer-default-export" : "off",
19+
"max-len": ["off", 100, 2, {
20+
"ignoreUrls": true,
21+
"ignoreComments": false,
22+
"ignoreStrings": true,
23+
"ignoreTemplateLiterals": true
24+
}]
25+
}
26+
}

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ It integrates all you need:
2929

3030
If you're not familiar with MyScript and Interactive Ink, consider discovering its major features with our [text demo and tutorial](http://webdemo.myscript.com/views/text.html).
3131

32-
You can find on our examples page a [simple example](https://myscript.github.io/myscript-text-web/components/myscript-text-web/#/elements/myscript-text-web/demos/get-started-[v4]) of `myscript-text-web`.
32+
[Simple example](https://myscript.github.io/myscript-text-web/components/myscript-text-web/#/elements/myscript-text-web/demos/get-started-[v4]) of `myscript-text-web`.
3333

34-
We also provide several examples to show the features of `myscript-text-web`. Those examples can be found on our [examples page](https://myscript.github.io/myscript-text-web/components/myscript-text-web/#/elements/myscript-text-web/demos/other-examples) with the source codes in [this directory](https://github.com/MyScript/myscript-text-web/tree/master/examples).
34+
[All our examples](https://myscript.github.io/myscript-text-web/components/myscript-text-web/#/elements/myscript-text-web/demos/other-examples) with the [source codes](https://github.com/MyScript/myscript-text-web/tree/master/examples).
3535

3636
## Features
3737

@@ -47,37 +47,47 @@ You can discover all the text features on our [Developer website](https://develo
4747

4848
## Requirements
4949

50-
1. Have [bower](https://bower.io/#install-bower) installed.
50+
1. Have [npm](https://www.npmjs.com/get-npm) or [yarn](https://yarnpkg.com/en/docs/install) installed.
5151
2. Have a MyScript developer account. You can create one [here](https://dev.myscript.com/).
5252
2. Get your keys and the free monthly quota to access MyScript Cloud at [developer.myscript.com](https://developer.myscript.com)
5353

5454
## Installation
5555

56-
1. Download myscript-text-web.
56+
Use an existing project or start a fresh one.
57+
58+
```shell
59+
npm init
60+
```
61+
62+
Install `myscript-text-web` and use it as showed in the [Usage]() section.
63+
5764
```shell
58-
bower install myscript-text-web
65+
npm install myscript-text-web
5966
```
6067

6168
## Usage
6269

6370
1. Create an `index.html` file in the same directory.
6471

6572
2. Add the following lines in the `head` section to import the library and the webcomponents polyfill.
73+
6674
```html
67-
<link rel="import" href="bower_components/myscript-text-web/myscript-text-web.html">
68-
<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>
75+
<script type="module" src="node_modules/myscript-text-web/myscript-text-web.js"></script>
76+
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
6977
```
7078

7179
3. Still in the `head` section, add the following style:
80+
7281
```html
7382
<style>
7483
myscript-text-web {
75-
height: 100%;
84+
height: 100vw;
7685
}
7786
</style>
7887
```
7988

80-
4. Use the component in the `body` section with the keys you received by mail.
89+
4. Use the component in the `body` section with the keys you received by mail.
90+
8191
```html
8292
<myscript-text-web
8393
applicationkey="YOUR MYSCRIPT DEVELOPER APPLICATION KEY"
@@ -86,14 +96,15 @@ bower install myscript-text-web
8696
```
8797

8898
5. Your `index.html` file should look like this:
99+
89100
```html
90101
<html>
91102
<head>
92-
<link rel="import" href="bower_components/myscript-text-web/myscript-text-web.html">
93-
<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>
103+
<script type="module" src="node_modules/myscript-text-web/myscript-text-web.js"></script>
104+
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
94105
<style>
95106
myscript-text-web {
96-
height: 100%;
107+
height: 100vw;
97108
}
98109
</style>
99110
</head>
@@ -106,9 +117,10 @@ bower install myscript-text-web
106117
</html>
107118
```
108119

109-
6. Launch a local Web server like the one below and open the page in your browser (at [0.0.0.0:8000](http://0.0.0.0:8000) if you used the one below) to start using it!
120+
6. Launch a local Web server to start using it! We recommend to use the polymer one, you can find more information on the [Polymer website](https://www.polymer-project.org/3.0/start/install-3-0).
121+
110122
```
111-
python -m SimpleHTTPServer
123+
polymer serve
112124
```
113125

114126
You can find this guide and a more complete example on the [MyScript Developer website](https://developer.myscript.com/docs/interactive-ink/latest/web/web-components/text-element/get-started/).

0 commit comments

Comments
 (0)