Skip to content

Commit

Permalink
fix require path to icons.json (palantir#199)
Browse files Browse the repository at this point in the history
* fix karma missing typings

* resolve absolute path to icons.json

cuz it gets `require()`d directly, not passed to `gulp.src|dest` (those functions can handle relative paths, `requre` cannot)
  • Loading branch information
giladgray authored Nov 17, 2016
1 parent 57891b0 commit 1f2be15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gulp/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = (gulp, plugins, blueprint) => {

// generate sass and typescript files containing icon variables, driven by docs/src/icons.json
gulp.task("icons", () => {
const ICONS = require(path.join("..", blueprint.findProject("core").cwd, "resources", "icons", "icons.json"));
const ICONS = require(path.resolve(blueprint.findProject("core").cwd, "resources", "icons", "icons.json"));

function toEnumName(icon) {
return icon.className.replace("pt-icon-", "").replace(/-/g, "_").toUpperCase();
Expand Down
2 changes: 2 additions & 0 deletions gulp/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ module.exports = (gulp, plugins, blueprint) => {

function createConfig (project) {
const webpackConfig = webpackConfigGenerator.generateWebpackKarmaConfig(project);
// must delete this key in order to resolve root @types packages correctly.
delete webpackConfig.ts.compilerOptions.typeRoots;

const resourcesGlob = (project.id === "core" ? "." : "node_modules/@blueprintjs/*");
const filesToInclude = [
Expand Down

0 comments on commit 1f2be15

Please sign in to comment.