#68 change name files viewer

This commit is contained in:
Eugenio Romano
2016-05-19 13:37:44 +01:00
parent cae714048d
commit d8bb993b80
9 changed files with 90 additions and 27 deletions

View File

@@ -35,7 +35,7 @@
"alfresco"
],
"dependencies": {
"alfresco-core-rest-api": "https://github.com/Alfresco/dev-platform-js-api",
"alfresco-core-rest-api": "git@github.com:Alfresco/dev-platform-js-api.git#master",
"angular2": "2.0.0-beta.15",
"bootstrap": "^3.3.6",
"es6-shim": "^0.35.0",

View File

@@ -1,4 +1,4 @@
# <ng-2-alfresco-viewer>
# <ng2-alfresco-viewer>
[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Dependency Status][daviddm-image]][daviddm-url]
@@ -6,19 +6,19 @@
[![Style guide][style-image]][style-url]
[![Alfresco component][alfrescocomponent-image]][alfrescocomponent-url]
## About ng-2-alfresco-viewer
## About ng2-alfresco-viewer
> Alfresco documents viewer
## Installation
```bash
npm install ng-2-alfresco-viewer --save
npm install ng2-alfresco-viewer --save
```
## Example
```html
<ng-2-alfresco-viewer></ng-2-alfresco-viewer>
<ng2-alfresco-viewer></ng2-alfresco-viewer>
```
## Reference
@@ -60,21 +60,21 @@ Method | Parameters | Returns | Description
## History
For detailed changelog, check [Releases](https://github.com/alfresco/ng-2-alfresco-viewer/releases).
For detailed changelog, check [Releases](https://github.com/alfresco/ng2-alfresco-viewer/releases).
## Contributors
[Contributors](https://github.com/alfresco/ng-2-alfresco-viewer/graphs/contributors)
[Contributors](https://github.com/alfresco/ng2-alfresco-viewer/graphs/contributors)
[npm-image]: https://badge.fury.io/js/ng-2-alfresco-viewer.svg
[npm-url]: https://npmjs.org/package/ng-2-alfresco-viewer
[travis-image]: https://travis-ci.org/alfresco/ng-2-alfresco-viewer.svg?branch=master
[travis-url]: https://travis-ci.org/alfresco/ng-2-alfresco-viewer
[daviddm-image]: https://david-dm.org/alfresco/ng-2-alfresco-viewer.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/alfresco/ng-2-alfresco-viewer
[coveralls-image]: https://coveralls.io/repos/alfresco/ng-2-alfresco-viewer/badge.svg
[coveralls-url]: https://coveralls.io/r/alfresco/ng-2-alfresco-viewer
[npm-image]: https://badge.fury.io/js/ng2-alfresco-viewer.svg
[npm-url]: https://npmjs.org/package/ng2-alfresco-viewer
[travis-image]: https://travis-ci.org/alfresco/ng2-alfresco-viewer.svg?branch=master
[travis-url]: https://travis-ci.org/alfresco/ng2-alfresco-viewer
[daviddm-image]: https://david-dm.org/alfresco/ng2-alfresco-viewer.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/alfresco/ng2-alfresco-viewer
[coveralls-image]: https://coveralls.io/repos/alfresco/ng2-alfresco-viewer/badge.svg
[coveralls-url]: https://coveralls.io/r/alfresco/ng2-alfresco-viewer
[style-url]: https://github.com/mgechev/angular2-style-guide
[style-image]: https://mgechev.github.io/angular2-style-guide/images/badge.svg
[alfrescocomponent-image]: https://img.shields.io/badge/Alfresco%20component-approved-green.svg

View File

@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angular 2 Viewer - Demo</title>
<base href="/">
<!-- 1. Load libraries -->
<!-- IE required polyfills, in this exact order -->
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="node_modules/angular2/bundles/router.dev.js"></script>
<script src="node_modules/angular2/bundles/http.dev.js"></script>
<script>
System.config({
defaultJSExtensions: true,
map: {
'rxjs': 'node_modules/rxjs',
'angular2': 'node_modules/angular2',
'PDFJS': 'node_modules/pdfjs-dist/build',
'app': 'dist/main'
},
packages: {
'app': {
defaultExtension: 'js'
},
'rxjs': {
defaultExtension: 'js'
},
'angular2': {
defaultExtension: 'js'
},
'PDFJS': {
defaultExtension: 'js'
}
}
});
System.import('app').catch(console.log.bind(console));
</script>
</head>
<body>
<ng2-alfresco-viewer>Loading...</ng2-alfresco-viewer>
</body>
</html>

Binary file not shown.

View File

@@ -0,0 +1,4 @@
import {bootstrap} from 'angular2/platform/browser';
import {Ng2AlfrescoViewerComponent} from './ng2-alfresco-viewer';
bootstrap(Ng2AlfrescoViewerComponent);

View File

@@ -15,4 +15,4 @@
* limitations under the License.
*/
export * from './src/ng-2-alfresco-viewer.component';
export * from './src/ng2-alfresco-viewer.component';

View File

@@ -4,13 +4,13 @@
"pdf",
"alfresco-component"
],
"name": "ng-2-alfresco-viewer",
"name": "ng2-alfresco-viewer",
"description": "Alfresco documents viewer",
"version": "0.1.1",
"author": "Eugenio Romano",
"scripts": {
"typings": "typings install",
"start": "npm run test && http-server -c-1 -o -p 8875 .",
"start": "http-server -c-1 -o -p 8875 .",
"build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check",
"tslint": "npm run tslint-src && npm run tslint-root",
"tslint-src": "tslint -c tslint.json src/**/*.ts",
@@ -25,15 +25,14 @@
"test": "karma start karma.conf.js",
"posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html",
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
"deploy": "http-server -c-1 -o -p 9875 ./demo/demo.html",
"prepublish": "npm run build"
},
"repository": {
"type": "git",
"url": "https://github.com/alfresco/ng-2-alfresco-viewer.git"
"url": "https://github.com/alfresco/ng2-alfresco-viewer.git"
},
"bugs": {
"url": "https://github.com/alfresco/ng-2-alfresco-viewer/issues"
"url": "https://github.com/alfresco/ng2-alfresco-viewer/issues"
},
"dependencies": {
"angular2": "2.0.0-beta.15",

View File

@@ -17,9 +17,9 @@
import {describe, expect, it, injectAsync, TestComponentBuilder, setBaseTestProviders} from 'angular2/testing';
import {TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS} from 'angular2/platform/testing/browser';
import {Ng2AlfrescoViewerComponent} from '../src/ng-2-alfresco-viewer.component';
import {Ng2AlfrescoViewerComponent} from '../src/ng2-alfresco-viewer.component';
describe('Basic Example test ng-2-alfresco-viewer', () => {
describe('Basic Example test ng2-alfresco-viewer', () => {
setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS);
it('Test hello world', injectAsync([TestComponentBuilder], (tcb:TestComponentBuilder) => {
@@ -28,7 +28,7 @@ describe('Basic Example test ng-2-alfresco-viewer', () => {
.then((fixture) => {
let element = fixture.nativeElement;
expect(element.querySelector('h1')).toBeDefined();
expect(element.getElementsByTagName('h1')[0].innerHTML).toEqual('ng-2-alfresco-viewer');
expect(element.getElementsByTagName('h1')[0].innerHTML).toEqual('ng2-alfresco-viewer');
});
}));
});

View File

@@ -18,7 +18,7 @@
import {Component} from 'angular2/core';
@Component({
selector: 'ng-2-alfresco-viewer',
selector: 'ng2-alfresco-viewer',
styles: [
`
:host h1 {
@@ -26,6 +26,12 @@ import {Component} from 'angular2/core';
}
`
],
template: `<H1>ng-2-alfresco-viewer</H1>`
template: `<H1>ng2-alfresco-viewer</H1>`
})
export class Ng2AlfrescoViewerComponent {}
export class Ng2AlfrescoViewerComponent {
constructor() {
console.log('../contructor');
}
}