Skip to content

Commit

Permalink
Drop Ramda as devDep of field-scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaehring committed Aug 31, 2023
1 parent bc55031 commit eb9cebe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/create-field-module/bin/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"@vitejs/plugin-vue": "^4.2.3",
"js-yaml": "^4.1.0",
"minimist": "^1.2.8",
"ramda": "^0.28.0",
"vite": "^4.3.9"
}
}
9 changes: 4 additions & 5 deletions packages/field-kit/bin/field-scripts/format.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import path from 'path';
import { evolve } from 'ramda';
import { snake } from '../../namespaces/index.js';

const fmtImport = (name, value) =>
Expand Down Expand Up @@ -27,11 +26,11 @@ document.head.appendChild(style);
})();${js}`.replaceAll('\n', '');

const absPath = relPath => path.resolve(process.cwd(), relPath);
const absConfig = evolve({
routes: absPath,
widget: absPath,
export const fmtScript = config => fmtCode({
...config,
routes: config.routes && absPath(config.routes),
widget: config.widget && absPath(config.widget),
});
export const fmtScript = config => fmtCode(absConfig(config));

const fmtModuleData = ({ name, label, description } = {}) => ({
type: 'field_module--field_module',
Expand Down

0 comments on commit eb9cebe

Please sign in to comment.