task,
variable,
variables,
-} from '../../src/Fig.js';
-import stat from '../../src/fs/stat.js';
-import path from '../../src/path.js';
+} from 'fig/Fig.js';
+import stat from 'fig/fs/stat.js';
+import path from 'fig/path.js';
variables(({identity}) => ({
gitUserEmail: identity === 'wincent' ? 'greg@hurrell.net' : '',
-import {resource, template, task} from '../../src/Fig.js';
+import {resource, template, task} from 'fig/Fig.js';
task('configure (global) LaunchDaemons', async () => {
const items = [
import {equal, ok} from 'assert';
import {join} from 'path';
-import {file, resource, task, template} from '../../src/Fig.js';
-import Context from '../../src/Fig/Context.js';
-import assert from '../../src/assert.js';
-import {promises} from '../../src/fs.js';
-import stat from '../../src/fs/stat.js';
-import tempdir from '../../src/fs/tempdir.js';
-import {default as toPath} from '../../src/path.js';
+import {file, resource, task, template} from 'fig/Fig.js';
+import Context from 'fig/Fig/Context.js';
+import assert from 'fig/assert.js';
+import {promises} from 'fig/fs.js';
+import stat from 'fig/fs/stat.js';
+import tempdir from 'fig/fs/tempdir.js';
+import {default as toPath} from 'fig/path.js';
function live() {
return !Context.currentOptions?.check;
-import {command, file, resource, task, variable} from '../../src/Fig.js';
+import {command, file, resource, task, variable} from 'fig/Fig.js';
task('create target directory', async () => {
await file({
skip,
task,
variable,
-} from '../../src/Fig.js';
-import stat from '../../src/fs/stat.js';
-import path from '../../src/path.js';
+} from 'fig/Fig.js'; // TODO: obviously need to rename this
+import stat from 'fig/fs/stat.js';
+import path from 'fig/path.js';
task('make directories', async () => {
// Some overlap with "dotfiles" aspect here.
yarn --frozen-lockfile --no-default-rc --no-progress --silent
+# TODO: may not need this with Yarn workspaces
+(cd node_modules && ln -s ../lib/src fig)
+
log_info "Cleaning"
git clean -fq -- lib
// TODO: export path module wrappers as well, then I can just use it as a
// drop-in replacement
-// TODO: decide whether this whole thing is an utterly terrible idea or not
-// (can't do strict-equality comparisons with string-likes)
-//
-// Maybe a full-blown Path object (ie. not a string) would be better.
export type Path = string & {
basename: Path;
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "./lib",
+ "baseUrl": ".",
+ "paths": {
+ "fig/*": ["src/*"]
+ },
"strict": true,
"target": "ES2019"
},
-import Context from './src/Fig/Context.js';
+import Context from 'fig/Fig/Context.js';
/**
* @file