这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
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
2 changes: 1 addition & 1 deletion __tests__/command_helpers/checkSTDERR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ describe('checkSTDERR', () => {
expect(typeof output).toBe('string')
expect(output.length).toBeGreaterThan(normal.length)
})
}
})
4 changes: 2 additions & 2 deletions __tests__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ test('ensure build', async () => {
expect(build().brand.mock.calls.length).toBe(1)
expect(build().brand.mock.calls[0][0]).toBe('solidarity')
expect(build().src.mock.calls.length).toBe(1)
// Check local and globals for Windows/Darwin === 3 checks
expect(build().plugins.mock.calls.length).toBe(3)
// Check local and globals for Windows/Darwin + Yarn === 4 checks
expect(build().plugins.mock.calls.length).toBe(4)
expect(build().create.mock.calls.length).toBe(1)
expect(build().run.mock.calls.length).toBe(1)
})
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { build } from 'gluegun'
const os = require('os')

module.exports = async (): Promise<void> => {
// setup the runtime
Expand All @@ -9,6 +10,7 @@ module.exports = async (): Promise<void> => {
.plugins('./node_modules', { matching: 'solidarity-*', hidden: true })
// global installs
.plugins('/usr/local/lib/node_modules', { matching: 'solidarity-*', hidden: true }) // Darwin
.plugins(`${os.homedir()}/.config/yarn/global/node_modules`, { matching: 'solidarity-*', hidden: true }) // Yarn/Darwin
.plugins(`${process.env.appdata}/npm/node_modules`, { matching: 'solidarity-*', hidden: true }) // Windows
// for testing - force load a local plugin
// .plugin('../solidarity-react-native')
Expand Down