MCPcopy Create free account
hub / github.com/decaporg/decap-cms / webpackBuild

Function webpackBuild

scripts/smoke-install-packed.mjs:202–208  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

200}
201
202function webpackBuild(dir) {
203 mkdirSync(join(dir, 'src'), { recursive: true });
204 writeFileSync(join(dir, 'src', 'index.js'), "import CMS from 'decap-cms-app';\nCMS.init();\n");
205 run('npm install webpack', 'npm install --no-audit --no-fund webpack@5 webpack-cli', dir);
206 // No config file and no flags: what a consumer gets from `npx webpack`.
207 run('npm webpack build', 'node node_modules/webpack-cli/bin/cli.js', dir);
208}
209
210const INSTALLERS = {
211 npm(dir) {

Callers 1

npmFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected