Avoiding global npm installs

This commit is contained in:
Felipe Sabino 2017-06-30 08:58:41 -03:00
parent 78b5478d8d
commit 0c330c194b
No known key found for this signature in database
GPG Key ID: 5A517784B0716DBC
4 changed files with 13 additions and 7 deletions

View File

@ -15,7 +15,7 @@ before_script:
- sudo service mysql stop
- sudo service postgresql stop
- docker-compose up -d
- gulp createTravisOrmConfig
- npm run setup:config
after_success:
- bash <(curl -s https://codecov.io/bash)

View File

@ -61,17 +61,20 @@ During installation you may have some problems with some dependencies.
For example to proper install oracle driver you need to follow all instructions from
[node-oracle documentation](https://github.com/oracle/node-oracledb).
Also install these packages globally:
## ORM config
* `npm install -g gulp` (you might need to prefix this command with `sudo`)
* `npm install -g typescript` (you might need to prefix this command with `sudo`)
To create an initial `ormconfig.json` file, run the following command:
```shell
npm run setup:config
```
## Building
To build a distribution package of TypeORM run:
```shell
gulp package
npm run package
```
This command will generate you a distribution package in the `build/package` directory.

View File

@ -42,7 +42,7 @@ export class Gulpfile {
@Task()
compile() {
return gulp.src("package.json", { read: false })
.pipe(shell(["tsc"]));
.pipe(shell(["npm run compile"]));
}
// -------------------------------------------------------------------------

View File

@ -83,7 +83,10 @@
"yargs": "^8.0.2"
},
"scripts": {
"test": "node_modules/.bin/gulp tests"
"test": "gulp tests",
"compile": "tsc",
"setup:config": "gulp createTravisOrmConfig",
"package": "gulp package"
},
"bin": {
"typeorm": "./cli.js"