Skip to content
This repository was archived by the owner on Apr 9, 2018. It is now read-only.

Add NgModule & build FESM output using ngc & rollup #12

Merged
merged 5 commits into from
May 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ jspm_packages
.node_repl_history

# build output
*.js
*.map
*.d.ts
build
dist
1 change: 0 additions & 1 deletion index.ts

This file was deleted.

32 changes: 20 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
],
Expand All @@ -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"
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './services/esri-loader.module';
30 changes: 30 additions & 0 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]> (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"
}
8 changes: 8 additions & 0 deletions src/services/esri-loader.module.ts
Original file line number Diff line number Diff line change
@@ -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 {}
35 changes: 23 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"skipTemplateCodegen": true,
"flatModuleOutFile": "angular2-esri-loader.js",
"flatModuleId": "angular2-esri-loader"
}
}