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