Skip to content

Commit

Permalink
chore(build): update build process, commands, and packages
Browse files Browse the repository at this point in the history
* chore(build): change build commands + tools

* refactor(sqlite): tslint

* chore(tsconfig): update tsconfig & change build command

* chore(build): change build commands
  • Loading branch information
ihadeed authored Jun 26, 2016
1 parent ade3eda commit 3936f81
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 206 deletions.
174 changes: 0 additions & 174 deletions CHANGELOG.md

This file was deleted.

4 changes: 2 additions & 2 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ The `@Cordova` decorator has a few more options now.

### Testing your changes

You need to run `npm run build_bundle` in the `ionic-native` project, this will create a `dist` directory. Then, you must go to your ionic application folder and replace your current `node_modules/ionic-native/dist/` with the newly generated one.
You need to run `npm run build` in the `ionic-native` project, this will create a `dist` directory. Then, you must go to your ionic application folder and replace your current `node_modules/ionic-native/dist/` with the newly generated one.

### Cleaning the code

You need to run `gulp tslint` to analyze the code and ensure it's consitency with the repository style. Fix any errors before submitting a PR.
You need to run `npm run tslint` to analyze the code and ensure it's consistency with the repository style. Fix any errors before submitting a PR.

### 'Wrapping' Up

Expand Down
21 changes: 14 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@
"rxjs": "^5.0.0-beta.6"
},
"devDependencies": {
"browserify": "^13.0.0",
"browserify": "^13.0.1",
"canonical-path": "0.0.2",
"conventional-changelog": "^1.1.0",
"conventional-changelog-cli": "^1.2.0",
"conventional-github-releaser": "^1.1.3",
"cpr": "^1.0.0",
"cz-conventional-changelog": "^1.1.5",
"cz-conventional-changelog": "^1.1.6",
"dgeni": "^0.4.2",
"dgeni-packages": "^0.10.18",
"glob": "^6.0.4",
"gulp": "~3.9.0",
"gulp": "^3.9.1",
"gulp-rename": "^1.2.2",
"gulp-tslint": "^5.0.0",
"gulp-uglify": "^1.5.3",
"gulp-uglify": "^1.5.4",
"lodash": "3.10.1",
"minimist": "^1.1.3",
"mkdirp": "^0.5.1",
Expand All @@ -34,8 +35,14 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc --module commonjs --sourcemap --outDir dist/ --experimentalDecorators -d typings/es6-shim/es6-shim.d.ts src/index.ts --target ES5",
"build_bundle": "npm run-script build && browserify dist/index.js > dist/ionic.native.js && gulp minify:dist"
"tslint": "./node_modules/.bin/gulp tslint",
"watch": "./node_modules/.bin/tsc -w",
"build": "npm run tslint && npm run build:js && npm run build:bundle && npm run build:minify",
"build:js": "./node_modules/.bin/tsc",
"build:bundle": "./node_modules/.bin/browserify dist/index.js > dist/ionic.native.js",
"build:minify": "./node_modules/.bin/gulp minify:dist",
"changelog": "./node_modules/.bin/conventional-changelog -i CHANGELOG.md -s -p angular -v",
"github-release": "./node_modules/.bin/conventional-github-releaser -p angular"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ export class SQLite {
* });
* ```
*/
openDatabase (config: any) : Promise<any> {
openDatabase (config: any): Promise<any> {
return new Promise((resolve, reject) => {
sqlitePlugin.openDatabase(config, db => {
this._objectInstance = db;
resolve(db);
}, error => {
console.warn(error)
console.warn(error);
reject(error);
});
});
Expand Down
34 changes: 13 additions & 21 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"rootDir": ".",
"sourceMap": true,
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"filesGlob": [
"**/*.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
}
"compilerOptions": {
"module": "commonjs",
"target": "ES5",
"sourceMap": true,
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"outDir": "dist"
},
"files": [
"typings/es6-shim/es6-shim.d.ts",
"src/index.ts"
]
}

0 comments on commit 3936f81

Please sign in to comment.