class TaskGeneratePackageJson extends NodeUpdater {

    @Override
    public void execute() {
        try {
            modified = false;
            JsonObject mainContent = getPackageJson();
            modified = updateDefaultDependencies(mainContent);
            if (modified) {
                writePackageFile(mainContent);
            }

            if (flowResourcesFolder != null && !new File(npmFolder,
                    NODE_MODULES + FLOW_NPM_PACKAGE_NAME)
                            .equals(flowResourcesFolder)) {
                writeResourcesPackageFile(getResourcesPackageJson());
            }

            if (formResourcesFolder != null && !new File(npmFolder,
                    NODE_MODULES + FORM_NPM_PACKAGE_NAME)
                            .equals(formResourcesFolder)) {
                writeFormResourcesPackageFile(getFormResourcesPackageJson());
            }
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }

      TaskGeneratePackageJson(File npmFolder, File generatedPath, File flowResourcesPath);

}