xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Monorepo All In One

Monorepo All In One

monorepos 只是一种思想,或设计模式,架构风格

https://trunkbaseddevelopment.com/monorepos/

Lerna

https://github.com/lerna/lerna



git sub-modules

https://www.atlassian.com/git/tutorials/monorepos

https://github.com/korfuri/awesome-monorepo

https://github.com/symplify/monorepo-builder

Lerna

https://github.com/thundersdata-frontend/td-design/blob/master/package.json

https://github.com/thundersdata-frontend/td-design/blob/master/lerna.json

https://juejin.cn/post/6844903856153821198

demos

https://github.com/facebook/create-react-app

packages

https://github.com/facebook/create-react-app/tree/master/packages/

https://github.com/facebook/create-react-app/tree/master/packages/create-react-app


const * as  packageJson from './package.json';

const packageJson = require('./package.json');


docs

https://github.com/facebook/create-react-app/tree/master/docusaurus/website

cli

https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/bin/react-scripts.js


#!/usr/bin/env node
/**
 * Copyright (c) 2015-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';

// Makes the script crash on unhandled rejections instead of silently
// ignoring them. In the future, promise rejections that are not handled will
// terminate the Node.js process with a non-zero exit code.
process.on('unhandledRejection', err => {
  throw err;
});

const spawn = require('react-dev-utils/crossSpawn');
const args = process.argv.slice(2);

const scriptIndex = args.findIndex(
  x => x === 'build' || x === 'eject' || x === 'start' || x === 'test'
);
const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];

if (['build', 'eject', 'start', 'test'].includes(script)) {
  const result = spawn.sync(
    process.execPath,
    nodeArgs
      .concat(require.resolve('../scripts/' + script))
      .concat(args.slice(scriptIndex + 1)),
    { stdio: 'inherit' }
  );
  if (result.signal) {
    if (result.signal === 'SIGKILL') {
      console.log(
        'The build failed because the process exited too early. ' +
          'This probably means the system ran out of memory or someone called ' +
          '`kill -9` on the process.'
      );
    } else if (result.signal === 'SIGTERM') {
      console.log(
        'The build failed because the process exited too early. ' +
          'Someone might have called `kill` or `killall`, or the system could ' +
          'be shutting down.'
      );
    }
    process.exit(1);
  }
  process.exit(result.status);
} else {
  console.log('Unknown script "' + script + '".');
  console.log('Perhaps you need to update react-scripts?');
  console.log(
    'See: https://facebook.github.io/create-react-app/docs/updating-to-new-releases'
  );
}

refs



©xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


posted @ 2021-01-13 22:57  xgqfrms  阅读(99)  评论(6编辑  收藏  举报