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

Using loader from grunt-dojo2 and tslib from shim #103

Merged
merged 5 commits into from
Nov 14, 2017

Conversation

rorticus
Copy link
Contributor

@rorticus rorticus commented Nov 7, 2017

Updating to use intern loader from grunt-dojo2, and tslib from shim PR, dojo/shim#114 .

],
"browser": {
"loader": {
"script": "./node_modules/grunt-dojo2/lib/intern/internLoader.js",
Copy link
Contributor Author

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.

@@ -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';
Copy link
Contributor

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 ;).

@@ -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}`;
Copy link
Contributor

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. updated!

@rorticus rorticus mentioned this pull request Nov 10, 2017
3 tasks
@rorticus rorticus merged commit d4e0afa into dojo:master Nov 14, 2017
@dylans dylans added this to the beta.4 milestone Dec 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants