diff --git a/.gitignore b/.gitignore index a8f33ae..686df26 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,5 @@ jspm_packages .node_repl_history # build output -*.js -*.map -*.d.ts +build +dist diff --git a/index.ts b/index.ts deleted file mode 100644 index 84d96b2..0000000 --- a/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { EsriLoaderService } from './src/esri-loader.service'; diff --git a/package.json b/package.json index 96398e7..f105e62 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,23 @@ { "name": "angular2-esri-loader", "version": "1.0.0", - "description": "An Angular 2 service to help you load ArcGIS API for JavaScript Modules", + "description": "An Angular (2+) service to help you load ArcGIS API for JavaScript Modules", "scripts": { - "test": "tsc", - "prepublish": "tsc", - "preversion": "npm run test && git add README.md CHANGELOG.md" + "build": "npm run clean && npm run ngc && npm run rollup && npm run copy", + "clean": "rimraf build dist", + "copy": "copyfiles -u 1 \"build/**/*{.d.ts,.js.map,.metadata.json}\" dist && copyfiles -f src/package.json README.md dist", + "ngc": "ngc -p tsconfig.json", + "rollup": "rollup build/angular2-esri-loader.js -o dist/angular2-esri-loader.js", + "prepublish": "npm run build", + "preversion": "npm run test && git add README.md CHANGELOG.md", + "test": "ngc" }, "repository": { "type": "git", "url": "git+https://github.com/tomwayson/angular2-esri-loader.git" }, "keywords": [ - "Angular2", + "Angular", "Esri", "ArcGIS" ], @@ -22,14 +27,17 @@ "url": "https://github.com/tomwayson/angular2-esri-loader/issues" }, "homepage": "https://github.com/tomwayson/angular2-esri-loader#readme", - "dependencies": { - "@angular/core": "^2.1.0", - "esri-loader": "^1.0.0", - "rxjs": "5.0.0-beta.12", - "zone.js": "^0.6.23" - }, "devDependencies": { - "typescript": "^2.0.10" + "@angular/compiler": "^4.1.1", + "@angular/compiler-cli": "^4.1.1", + "@angular/core": "^4.1.1", + "copyfiles": "^1.2.0", + "esri-loader": "^1.0.0", + "rimraf": "^2.6.1", + "rollup": "^0.41.6", + "rxjs": "^5.3.0", + "typescript": "^2.0.10", + "zone.js": "^0.8.5" }, "typings": "index.d.ts" } diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..1d5d10b --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export * from './services/esri-loader.module'; diff --git a/src/package.json b/src/package.json new file mode 100644 index 0000000..dee7739 --- /dev/null +++ b/src/package.json @@ -0,0 +1,30 @@ +{ + "name": "angular2-esri-loader", + "version": "0.1.11", + "description": "An Angular (2+) service to help you load ArcGIS API for JavaScript modules", + "repository": { + "type": "git", + "url": "git+https://github.com/tomwayson/angular2-esri-loader.git" + }, + "keywords": [ + "Angular", + "Esri", + "ArcGIS" + ], + "author": "Tom Wayson (https://tomwayson.com)", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/tomwayson/angular2-esri-loader/issues" + }, + "homepage": "https://github.com/tomwayson/angular2-esri-loader#readme", + "dependencies": { + "esri-loader": "^1.0.0" + }, + "peerDependencies": { + "@angular/core": "^4.1.1", + "rxjs": "^5.3.0", + "zone.js": "^0.8.5" + }, + "module": "angular2-esri-loader.js", + "typings": "angular2-esri-loader.d.ts" +} diff --git a/src/services/esri-loader.module.ts b/src/services/esri-loader.module.ts new file mode 100644 index 0000000..0efb33e --- /dev/null +++ b/src/services/esri-loader.module.ts @@ -0,0 +1,8 @@ +import {NgModule} from '@angular/core'; +import { EsriLoaderService } from './esri-loader.service'; +export * from './esri-loader.service'; + +@NgModule({ + providers: [EsriLoaderService] +}) +export class EsriLoaderModule {} diff --git a/src/esri-loader.service.ts b/src/services/esri-loader.service.ts similarity index 100% rename from src/esri-loader.service.ts rename to src/services/esri-loader.service.ts diff --git a/tsconfig.json b/tsconfig.json index 2d5c639..a2a57f2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,32 @@ { "compilerOptions": { - "noImplicitAny": false, - "module": "commonjs", - "target": "es5", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "sourceMap": true, + "baseUrl": "./src", "declaration": true, + "experimentalDecorators": true, + "inlineSources": true, "lib": [ "es2015", "dom" - ] + ], + "module": "es2015", "moduleResolution": "node", + "noImplicitAny": true, + "outDir": "./build", + "rootDir": "./src", + "skipLibCheck": true, + "sourceMap": true, + "stripInternal": true, + "suppressImplicitAnyIndexErrors": true, + "target": "es5", + "types": [] }, "files": [ - "index.ts" + "./src/index.ts" ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file + "angularCompilerOptions": { + "annotateForClosureCompiler": true, + "strictMetadataEmit": true, + "skipTemplateCodegen": true, + "flatModuleOutFile": "angular2-esri-loader.js", + "flatModuleId": "angular2-esri-loader" + } +}