mirror of
https://github.com/nocobase/nocobase
synced 2024-11-18 05:46:41 +00:00
08c5383bee
* refactor: core/build and cli/build.js * fix: build * fix: bug * fix: replaceAll to replace * fix: node version check * fix: add require check * fix: esbuild other ext * fix: process json * fix: exlude jsx-runtime * feat: split chunk * fix: minify plugin client bundle * fix: compatibility * fix: support import() * feat: update docs * fix: server deps * feat: demo * fix: remove cjs treeshake * fix: local error * fix: bug * fix: lazy load * fix: rewrites * fix: remove dynamic import function * feat: doc demo * fix: codesanbox vite template * fix: codesanbox demo * fix: hide stackblitz * fix: revert rspack * fix: test bug * fix: delete console * fix: import dayjs locale --------- Co-authored-by: chenos <chenlinxh@gmail.com>
30 lines
686 B
JavaScript
Executable File
30 lines
686 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const { existsSync } = require('fs');
|
|
const { join } = require('path');
|
|
const yParser = require('yargs-parser');
|
|
const chalk = require('chalk');
|
|
const { build } = require('../lib');
|
|
|
|
// print version and @local
|
|
const args = yParser(process.argv.slice(2), {
|
|
alias: {
|
|
package: 'p',
|
|
},
|
|
});
|
|
|
|
if (args.v || args.version) {
|
|
console.log(require('../package').version);
|
|
if (existsSync(join(__dirname, '../.local'))) {
|
|
console.log(chalk.cyan('@local'));
|
|
}
|
|
process.exit(0);
|
|
}
|
|
|
|
// Notify update when process exits
|
|
const updater = require('update-notifier');
|
|
const pkg = require('../package.json');
|
|
updater({ pkg }).notify({ defer: true });
|
|
|
|
build(args._);
|