Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Fix failed to load package #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions lib/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "es6",
"lib": [
"es6",
"dom"
],
"module": "commonjs",
"moduleResolution": "node",
"baseUrl": "../../",
"removeComments": true,
"types": [ "atom", "node" ]
}
}
22 changes: 20 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,27 @@
"atom": ">=0.174.0 <2.0.0"
},
"dependencies": {
"atom-space-pen-views": "^2.0.3"
"atom-space-pen-views": "^2.0.3",
"atom-ts-transpiler": "^1.2.3",
"typescript": "^2.5.3"
},
"devDependencies": {
"coffeelint": "1.16.0"
}
},
"atomTranspilers": [
{
"transpiler": "atom-ts-transpiler",
"glob": "{!(node_modules)/**/,}*.ts?(x)",
"options": {
"cacheKeyFiles": [
"lib/tsconfig.json"
],
"verbose": false
}
},
{
"glob": "{!(node_modules)/**/,}*.js",
"transpiler": "atom-babel6-transpiler"
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, now I feel dumb. Took me about 30 seconds to realize what's going on after actually taking a serious look at the changes. Atom's tripping up because you have atom-babel6-transpiler listed as a transpilation handler, but it's not in the package's dependencies, so trying to register the transpiler fails (meaning apm test exits with code 1 before ever trying to run the specs.)

In fact, I would just remove this entry altogether, since having a custom transpiler for .js files isn't actually necessary here, and the glob doesn't match any files, anyway. I might also point out that this section is using 4-space indentation whereas the rest of the file is using 2-space indentation, although that's less of a serious issue and more of a style thing.

]
}