-
Notifications
You must be signed in to change notification settings - Fork 19
Using loader from grunt-dojo2 and tslib from shim #103
Conversation
], | ||
"browser": { | ||
"loader": { | ||
"script": "./node_modules/grunt-dojo2/lib/intern/internLoader.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intern doesn't let us specify loader options without specifying the loader script, so we need to reference the loader in grunt-dojo2 manually in order for the packages below to take affect.
db5f331
to
6c0e9cb
Compare
tests/support/mocks/common/main.ts
Outdated
@@ -8,7 +8,7 @@ const locales = [ | |||
|
|||
const hasHostNode = has('host-node'); | |||
const pathSeparator = hasHostNode ? require('path').sep : '/'; | |||
const bundlePath = `tests${pathSeparator}support${pathSeparator}mocks${pathSeparator}common${pathSeparator}main`; | |||
const bundlePath = hasHostNode ? `${__dirname}${pathSeparator}/main` : '_build/tests/support/mocks/common/main'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The /
after ${pathSeparator}
needs to be removed for tests to pass on Windows ;).
tests/support/mocks/common/party.ts
Outdated
@@ -5,7 +5,7 @@ import has from '@dojo/core/has'; | |||
// this case, `node_modules/@dojo/loader/loader.min.js'. Is there a better, less hacky way to handle this? | |||
const hasHostNode = has('host-node'); | |||
const pathSeparator = hasHostNode ? require('path').sep : '/'; | |||
const basePath = hasHostNode ? `..${pathSeparator}_build${pathSeparator}` : ''; | |||
const basePath = hasHostNode ? `${__dirname}${pathSeparator}..${pathSeparator}..${pathSeparator}..${pathSeparator}..${pathSeparator}` : `_/build${pathSeparator}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be much better as path.resolve(__dirname, '../../../../')
(and the path separator will be converted automatically).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. updated!
dd0b883
to
0b81b72
Compare
Updating to use intern loader from grunt-dojo2, and tslib from shim PR, dojo/shim#114 .