mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
77
README.md
77
README.md
@@ -2,9 +2,84 @@
|
||||
|
||||
### Running demo project
|
||||
|
||||
**Note**: *Steps below show the quickest way to get demo shell up and running.
|
||||
For development configuration please refer to* **Configuring development environment**
|
||||
*section further in this document.*
|
||||
|
||||
##### Using setup script (recommended)
|
||||
|
||||
```sh
|
||||
git clone https://github.com/Alfresco/dev-platform-webcomponents.git
|
||||
cd dev-platform-webcomponents/demo-shell-ng2/
|
||||
./start.sh
|
||||
```
|
||||
|
||||
##### Manual setup
|
||||
|
||||
```sh
|
||||
git clone https://github.com/Alfresco/dev-platform-webcomponents.git
|
||||
cd dev-platform-webcomponents/demo-shell-ng2
|
||||
|
||||
npm install
|
||||
npm install ../ng2-components/ng2-alfresco-documentlist
|
||||
npm install ../ng2-components/ng2-alfresco-login
|
||||
|
||||
npm run build.dev
|
||||
```
|
||||
|
||||
### Configuring development environment
|
||||
|
||||
**Get a copy**
|
||||
|
||||
```sh
|
||||
git clone https://github.com/Alfresco/dev-platform-webcomponents.git
|
||||
```
|
||||
|
||||
**Install symlinks for Alfresco components**
|
||||
|
||||
*ng2-alfresco-documentlist component:*
|
||||
|
||||
```sh
|
||||
cd ng2-components/ng2-alfresco-documentlist
|
||||
npm link
|
||||
cd ../../demo-shell-ng
|
||||
npm link ng2-alfresco-documentlist
|
||||
```
|
||||
|
||||
*ng2-alfresco-login component:*
|
||||
|
||||
```sh
|
||||
cd ng2-components/ng2-alfresco-login
|
||||
npm link
|
||||
cd ../../demo-shell-ng
|
||||
npm link ng2-alfresco-login
|
||||
```
|
||||
|
||||
Please refer to [this article](https://docs.npmjs.com/cli/link) for more details on npm link.
|
||||
|
||||
### Building and running
|
||||
|
||||
**Install dependencies:**
|
||||
|
||||
|
||||
```sh
|
||||
cd dev-platform-webcomponents/demo-shell-ng2/
|
||||
npm install
|
||||
```
|
||||
|
||||
**(Option 1) Fast build and watch for dev purposes:**
|
||||
|
||||
```sh
|
||||
npm start
|
||||
```
|
||||
|
||||
**(Option 2) Build and watch with Gulp:**
|
||||
|
||||
```sh
|
||||
npm run build.dev
|
||||
```
|
||||
|
||||
*or*
|
||||
|
||||
```sh
|
||||
gulp dev
|
||||
```
|
||||
|
@@ -25,7 +25,16 @@ gulp.task('copy:assets', ['clean'], function() {
|
||||
// copy dependencies
|
||||
gulp.task('copy:libs', ['clean'], function() {
|
||||
return gulp.src([
|
||||
'node_modules/**/*'
|
||||
'node_modules/**/*',
|
||||
'!node_modules/ng2-alfresco-*{,/**/*}'
|
||||
])
|
||||
.pipe(gulp.dest('dist/node_modules'))
|
||||
});
|
||||
|
||||
gulp.task('copy:components', ['clean'], function() {
|
||||
return gulp.src([
|
||||
'../ng2-components/**/*',
|
||||
'!../ng2-components/README.md'
|
||||
])
|
||||
.pipe(gulp.dest('dist/node_modules'))
|
||||
});
|
||||
@@ -75,7 +84,7 @@ gulp.task('serve', ['build'], function() {
|
||||
gulp.watch(['app/**/*', 'index.html'], ['buildAndReload']);
|
||||
});
|
||||
|
||||
gulp.task('build', ['tslint', 'copy:assets', 'copy:libs', 'copy:typings', 'compile']);
|
||||
gulp.task('build', ['tslint', 'copy:assets', 'copy:libs', 'copy:components', 'copy:typings', 'compile']);
|
||||
gulp.task('dev', ['build', 'serve'], reload);
|
||||
gulp.task('default', ['build']);
|
||||
gulp.task('buildAndReload', ['build'], reload);
|
||||
|
@@ -8,11 +8,10 @@
|
||||
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
|
||||
"test": "live-server --open=tests-runner.html",
|
||||
"tsc": "tsc",
|
||||
"tsc:w": "tsc -w",
|
||||
"tsc:w": "tsc -w -p tsconfig.dev.json",
|
||||
"lite": "lite-server",
|
||||
"typings": "typings",
|
||||
"postinstall": "typings install",
|
||||
"build": "tsc -p .; exit 0"
|
||||
"postinstall": "typings install"
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
@@ -22,8 +21,6 @@
|
||||
"font-awesome": "^4.5.0",
|
||||
"jquery": "^2.2.2",
|
||||
"material-design-lite": "^1.1.3",
|
||||
"ng2-alfresco-documentlist": "file:../ng2-components/ng2-alfresco-documentlist",
|
||||
"ng2-alfresco-login": "file:../ng2-components/ng2-alfresco-login",
|
||||
"ng2-uploader": "denisvuyka/ng2-uploader",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
|
18
demo-shell-ng2/tsconfig.dev.json
Normal file
18
demo-shell-ng2/tsconfig.dev.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "system",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"removeComments": false,
|
||||
"noImplicitAny": false
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
"node_modules",
|
||||
"typings/main",
|
||||
"typings/main.d.ts"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user