mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
19 lines
495 B
JavaScript
19 lines
495 B
JavaScript
'use strict'
|
|
|
|
const fs = require('fs')
|
|
const path = require('path')
|
|
|
|
const fixturePath = path.resolve(__dirname, 'node_modules/serverless')
|
|
const fixtureModulePath = path.resolve(fixturePath, 'bin/serverless.js')
|
|
|
|
module.exports = (originalFixturePath) => {
|
|
const content = fs.readFileSync(fixtureModulePath)
|
|
fs.writeFileSync(
|
|
fixtureModulePath,
|
|
String(content).replace(
|
|
'$SERVERLESS_PATH',
|
|
JSON.stringify(path.resolve(originalFixturePath, '../../../../')),
|
|
),
|
|
)
|
|
}
|