-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30530a1
commit 0ce09d3
Showing
52 changed files
with
9,195 additions
and
755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"@shopify/prettier-config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import {createWorkspace, createWorkspacePlugin} from '@shopify/loom'; | ||
import {buildLibraryWorkspace} from '@shopify/loom-plugin-build-library'; | ||
import {eslint} from '@shopify/loom-plugin-eslint'; | ||
import {prettier} from '@shopify/loom-plugin-prettier'; | ||
|
||
import type {} from '@shopify/loom-plugin-jest'; | ||
|
||
export default createWorkspace((workspace) => { | ||
workspace.use( | ||
buildLibraryWorkspace(), | ||
eslint(), | ||
prettier({files: '**/*.{json,md}'}), | ||
jestWorkspaceConfigPlugin(), | ||
); | ||
}); | ||
|
||
function jestWorkspaceConfigPlugin() { | ||
return createWorkspacePlugin( | ||
'shopify-app-js--workplace-setup', | ||
({tasks: {test}}) => { | ||
test.hook(({hooks}) => { | ||
hooks.configure.hook((configure) => { | ||
configure.jestSetupFilesAfterEnv?.hook((files) => [ | ||
...files, | ||
'../../tests/setup/setup-jest.ts', | ||
]); | ||
// Increase the test timeout to 20 seconds | ||
configure.jestConfig?.hook((config) => ({ | ||
...config, | ||
testTimeout: 20000, | ||
})); | ||
}); | ||
}); | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "shopify-app-js--root", | ||
"version": "1.0.0", | ||
"license": "UNLICENSED", | ||
"private": true, | ||
"scripts": { | ||
"build": "loom build", | ||
"test": "loom test", | ||
"lint": "loom lint", | ||
"clean": "bin/ci_clean" | ||
}, | ||
"devDependencies": { | ||
"@shopify/eslint-plugin": "^42.0.1", | ||
"@shopify/loom": "^1.0.2", | ||
"@shopify/loom-cli": "^1.0.2", | ||
"@shopify/loom-plugin-build-library": "^1.0.3", | ||
"@shopify/loom-plugin-eslint": "^2.0.1", | ||
"@shopify/loom-plugin-jest": "^1.0.2", | ||
"@shopify/loom-plugin-prettier": "^2.0.1", | ||
"@shopify/prettier-config": "^1.1.2", | ||
"@shopify/typescript-configs": "^5.1.0", | ||
"eslint": "^8.28.0", | ||
"typescript": "^4.9.3" | ||
}, | ||
"dependencies": {}, | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import {createPackage, createProjectPlugin} from '@shopify/loom'; | ||
import {buildLibrary} from '@shopify/loom-plugin-build-library'; | ||
|
||
export default createPackage((pkg) => { | ||
pkg.entry({root: './src/index.ts'}); | ||
pkg.use( | ||
buildLibrary({ | ||
// Required. A browserslist string for specifying your target output. | ||
// Use browser targets (e.g. `'defaults'`) if your package targets the browser, | ||
// node targets (e.g. `'node 12.22'`) if your package targets node | ||
// or both (e.g.`'defaults, node 12.22'`) if your package targets both | ||
targets: 'node 14', | ||
// Optional. Defaults to false. Defines if commonjs outputs should be generated. | ||
commonjs: true, | ||
// Optional. Defaults to false. Defines if esmodules outputs should be generated. | ||
esmodules: false, | ||
// Optional. Defaults to false. Defines if esnext outputs should be generated. | ||
esnext: false, | ||
// Optional. Defaults to true. Defines if entrypoints should be written at | ||
// the root of the repository. You can disable this if you have a single | ||
// entrypoint or if your package uses the `exports` key in package.json | ||
rootEntrypoints: false, | ||
// Optional. Defaults to 'node'. Defines if the jest environment should be 'node' or 'jsdom'. | ||
jestTestEnvironment: 'node', | ||
}), | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.