chore: dead code
This commit is contained in:
parent
7c60f3299c
commit
07f7269f0e
|
@ -2,7 +2,6 @@ import {join} from 'path';
|
|||
|
||||
import {
|
||||
dumpYml,
|
||||
Flecks,
|
||||
loadYml,
|
||||
Option,
|
||||
program,
|
||||
|
@ -25,14 +24,6 @@ const {
|
|||
.default('npm'),
|
||||
);
|
||||
program.action(async (app, {packageManager}) => {
|
||||
const flecks = await Flecks.bootstrap({
|
||||
config: {
|
||||
'@flecks/core': {},
|
||||
'@flecks/core/server': {packageManager},
|
||||
'@flecks/create-app': {},
|
||||
'@flecks/fleck': {},
|
||||
},
|
||||
});
|
||||
try {
|
||||
const {errors} = validate(app);
|
||||
if (errors) {
|
||||
|
@ -47,7 +38,7 @@ const {
|
|||
error.code = 129;
|
||||
throw error;
|
||||
}
|
||||
const fileTree = await move(name, join(__dirname, 'template'), 'app', flecks);
|
||||
const fileTree = await move(name, join(__dirname, 'template'));
|
||||
fileTree.pipe(
|
||||
'build/flecks.yml',
|
||||
transform((chunk, encoding, done, stream) => {
|
||||
|
|
|
@ -23,7 +23,7 @@ export const testDestination = async (destination) => {
|
|||
}
|
||||
};
|
||||
|
||||
export default async (name, source, type, flecks) => {
|
||||
export default async (name, source) => {
|
||||
const fileTree = await FileTree.loadFrom(source);
|
||||
// Renamed to avoid conflicts.
|
||||
const {files} = fileTree;
|
||||
|
@ -32,13 +32,6 @@ export default async (name, source, type, flecks) => {
|
|||
files[join(dirname(path), basename(path, '.noconflict'))] = files[path];
|
||||
delete files[path];
|
||||
});
|
||||
// Defaults.
|
||||
flecks.set(
|
||||
`@flecks/create-${type}.packager`,
|
||||
flecks.get(`@flecks/create-${type}.packager`, ['...']),
|
||||
);
|
||||
// Send it out.
|
||||
await flecks.invokeSequentialAsync(`@flecks/create-${type}/packager`, fileTree);
|
||||
// Add project name to `package.json`.
|
||||
fileTree.pipe(
|
||||
'package.json',
|
||||
|
|
|
@ -81,7 +81,7 @@ const target = async (fleck) => {
|
|||
error.code = 129;
|
||||
throw error;
|
||||
}
|
||||
const fileTree = await move(name, join(__dirname, 'template'), 'fleck', flecks);
|
||||
const fileTree = await move(name, join(__dirname, 'template'));
|
||||
// Write the tree.
|
||||
await fileTree.writeTo(destination);
|
||||
await build(packageManager, destination);
|
||||
|
|
Loading…
Reference in New Issue
Block a user