mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
externalize system config js in demo and fix some tslin error
This commit is contained in:
@@ -2,4 +2,5 @@ node_modules
|
||||
.idea
|
||||
coverage
|
||||
dist
|
||||
typings
|
||||
typings
|
||||
!systemjs.config.js
|
||||
|
@@ -26,31 +26,9 @@
|
||||
<script src="node_modules/pdfjs-dist/build/pdf.worker.js"></script>
|
||||
<script src="node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
|
||||
|
||||
<script src="systemjs.config.js"></script>
|
||||
<script>
|
||||
System.config({
|
||||
defaultJSExtensions: true,
|
||||
map: {
|
||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer',
|
||||
'rxjs': 'node_modules/rxjs',
|
||||
'angular2': 'node_modules/angular2',
|
||||
'app': 'dist/main'
|
||||
},
|
||||
packages: {
|
||||
'src': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'ng2-alfresco-viewer': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'rxjs': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'angular2': {
|
||||
defaultExtension: 'js'
|
||||
}
|
||||
}
|
||||
});
|
||||
System.import('app').catch(console.log.bind(console));
|
||||
System.import('app').catch(function(err){ console.error(err); });
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
@@ -5,9 +5,10 @@
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"postinstall": "npm run typings && npm run build && npm link ng2-alfresco-viewer",
|
||||
"postinstall": "npm run typings && npm run build",
|
||||
"typings": "typings install",
|
||||
"start": "rm -rf dist && npm install && http-server -c-1 -o -p 8875 .",
|
||||
"start": "rm -rf dist && npm install && npm run server",
|
||||
"server": "lite-server",
|
||||
"build": "npm run tslint && rm -rf dist && tsc",
|
||||
"tslint": "npm run tslint-src && npm run tslint-root",
|
||||
"tslint-src": "tslint -c tslint.json src/**/*.ts",
|
||||
@@ -16,27 +17,31 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"angular2": "2.0.0-beta.15",
|
||||
"es6-promise": "3.0.2",
|
||||
"es6-shim": "0.35.0",
|
||||
"es6-shim": "^0.35.0",
|
||||
"ng2-alfresco-viewer": "file:../",
|
||||
"material-design-icons": "^2.2.3",
|
||||
"material-design-lite": "^1.1.3",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"zone.js": "0.6.6",
|
||||
"ng2-alfresco-viewer": "^0.1.4",
|
||||
"material-design-icons": "^2.2.3",
|
||||
"material-design-lite": "^1.1.3"
|
||||
"systemjs": "0.19.26",
|
||||
"zone.js": "0.6.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"http-server": "0.8.5",
|
||||
"systemjs": "0.19.17",
|
||||
"browser-sync": "^2.10.0",
|
||||
"concurrently": "^2.0.0",
|
||||
"lite-server": "^2.2.0",
|
||||
"tslint": "^3.8.1",
|
||||
"typescript": "1.7.5",
|
||||
"typings": "0.6.8"
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.7.12"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Eugenio Romano",
|
||||
"email": "eugenio.romano@alfresco.com"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"angular2",
|
||||
"typescript"
|
||||
],
|
||||
"publishConfig": {
|
||||
"registry": "http://devproducts.alfresco.me:4873/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
52
ng2-components/ng2-alfresco-viewer/demo/systemjs.config.js
Normal file
52
ng2-components/ng2-alfresco-viewer/demo/systemjs.config.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
(function (global) {
|
||||
|
||||
// map tells the System loader where to look for things
|
||||
var map = {
|
||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer',
|
||||
'rxjs': 'node_modules/rxjs',
|
||||
'angular2': 'node_modules/angular2',
|
||||
'app': 'dist/main'
|
||||
};
|
||||
|
||||
// packages tells the System loader how to load when no filename and/or no extension
|
||||
var packages = {
|
||||
'src': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'ng2-alfresco-viewer': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'rxjs': {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'angular2': {
|
||||
defaultExtension: 'js'
|
||||
}
|
||||
};
|
||||
|
||||
var config = {
|
||||
defaultJSExtensions: true,
|
||||
map: map,
|
||||
packages: packages
|
||||
};
|
||||
|
||||
System.config(config);
|
||||
|
||||
})(this);
|
Reference in New Issue
Block a user