Skip to content

Commit

Permalink
Consolidate field-scripts into bin directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaehring committed Aug 29, 2023
1 parent 7c5c2c1 commit 5bd6ff0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { build } from 'vite';
import createVuePlugin from '@vitejs/plugin-vue';
import { viteCommonjs } from '@originjs/vite-plugin-commonjs';
import jsYaml from 'js-yaml';
import { snake } from '../lib/string-case.js';
import { snake } from '../../lib/string-case.js';
import fieldModulePlugin from './rollup-plugin-field-module.js';

const writeYaml = (filepath, data) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from 'path';
import { fmtCode, injectStyle } from '../shared/format.js';
import { fmtCode, injectStyle } from '../format.js';

const STYLE_BUNDLE = 'style.css';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { createRequire } from 'module';
import { createServer } from 'vite';
import createVuePlugin from '@vitejs/plugin-vue';
import { viteCommonjs } from '@originjs/vite-plugin-commonjs';
import { FM_API_ENDPOINT, FM_SCRIPT_DIR } from '../lib/constants.js';
import { snake } from '../lib/string-case.js';
import { FM_API_ENDPOINT, FM_SCRIPT_DIR } from '../../lib/constants.js';
import { snake } from '../../lib/string-case.js';
import createMockServer from './mock-server.js';

const require = createRequire(import.meta.url);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import http from 'http';
import { FM_API_ENDPOINT, resolveModulePathname } from '../lib/constants.js';
import { fmtScript, fmtJsonApi } from '../shared/format.js';
import { FM_API_ENDPOINT, resolveModulePathname } from '../../lib/constants.js';
import { fmtScript, fmtJsonApi } from '../format.js';

const trimPath = p => (typeof p === 'string' ? p : '').replaceAll(/^\/|\/$/g, '');
const eqPath = (pathA, pathB) => trimPath(pathA) === trimPath(pathB);
Expand Down
4 changes: 2 additions & 2 deletions packages/field-scripts/bin/field-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function run() {
const args = minimist(process.argv.slice(2));
const { _: [command], ...options } = args;
if (command === 'build-module') {
const { default: build } = await import('../build-module/index.js');
const { default: build } = await import('./build-module/index.js');
try {
const results = await build(options);
printResults(results);
Expand All @@ -26,7 +26,7 @@ async function run() {
}
}
if (command === 'develop-module') {
const { default: develop } = await import('../develop-module/index.js');
const { default: develop } = await import('./develop-module/index.js');
try {
await develop(options);
} catch (error) {
Expand Down
File renamed without changes.

0 comments on commit 5bd6ff0

Please sign in to comment.