diff --git a/build/flecks.yml b/build/flecks.yml index 955a2f6..9c75ff0 100644 --- a/build/flecks.yml +++ b/build/flecks.yml @@ -1,4 +1,6 @@ '@flecks/core': {} +'@flecks/core/server': + packageManager: yarn '@flecks/create-app': {} '@flecks/create-fleck': {} '@flecks/db': {} diff --git a/package.json b/package.json index 3d4f78e..3a9141e 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,12 @@ "publish": "lerna publish --conventional-commits --contents=dist --registry https://registry.npmjs.org" }, "devDependencies": { - "@flecks/core": "^2.0.3", + "@flecks/core": "*", "@flecks/create-app": "*", "@flecks/create-fleck": "*", "@flecks/db": "*", "@flecks/docker": "*", - "@flecks/dox": "^2.0.3", + "@flecks/dox": "*", "@flecks/electron": "*", "@flecks/fleck": "*", "@flecks/governor": "*", diff --git a/packages/core/package.json b/packages/core/package.json index ebf5b66..306028b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -60,7 +60,7 @@ "babel-plugin-prepend": "^1.0.2", "chai": "4.2.0", "chai-as-promised": "7.1.1", - "commander": "^8.3.0", + "commander": "11.1.0", "copy-webpack-plugin": "^11.0.0", "debug": "4.3.1", "enhanced-resolve": "^5.9.2", diff --git a/packages/core/src/server/commands.js b/packages/core/src/server/commands.js index 48ab564..111cc85 100644 --- a/packages/core/src/server/commands.js +++ b/packages/core/src/server/commands.js @@ -52,7 +52,7 @@ export default (program, flecks) => { new Argument('', 'fleck'), ], description: 'add a fleck to your application', - action: async (fleck, opts) => { + action: async (fleck) => { const args = []; if ('yarn' === packageManager) { args.push('yarn', ['add', fleck]); @@ -67,7 +67,7 @@ export default (program, flecks) => { }, clean: { description: 'remove node_modules, lock file, build artifacts, then reinstall', - action: (opts) => { + action: () => { rimraf.sync(join(flecksRoot, 'dist')); rimraf.sync(join(flecksRoot, 'node_modules')); switch (packageManager) { diff --git a/packages/create-fleck/src/cli.js b/packages/create-fleck/src/cli.js index 0c0d7dd..ecbdae3 100644 --- a/packages/create-fleck/src/cli.js +++ b/packages/create-fleck/src/cli.js @@ -61,7 +61,9 @@ const target = async (fleck) => { (async () => { program.argument('', 'name of the fleck to create'); program.option('--no-add', 'do not add an entry to `build/flecks.yml`'); - program.action(async (fleck, {add}) => { + program.option('--no-alias', 'do not alias the fleck in `build/flecks.yml`'); + program.action(async (fleck, o) => { + const {alias, add} = o; try { const flecks = await Flecks.bootstrap(); const {packageManager} = flecks.get('@flecks/core/server'); @@ -84,7 +86,7 @@ const target = async (fleck) => { await fileTree.writeTo(destination); await build(packageManager, destination); if (isMonorepo && add) { - await Flecks.addFleckToYml(name, pkg); + await Flecks.addFleckToYml(...[name].concat(alias ? pkg : [])); } } catch (error) {