Skip to content

Commit

Permalink
fix(umd): use typescript2 to ensure type declarations are ignored in …
Browse files Browse the repository at this point in the history
…umds

ISSUES CLOSED: #549
  • Loading branch information
jgravois committed Apr 24, 2019
1 parent 18955fc commit 3b41f3d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
6 changes: 1 addition & 5 deletions docs/src/srihashes.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"version": "2.0.0",
"packages": {
"@esri/arcgis-rest-auth": "sha384-oDD5I3Ocoqeo/1R4yPd54SMbFpkguv9alfmb8bL5ttiICTtn7x+b2YOCPg4BUDGF",
"@esri/arcgis-rest-request": "sha384-26UE8//evyvwlFqApBHXhnBzIyHbiNcrkVi9VbbZowhLnA0+dzKBsX/IggBzmrYx",
"@esri/arcgis-rest-routing": "sha384-ZgDXZ3VtE20AM+gW+cFHIwGS0cyhVKtOfaZ8dHS00AE79gZgPw6D6vLD9I5LrBNZ"
}
"packages": {}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"resolve": "^1.5.0",
"rimraf": "^2.6.2",
"rollup": "^0.66.4",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-commonjs": "^9.3.4",
"rollup-plugin-filesize": "^5.0.1",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-node-resolve": "^3.0.3",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-typescript2": "^0.21.0",
"rollup-plugin-uglify": "^3.0.0",
"shelljs": "^0.7.8",
"slug": "^0.9.1",
Expand Down
14 changes: 8 additions & 6 deletions umd-base-profile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import typescript from "rollup-plugin-typescript";
import typescript2 from "rollup-plugin-typescript2";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import json from "rollup-plugin-json";
Expand Down Expand Up @@ -42,10 +42,7 @@ const packageNames = fs
.readdirSync(path.join(__dirname, "packages"))
.filter(p => p[0] !== ".")
.map(p => {
// common methods should be bundled in each umd, all other dependencies are treated as external.
if (p !== "arcgis-rest-common") {
return require(path.join(__dirname, "packages", p, "package.json")).name;
}
return require(path.join(__dirname, "packages", p, "package.json")).name;
}, {});

/**
Expand Down Expand Up @@ -75,5 +72,10 @@ export default {
},
context: "window",
external: packageNames,
plugins: [typescript(), json(), resolve(), commonjs()]
plugins: [
typescript2(),
json(),
resolve(),
commonjs()
]
};

0 comments on commit 3b41f3d

Please sign in to comment.