Skip to content

Commit

Permalink
fix: use the js-sdk via npm
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Nov 21, 2019
1 parent 95a784a commit d17a49a
Show file tree
Hide file tree
Showing 9 changed files with 1,185 additions and 511 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ script:
- 'cross-env NODE_ICU_DATA=node_modules/full-icu npm run test'
after_script:
- 'cat ./coverage/lcov.info | coveralls'
git:
submodules: false
17 changes: 0 additions & 17 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
const fs = require('fs');
const path = require('path');
const sdkPath = path.dirname(__dirname);

let sdkMock = {};

try {
// Use the sdk if it is present (local)
if (fs.existsSync(sdkPath)) {
sdkMock = { '^@myparcel/sdk(?:/.+)+?$': '<rootDir>/myparcel-js-sdk' };
}
} catch (err) {
// Mock until sdk is live on npm
sdkMock = { '^@myparcel/sdk(?:/.+)+?$': '<rootDir>/tests/__mocks__/myparcel-js-sdk.js' };
}

module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
Expand All @@ -23,7 +7,6 @@ module.exports = {
},
transformIgnorePatterns: ['node_modules/(?!(babel-jest|jest-vue-preprocessor)/)'],
moduleNameMapper: {
...sdkMock,
'^@/(.*)$': '<rootDir>/src/$1',
},
snapshotSerializers: ['jest-serializer-vue'],
Expand Down
1 change: 0 additions & 1 deletion myparcel-js-sdk
Submodule myparcel-js-sdk deleted from f94cfc
Loading

0 comments on commit d17a49a

Please sign in to comment.